-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
38 lines (32 loc) · 1.08 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
const config = require('./config.json')
const fs = require("fs");
const { Client, GatewayIntentBits, Partials, Collection, ActivityType} = require('discord.js');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildEmojisAndStickers,
GatewayIntentBits.GuildIntegrations,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildPresences
],
allowedMentions: { parse: ["users"] },
partials: [Partials.User, Partials.Channel, Partials.GuildMember, Partials.Message, Partials.Reaction],
presence: {
activities: [{
name: `Music`,
type: ActivityType.Listening
}]
}
})
// Slash commands
client.slashCommands = new Collection()
// Slash commands loading
require('./handlers/command')(client, false)
// loads the events
require('./handlers/event')(client)
// Logs in
client.login(config.token);