-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
executable file
·40 lines (30 loc) · 1.2 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
38
39
40
const { CommandoClient } = require('discord.js-commando');
const path = require('path');
const winston = require('winston');
const config = require('./config.json');
const discordUtils = require('./discordUtils.js');
const client = new CommandoClient({
commandPrefix: config.prefix,
owner: '523928057350717448',
invite: 'https://discord.gg/hgba83n',
});
client.registry
.registerDefaultTypes()
.registerGroups([
['moderation', 'Moderation Commands'],
['fun', 'Fun Commands! :)'],
['images', 'Image related commands'],
['roleplay', 'Commands for roleplaying.'],
['owneronly', 'These commands can only be used by the bot owners.'],
])
.registerDefaultGroups()
.registerDefaultCommands()
.registerCommandsIn(path.join(__dirname, 'commands'));
client.on("ready", () => {
client.user.setActivity(`${client.guilds.size} guilds`, { type: 'WATCHING' });
});
client.on('debug', m => logger.log('debug', m));
client.on('warn', m => logger.log('warn', m));
client.on('error', m => discordUtils.discordDevLogSend(client, config.devLogChannelId, error));
process.on('unhandledRejection', error => discordUtils.discordDevLogSend(client, config.devLogChannelId, error));
client.login(config.token);