forked from metricrb/maniabot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
37 lines (32 loc) · 1.03 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const commando = require('discord.js-commando');
require('dotenv').config();
const path = require('path');
const noblox = require('noblox.js');
const { Guild } = require('discord.js');
const client = new commando.Client({
owner: '827986018027307060',
commandPrefix: ';',
invite: 'https://discord.gg/ZWx9hJt7rE',
unknownCommandResponse: true,
});
client
.on('error', console.error)
.on('warn', console.warn)
.on('debug', console.log)
.on('ready', () => {
console.log(`Client ready; logged in as ${client.user.username}#${client.user.discriminator} (${client.user.id})`);
})
const sqlite = require('sqlite');
const sqlite3 = require('sqlite3');
client.setProvider(
sqlite.open({ filename: 'database.db', driver: sqlite3.Database }).then(db => new Commando.SQLiteProvider(db))
).catch(console.error);
client.registry
.registerGroups([
['moderation', 'moderation'],
['misc', 'misc']
])
.registerDefaults()
.registerTypesIn(path.join(__dirname, 'types'))
.registerCommandsIn(path.join(__dirname, 'commands'));
client.login('');