forked from sabattle/CalypsoBot
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
29 lines (24 loc) · 703 Bytes
/
app.js
File metadata and controls
29 lines (24 loc) · 703 Bytes
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
const config = require('./config.json');
const Client = require('./src/Client.js');
const { Intents } = require('discord.js');
global.__basedir = __dirname;
// Client setup
const intents = new Intents();
intents.add(
'GUILD_PRESENCES',
'GUILD_MEMBERS',
'GUILDS',
'GUILD_VOICE_STATES',
'GUILD_MESSAGES',
'GUILD_MESSAGE_REACTIONS'
);
const client = new Client(config, { ws: { intents: intents } });
// Initialize client
function init() {
client.loadEvents('./src/events');
client.loadCommands('./src/commands');
client.loadTopics('./data/trivia');
client.login(client.token);
}
init();
process.on('unhandledRejection', err => client.logger.error(err));