Remove config.json
Remove config.json (not secure) and replace with .env.
Update deploy-commands.js:
- const { token, clientId } = require('./config.json');
+ const { token, clientId } = process.env;
Update index.js:
- const { token, clientId } = require('./config.json');
+ const token = process.env.TOKEN;
This commit is contained in:
13
package-lock.json
generated
13
package-lock.json
generated
@@ -10,6 +10,7 @@
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"discord.js": "^14.22.1",
|
||||
"dotenv": "^17.2.3",
|
||||
"mysql2": "^3.15.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -641,6 +642,18 @@
|
||||
"url": "https://github.com/discordjs/discord.js?sponsor"
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "17.2.3",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
|
||||
"integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://dotenvx.com"
|
||||
}
|
||||
},
|
||||
"node_modules/escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
|
||||
Reference in New Issue
Block a user