diff --git a/README.md b/README.md index 9982982..81cd3e1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ### En local > Cloner le repo. -> Spécifier un fichier `.env` en suivant l'exemple [de l'exemple](example.env). +> Renseigner le token du bot dans le fichier [./config/config.json](./config/config.json). > Installer les dépendences du bot. ```bash diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..14c7b49 --- /dev/null +++ b/config/config.json @@ -0,0 +1,3 @@ +{ + "token": "OTY1NTk4ODUyNDA3MjMwNDk0.Yl1iAg.TiE_d1FEp8jL_Y_W79Zsb9RTr7Q" +} diff --git a/example.env b/example.env deleted file mode 100644 index 8417d18..0000000 --- a/example.env +++ /dev/null @@ -1 +0,0 @@ -DISCORD_TOKEN=your-token-goes-here diff --git a/index.js b/index.js index a5db1d5..5429f2b 100644 --- a/index.js +++ b/index.js @@ -1,16 +1,10 @@ const { Client, Intents } = require('discord.js'); -const dotenv = require('dotenv'); +const { token } = require('./config/config.json'); -// 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); +client.login(token); diff --git a/package.json b/package.json index 36e0782..05ef737 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,7 @@ "author": "La confrérie du Kassoulait", "license": "GPL-3.0-only", "dependencies": { - "discord.js": "^13.6.0", - "dotenv": "^16.0.0" + "discord.js": "^13.6.0" }, "devDependencies": { "eslint": "^8.13.0"