diff --git a/.gitignore b/.gitignore index c2658d7..713d500 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules/ +.env diff --git a/bot.js b/bot.js index 3c3535a..f9fbee8 100644 --- a/bot.js +++ b/bot.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +require('dotenv').config() const Discord = require('discord.js'); const MongoClient = require('mongodb').MongoClient; diff --git a/index.js b/index.js index 1b334db..d908cbd 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ +require('dotenv').config() + const { ShardingManager } = require('discord.js'); const manager = new ShardingManager('./bot.js', { token: process.env.BOT_TOKEN }); diff --git a/package-lock.json b/package-lock.json index 4babc04..7ed4db2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "csvtojson": "^2.0.10", "discord.js": "github:discordjs/discord.js", + "dotenv": "^10.0.0", "mongodb": "^3.6.5", "node-fetch": "^2.6.1", "nodemon": "^2.0.7" @@ -502,6 +503,14 @@ "node": ">=8" } }, + "node_modules/dotenv": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", + "engines": { + "node": ">=10" + } + }, "node_modules/duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -1895,6 +1904,11 @@ "is-obj": "^2.0.0" } }, + "dotenv": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" + }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", diff --git a/package.json b/package.json index 65da546..625e3ea 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dependencies": { "csvtojson": "^2.0.10", "discord.js": "github:discordjs/discord.js", + "dotenv": "^10.0.0", "mongodb": "^3.6.5", "node-fetch": "^2.6.1", "nodemon": "^2.0.7"