-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
29 lines (25 loc) · 838 Bytes
/
server.js
File metadata and controls
29 lines (25 loc) · 838 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
// server.js
import { Client, GatewayIntentBits } from "discord.js";
import dotenv from "dotenv";
import { startPresenceCycle } from "./utils/statusManager.js";
dotenv.config();
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageReactions,
GatewayIntentBits.GuildIntegrations,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildScheduledEvents,
],
});
client.once("ready", () => {
console.log(`✅ Le bot est connecté en tant que ${client.user.tag}`);
startPresenceCycle(client);
});
client.login(process.env.BOT_TOKEN);