Moved a lot from env to config

This commit is contained in:
Skylar Grant 2024-06-15 08:22:41 -04:00
parent 5d2e1334a9
commit a41cc9b51d
5 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,7 @@
{
"debugMode": true,
"guildId": "",
"validCommands": []
"statusChannelId": "1112151867821146152",
"botId": "1074882226665312356",
"validCommands": [],
}

View File

@ -16,8 +16,7 @@ const client = new Client({
// Various imports
const fn = require('./modules/functions.js');
const strings = require('./data/strings.json');
const debugMode = process.env.DEBUG;
const statusChannelId = process.env.STATUSCHANNELID
const { debugMode, statusChannelId } = require('./data/config.json'); //TODO add debug logic to boot message
client.once('ready', () => {
fn.collectionBuilders.slashCommands(client);

View File

@ -3,7 +3,7 @@ const dotenv = require('dotenv');
dotenv.config();
const { REST, Routes } = require('discord.js');
const botId = process.env.BOTID;
const { botId } = require('../data/config.json');
const token = process.env.TOKEN;
const fs = require('fs');

View File

@ -3,7 +3,7 @@ const dotenv = require('dotenv');
dotenv.config();
const { REST, Routes } = require('discord.js');
const botId = process.env.BOTID;
const { botId } = require('../data/config.json');
const token = process.env.TOKEN;
const fs = require('fs');

View File

@ -9,8 +9,9 @@ const Discord = require('discord.js');
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = Discord;
// Various imports from other files
const debugMode = process.env.DEBUG;
const config = require('../data/config.json');
const { debugMode } = config;
const strings = require('../data/strings.json');
const slashCommandFiles = fs.readdirSync('./slash-commands/').filter(file => file.endsWith('.js'));