From 8cb454df707b211ea569c9eef38d8314faf9d34a Mon Sep 17 00:00:00 2001 From: kieranrobson Date: Fri, 13 May 2022 20:32:26 +0100 Subject: [PATCH] Added foundation, first and second role menu --- commands/embeds/roles.js | 12 ++++++++---- events/interactionCreate.js | 14 +++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/commands/embeds/roles.js b/commands/embeds/roles.js index b53a3ee..40e6da5 100644 --- a/commands/embeds/roles.js +++ b/commands/embeds/roles.js @@ -33,21 +33,25 @@ module.exports = { value:"2", }, { - label:"Third Year", + label:"Year In Industry", value:"3", }, { - label:"Masters", + label:"Third Year", value:"4", }, { - label:"PhD", + label:"Masters", value:"5", }, { - label:"Graduate", + label:"PhD", value:"6", }, + { + label:"Graduate", + value:"7", + }, ]) ) diff --git a/events/interactionCreate.js b/events/interactionCreate.js index 9eaeb6a..256a336 100644 --- a/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -96,7 +96,7 @@ client.on("interactionCreate", async (interaction) => { else if(interaction.values.includes("1")) { interaction.member.roles.add("441276956089122836") // Add First Year - interaction.member.roles.remove("441276956089122836") // Remove Foundation Year + interaction.member.roles.remove("974754114296741948") // Remove Foundation Year interaction.member.roles.remove("441276979514441741") // Remove Second Year interaction.member.roles.remove("441277048003100684") // Remove Year In Industry Year interaction.member.roles.remove("441277001744121856") // Remove Third Year @@ -104,9 +104,21 @@ client.on("interactionCreate", async (interaction) => { interaction.member.roles.remove("460435898660683778") // Remove PhD Year interaction.member.roles.remove("441277481488613386") // Remove Graduate Year } + else if(interaction.values.includes("2")) + { + interaction.member.roles.add("441276979514441741") // Add Second Year + interaction.member.roles.remove("974754114296741948") // Remove Foundation Year + interaction.member.roles.remove("441276956089122836") // Remove First Year + interaction.member.roles.remove("441277048003100684") // Remove Year In Industry Year + interaction.member.roles.remove("441277001744121856") // Remove Third Year + interaction.member.roles.remove("441277023873138743") // Remove Masters Year + interaction.member.roles.remove("460435898660683778") // Remove PhD Year + interaction.member.roles.remove("441277481488613386") // Remove Graduate Year + } + await interaction.reply({ content: 'Roles have been updated', ephemeral: true}); } } }) \ No newline at end of file