|
@ -61,12 +61,12 @@ export async function execute(interaction : CommandInteraction) { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
let categoryArray : string[] = []; |
|
|
let categoryArray : string[] = []; |
|
|
|
|
|
const allCategories = ['BIOLOGY', 'PHYSICS', 'CHEMISTRY', 'EARTH AND SPACE', 'ASTRONOMY', 'MATH']; |
|
|
const configCategories = await userConfig.findById(interaction.user.id); |
|
|
const configCategories = await userConfig.findById(interaction.user.id); |
|
|
|
|
|
|
|
|
switch (subject) { |
|
|
switch (subject) { |
|
|
case null: |
|
|
case null: |
|
|
// categoryArray = ['BIOLOGY', 'PHYSICS', 'CHEMISTRY', 'EARTH AND SPACE', 'ASTRONOMY', 'MATH'];
|
|
|
categoryArray = (configCategories ? (configCategories.subjects || allCategories) : allCategories); |
|
|
categoryArray = configCategories.subjects || ['BIOLOGY', 'PHYSICS', 'CHEMISTRY', 'EARTH AND SPACE', 'ASTRONOMY', 'MATH']; |
|
|
|
|
|
break; |
|
|
break; |
|
|
case 'astro': |
|
|
case 'astro': |
|
|
case 'astronomy': |
|
|
case 'astronomy': |
|
|