Skip to content
Snippets Groups Projects
Commit d6b892f4 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

Mise à jour du bot pour qu'il puisse fonctionner avec le nouveau système d'intent.

parent a8e6a1bf
No related branches found
No related tags found
No related merge requests found
.env 0 → 100644
DISCORD_BOT_TOKEN=ODMwMzYwOTA5NTE1OTgwODEw.GT6S6x.lJSvZrNElmyFOO612WVyiNpxzxHhnglVl4oG60
CLIENT_ID=830360909515980810
GUILD_ID=815138534704939039
BDD_HOST=node.sl-projects.com
BDD_NAME=srvMinecraft
BDD_USER=srvMinecraft
BDD_PASSWORD=YIn2hTln5iMQap1W
ROLE_ANNIV=949734406409556038
ROLE_ADMIN=830359225972162561
CANAL_GENERAL=815138535413121056
CANAL_LOG=830362795588452363
CANAL_CHAT_MC=950009038291222589
CANAL_CHAT_MC_DEV=830362795588452363
PORT_MSG_SRVMC=25575
\ No newline at end of file
......@@ -276,11 +276,18 @@ recursiveAsyncReadLine(); //we have to actually start our recursion somehow
// BOT DISCORD
////////////////////////////////////////////////////////////////
// require the needed discord.js classes
const { Client, Intents, MessageActionRow, MessageButton, WebhookClient } = require('discord.js');
const { Client, GatewayIntentBits, MessageActionRow, MessageButton, WebhookClient } = require('discord.js');
const { verify } = require('crypto');
// create a new Discord client
const client = new Client({ intents: ["GUILDS", "GUILD_MESSAGES", "DIRECT_MESSAGES", "GUILD_MEMBERS"] });
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.DirectMessages
]
})
var mcChatWebhook, devMcChatWebhook;
client.on("ready", async function () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment