From 1c6bf97554eb8cc279fc6f023da161852fe87748 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Fri, 18 Mar 2022 12:01:32 -0500 Subject: [PATCH] Use environment variables in place of config.json --- config.default.json | 5 ----- index.js | 7 ++++--- 2 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 config.default.json diff --git a/config.default.json b/config.default.json deleted file mode 100644 index 440d6db..0000000 --- a/config.default.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subjectURL": "https://moose.lcsrc.org/subjects/", - "gotenbergURL": "https://localhost:3136/convert/html", - "topggauth": "" -} diff --git a/index.js b/index.js index 279d0bb..20f5926 100755 --- a/index.js +++ b/index.js @@ -15,10 +15,11 @@ const decode = require('html-entities').decode; const userScore = require('./models/userScore'); const generatedRound = require('./models/generateRound'); -const config = require('./config.json'); - const helpMessage = 'AwesomeSciBo has migrated to using slash commands! You can take a look at the different commands by typing `/` and clicking on the AwesomeSciBo icon.'; const slashCommands = require('./slashCommands.json'); +const config = { + topggauth: process.env['TOPGGAUTH'], +}; client.once('ready', () => { client.application.commands.set(slashCommands); @@ -31,7 +32,7 @@ client.once('ready', () => { useNewUrlParser: true, }) .then(() => { - // Log client tag and set status + // Log client tag and set status console.log(`Logged in as: ${client.user.username}!`); client.user.setActivity( 'for /help',