-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.js
42 lines (36 loc) · 1.15 KB
/
app.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
41
42
process.on('unhandledRejection', error => console.warn(`Uncaught Rejection: ${error}`));
require('dotenv').config();
const path = require('path');
const { CommandoClient } = require('discord.js-commando');
const DBL = require('dblapi.js');
const token = process.env.TOKEN;
const client = new CommandoClient({
owner: '221449635254894594',
invite: 'https://discord.gg/kuESm95',
commandPrefix: 'k!',
disableEveryone: true,
unknownCommandResponse: false,
});
const dbl = new DBL(process.env.DBL_API, client);
dbl.on('posted', () => {
console.info('Server count posted to DBL');
});
client.registry
.registerDefaults()
.registerGroups([
['moderation', 'Moderation Commands'],
['utilities', 'Utility Commands'],
['games', 'Game Information Commands'],
['music', 'Music Commands'],
['fun', 'Fun Commands'],
['misc', 'Misc Commands'],
])
.registerCommandsIn(path.join(__dirname, 'commands'));
client.on('ready', () => {
console.info(`Logged in as ${client.user.tag}!`);
setInterval(() => {
console.info(`Server Count: ${client.guilds.size}`);
}, 3600000);
client.user.setPresence({ game: { name: 'k!help' } });
});
client.login(process.env.TOKEN);