Clean up env vars, provide example file

This commit is contained in:
Skylar Grant 2023-12-30 10:54:51 -05:00
parent 4390bc5c64
commit 2af6e35842
6 changed files with 12 additions and 6 deletions

6
example.env Normal file
View File

@ -0,0 +1,6 @@
TOKEN=
OWNER_ID=
STATUS_CHANNEL_ID=
DEBUG=
HEARTBEAT_URL=
BOT_ID=

View File

@ -16,8 +16,8 @@ const client = new Client({
// Various imports // Various imports
const fn = require('./modules/functions.js'); const fn = require('./modules/functions.js');
const strings = require('./data/strings.json'); const strings = require('./data/strings.json');
const isDev = process.env.DEBUG; const isDev = process.env.DEBUG === "true";
const statusChannelId = process.env.STATUSCHANNELID; const statusChannelId = process.env.STATUS_CHANNEL_ID;
client.once('ready', () => { client.once('ready', () => {
// Build a collection of slash commands for the bot to use // Build a collection of slash commands for the bot to use

View File

@ -4,7 +4,7 @@ dotenv.config();
const { REST } = require('@discordjs/rest'); const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9'); const { Routes } = require('discord-api-types/v9');
const clientId = process.env.BOTID; const clientId = process.env.BOT_ID;
const token = process.env.TOKEN; const token = process.env.TOKEN;
const fs = require('fs'); const fs = require('fs');

View File

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

View File

@ -4,7 +4,7 @@ dotenv.config();
const { REST } = require('@discordjs/rest'); const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9'); const { Routes } = require('discord-api-types/v9');
const clientId = process.env.clientId; const clientId = process.env.BOT_ID;
const { guildId } = require('../data/config.json'); const { guildId } = require('../data/config.json');
const token = process.env.TOKEN; const token = process.env.TOKEN;

View File

@ -1,7 +1,7 @@
// dotenv for handling environment variables // dotenv for handling environment variables
const dotenv = require('dotenv'); const dotenv = require('dotenv');
dotenv.config(); dotenv.config();
const isDev = process.env.isDev; const isDev = process.env.DEBUG === "true";
// filesystem // filesystem
const fs = require('fs'); const fs = require('fs');