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:
@@ -1,5 +1,5 @@
|
||||
const { REST, Routes } = require('discord.js');
|
||||
const { clientId, token } = require('./config.json');
|
||||
const { token, clientId } = process.env;
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user