From 3b9e1011077fc69191b06295d64683e64d519aec Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 18 Apr 2022 15:41:35 +0200 Subject: [PATCH] =?UTF-8?q?Connexion=20=C3=A0=20Discord?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 0000000..a5db1d5 --- /dev/null +++ b/index.js @@ -0,0 +1,16 @@ +const { Client, Intents } = require('discord.js'); +const dotenv = require('dotenv'); + +// Load .env +dotenv.config(); + +// Create a new client instance +const client = new Client({ intents: [Intents.FLAGS.GUILDS] }); + +// When the client is ready +client.once('ready', () => { + console.log('PrĂȘt !'); +}); + +// Login to Discord with token +client.login(process.env.DISCORD_TOKEN);