From b2f12bf0ee199747cbc1a7caf141869af1a38d26 Mon Sep 17 00:00:00 2001 From: John Schiltz Date: Mon, 26 Dec 2022 19:50:09 -0600 Subject: [PATCH] only add new role if class poll is picked --- features/interactionCreate.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/features/interactionCreate.ts b/features/interactionCreate.ts index 25a51b6..89793b9 100644 --- a/features/interactionCreate.ts +++ b/features/interactionCreate.ts @@ -68,6 +68,8 @@ export default (client: Client): void => { // Assign the new role to the user await addNewRole(member, staffModel, interaction.values[0]); } else if (interaction.customId.startsWith("csClassPoll+")) { + // Assign the new role to the user + await addNewRole(member, classModel, interaction.values[0]); // Set the embed title const title = "CS Class Poll"; // Create and send the embed object @@ -81,9 +83,6 @@ export default (client: Client): void => { ], ephemeral: true, }); - // Assign the new role to the user - - await addNewRole(member, classModel, interaction.values[0]); } }); };