Add DB Back

This commit is contained in:
Daniel Odendahl Jr
2017-09-04 20:25:06 +00:00
parent e4eb697373
commit 82a978390b
5 changed files with 288 additions and 6 deletions
+6 -5
View File
@@ -1,7 +1,7 @@
const { TOKEN, OWNERS, COMMAND_PREFIX, INVITE } = process.env;
const path = require('path');
const { CommandoClient } = require('discord.js-commando');
const client = new CommandoClient({
const Client = require('./structures/Client');
const client = new Client({
commandPrefix: COMMAND_PREFIX,
owner: OWNERS.split(','),
invite: INVITE,
@@ -11,6 +11,7 @@ const client = new CommandoClient({
messageCacheLifetime: 600,
messageSweepInterval: 120
});
const SequelizeProvider = require('./providers/Sequelize');
const { dBots, dBotsOrg, filterTopics, parseTopic } = require('./structures/Util');
client.registry
@@ -33,12 +34,12 @@ client.registry
])
.registerDefaultCommands({
help: false,
ping: false,
prefix: false,
commandState: false
ping: false
})
.registerCommandsIn(path.join(__dirname, 'commands'));
client.setProvider(new SequelizeProvider(client.database));
client.on('ready', () => {
console.log(`[READY] Shard ${client.shard.id} logged in as ${client.user.tag} (${client.user.id})!`);
client.user.setActivity(`${COMMAND_PREFIX}help | Shard ${client.shard.id}`, { type: 0 });