Browse Source

fix: add sensible defaults if no config and no subject

pull/48/head
Abheek Dhawan 2 years ago
parent
commit
309ea325fb
Signed by: abheekd GPG Key ID: 7BE81B8C14475B67
  1. 2
      src/commands/train.ts
  2. 2
      src/helpers/env.ts

2
src/commands/train.ts

@ -66,7 +66,7 @@ export async function execute(interaction : CommandInteraction) {
switch (subject) {
case null:
// categoryArray = ['BIOLOGY', 'PHYSICS', 'CHEMISTRY', 'EARTH AND SPACE', 'ASTRONOMY', 'MATH'];
categoryArray = configCategories.subjects;
categoryArray = configCategories.subjects || ['BIOLOGY', 'PHYSICS', 'CHEMISTRY', 'EARTH AND SPACE', 'ASTRONOMY', 'MATH'];
break;
case 'astro':
case 'astronomy':

2
src/helpers/env.ts

@ -3,4 +3,4 @@ import 'dotenv/config';
export const clientId = process.env.CLIENT_ID || '';
export const testingGuild = process.env.TESTING_GUILD || '';
export const token = process.env.TOKEN || '';
export const mongoUri = process.env.MONGO_URI = 'mongodb://mongo:27017/awesome';
export const mongoUri = process.env.MONGO_URI = 'mongodb://mongo:27017/AWESOME';

Loading…
Cancel
Save