Browse Source

Use environment variables in place of config.json

pull/22/head
Abheek Dhawan 3 years ago
parent
commit
1c6bf97554
Signed by: abheekd GPG Key ID: 7BE81B8C14475B67
  1. 5
      config.default.json
  2. 7
      index.js

5
config.default.json

@ -1,5 +0,0 @@
{
"subjectURL": "https://moose.lcsrc.org/subjects/",
"gotenbergURL": "https://localhost:3136/convert/html",
"topggauth": ""
}

7
index.js

@ -15,10 +15,11 @@ const decode = require('html-entities').decode;
const userScore = require('./models/userScore'); const userScore = require('./models/userScore');
const generatedRound = require('./models/generateRound'); 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 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 slashCommands = require('./slashCommands.json');
const config = {
topggauth: process.env['TOPGGAUTH'],
};
client.once('ready', () => { client.once('ready', () => {
client.application.commands.set(slashCommands); client.application.commands.set(slashCommands);
@ -31,7 +32,7 @@ client.once('ready', () => {
useNewUrlParser: true, useNewUrlParser: true,
}) })
.then(() => { .then(() => {
// Log client tag and set status // Log client tag and set status
console.log(`Logged in as: ${client.user.username}!`); console.log(`Logged in as: ${client.user.username}!`);
client.user.setActivity( client.user.setActivity(
'for /help', 'for /help',

Loading…
Cancel
Save