From 58860ba1fe4672ff9102d32e5b1f068401bb5b12 Mon Sep 17 00:00:00 2001 From: kieranrobson Date: Fri, 13 May 2022 12:11:05 +0100 Subject: [PATCH] Set up for add role button --- events/interactionCreate.js | 5 +++++ events/modalSubmitInteraction.js | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/events/interactionCreate.js b/events/interactionCreate.js index 14f785f..2c9c816 100644 --- a/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -78,6 +78,11 @@ client.on("interactionCreate", async (interaction) => { await interaction.reply({ content: 'Message has been deleted', ephemeral: true}); } + if(interaction.customId == "addrole") + { + + } + diff --git a/events/modalSubmitInteraction.js b/events/modalSubmitInteraction.js index f825c73..fea6a10 100644 --- a/events/modalSubmitInteraction.js +++ b/events/modalSubmitInteraction.js @@ -12,6 +12,13 @@ client.on('modalSubmitInteraction', async (interaction) => { .addField('Student Name', `${ interaction.fields.getTextInputValue("studentname")}`) .addField('Student Number',`${ interaction.fields.getTextInputValue("studentnumber")}`) const row = new discord.MessageActionRow() + .addComponents( + new discord.MessageButton() + .setCustomId('addrole') + .setEmoji('') + .setLabel('Add Role') + .setStyle('SUCCESS') + ) .addComponents( new discord.MessageButton() .setCustomId('deletemessage')