-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
13 lines (10 loc) · 687 Bytes
/
main.js
File metadata and controls
13 lines (10 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
// Require the necessary discord.js classes
const {Client, Intents} = require('discord.js');
const json = require('./config.json');
const {resolveCommands, resolveEvents} = require("./structures/resolvers");
// Create a new client instance
console.log("Initializing and connecting to discord!")
const client = new Client({intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_INVITES, Intents.FLAGS.GUILD_VOICE_STATES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS], partials: ['MESSAGE', 'CHANNEL', 'REACTION', 'USER']});
resolveCommands(client);
resolveEvents(client);
client.login(json['token']).catch(error => console.error(error))