diff --git a/src/commands/settings.ts b/src/commands/settings.ts index 775855c..8166415 100644 --- a/src/commands/settings.ts +++ b/src/commands/settings.ts @@ -26,30 +26,17 @@ export async function execute(interaction : CommandInteraction) { .setPlaceholder('Nothing selected') .addOptions([ { - label: 'Subjects', - description: 'Subjects', - value: 'subjects', + label: 'Select me', + description: 'This is a description', + value: 'first_option', }, { - label: 'Grade Levels', - description: 'Grade Levels', - value: 'gradeLevels', + label: 'You can select me too', + description: 'This is also a description', + value: 'second_option', }, ]), ); - await interaction.followUp({ embeds: [settingsEmbed], components: [menu] }); - const client = interaction.client; - client.on('interactionCreate', async interaction => { - if (!interaction.isSelectMenu()) return; - var values = interaction.values[1]; - switch(values) { - case "subjects": - await interaction.editReply({ content: 'subjects was selected!', components: [] }); - break; - case "gradeLevels": - await interaction.editReply({ content: 'levels was selected!', components: [] }); - break; - } - }); - + await interaction.followUp({ embeds: [settingsEmbed] }); + } \ No newline at end of file diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 60cf296..8cdd4b0 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -4,17 +4,11 @@ export const name = 'interactionCreate'; export const once = false; -declare global { - var client; -} - export async function execute(interaction) { const client = interaction.client; - if (!interaction.isCommand()) return; const command = client.commands.get(interaction.commandName); - if (!command) return; try { @@ -24,6 +18,4 @@ export async function execute(interaction) { log({ logger: 'interaction', content: `Interaction ${interaction.name} failed!`, level: 'error' }); await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true }); } -// - -} +} \ No newline at end of file