-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
33 lines (29 loc) · 976 Bytes
/
index.js
File metadata and controls
33 lines (29 loc) · 976 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
30
31
32
33
// Importation de discord.js et des fichiers nécessaires
const { Client, Collection, GatewayIntentBits, ActivityType } = require("discord.js");
const { token } = require("./config.json");
const loadCommands = require("./loaders/loadCommands");
const loadEvents = require("./loaders/loadEvents");
// Création le client Discord
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildInvites,
GatewayIntentBits.GuildExpressions,
GatewayIntentBits.GuildWebhooks
],
presence: {
activities: [{
name: "vos serveurs !",
type: ActivityType.Watching
}]
}
});
// Création de la collection pour contenir les commandes
client.commands = new Collection();
// Charge les commandes & événements
loadCommands(client);
loadEvents(client);
// Connexion à Discord
client.login(token);