Added verify message btn
This commit is contained in:
@@ -28,6 +28,15 @@ module.exports = {
|
||||
.setName("channel")
|
||||
.setDescription("The channel to send the application to.")
|
||||
.setRequired(true)))
|
||||
.addSubcommand((subcommand) =>
|
||||
subcommand
|
||||
.setName("sendverfiymessage")
|
||||
.setDescription("Send the verfiy message to a channel.")
|
||||
.addChannelOption((option) =>
|
||||
option
|
||||
.setName("channel")
|
||||
.setDescription("The channel to send the verfiy message to.")
|
||||
.setRequired(true)))
|
||||
.addSubcommand((subcommand) =>
|
||||
subcommand
|
||||
.setName("sendinactivityapplication")
|
||||
@@ -155,8 +164,36 @@ module.exports = {
|
||||
await interaction.reply({ content: "Message sent", ephemeral: true });
|
||||
}
|
||||
|
||||
if (subcommand === "sendverfiymessage") {
|
||||
const channel = interaction.options.getChannel("channel");
|
||||
|
||||
await channel.send({
|
||||
embeds: [{
|
||||
title: "Verification",
|
||||
description: "You can verify by clicking the button below.",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild.name + " | Developed by @Taken#0002",
|
||||
iconURL: interaction.guild.iconURL({ dynamic: true })
|
||||
},
|
||||
thumbnail: {
|
||||
url: interaction.guild.iconURL({ dynamic: true })
|
||||
}
|
||||
}],
|
||||
components: [
|
||||
new ActionRowBuilder()
|
||||
.addComponents(new ButtonBuilder()
|
||||
.setCustomId("verifybutton")
|
||||
.setLabel("Verify")
|
||||
.setStyle(ButtonStyle.Primary)
|
||||
.setEmoji({ name: "✅" }))
|
||||
]
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (subcommand !== "sendguildinfo" || "sendrequirements" || "sendrules-info") {
|
||||
await interaction.reply({ content: "In development.", ephemeral: true });
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
28
events/buttons/verify.js
Normal file
28
events/buttons/verify.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require('discord.js')
|
||||
const { color } = require('../config/options.json')
|
||||
|
||||
module.exports = {
|
||||
name: 'verify',
|
||||
description: 'Configure the bot.',
|
||||
type: 'btn',
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle("Verification")
|
||||
.setCustomId("verifybox")
|
||||
.setComponents(
|
||||
new ActionRowBuilder().setComponents(
|
||||
new TextInputBuilder()
|
||||
.setLabel("IGN")
|
||||
.setCustomId("verifyfield")
|
||||
.setStyle(TextInputStyle.Short)
|
||||
.setPlaceholder("Enter your ign.")
|
||||
.setRequired(true)
|
||||
.setMinLength(3)
|
||||
.setMaxLength(16)
|
||||
)
|
||||
)
|
||||
await interaction.showModal(modal)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user