2022-05-12 01:03:23 +01:00
|
|
|
const client = require("../index");
|
|
|
|
const discord = require('discord.js');
|
|
|
|
|
|
|
|
client.on('modalSubmitInteraction', async (interaction) => {
|
|
|
|
if(interaction.customId === 'modal-paidmember'){
|
2022-05-13 19:55:08 +01:00
|
|
|
const execchannel = client.channels.cache.get('974268736079015956')
|
2022-05-12 01:03:23 +01:00
|
|
|
|
|
|
|
const embed = new discord.MessageEmbed()
|
|
|
|
.setTitle("New Paid Member Request")
|
|
|
|
.setColor('GREEN')
|
|
|
|
.addField('Discord Tag', `${ interaction.user}`)
|
|
|
|
.addField('Student Name', `${ interaction.fields.getTextInputValue("studentname")}`)
|
|
|
|
.addField('Student Number',`${ interaction.fields.getTextInputValue("studentnumber")}`)
|
2022-05-13 01:48:11 +01:00
|
|
|
const row = new discord.MessageActionRow()
|
2022-05-13 12:11:05 +01:00
|
|
|
.addComponents(
|
|
|
|
new discord.MessageButton()
|
|
|
|
.setCustomId('addrole')
|
|
|
|
.setEmoji('')
|
|
|
|
.setLabel('Add Role')
|
|
|
|
.setStyle('SUCCESS')
|
|
|
|
)
|
2022-05-13 01:48:11 +01:00
|
|
|
.addComponents(
|
|
|
|
new discord.MessageButton()
|
2022-05-13 12:06:40 +01:00
|
|
|
.setCustomId('deletemessage')
|
2022-05-13 01:48:11 +01:00
|
|
|
.setEmoji('')
|
2022-05-13 10:36:08 +01:00
|
|
|
.setLabel('Delete Message')
|
2022-05-13 01:48:11 +01:00
|
|
|
.setStyle('DANGER')
|
|
|
|
)
|
2022-05-13 10:36:08 +01:00
|
|
|
execchannel.send({embeds: [embed], components: [row] });
|
2022-05-12 01:03:23 +01:00
|
|
|
await interaction.deferReply({ ephemeral: true })
|
|
|
|
interaction.followUp({ content: 'Your request has been sent to execs!', ephemeral: true })
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|