Updated buttons and etc to components folder
This commit is contained in:
32
src/components/buttons/verify.ts
Normal file
32
src/components/buttons/verify.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import {
|
||||
ModalBuilder,
|
||||
ActionRowBuilder,
|
||||
TextInputBuilder,
|
||||
TextInputStyle,
|
||||
} from "discord.js"
|
||||
import { Button } from "../../interfaces"
|
||||
|
||||
export = {
|
||||
name: "verify",
|
||||
description: "Configure the bot.",
|
||||
type: "button",
|
||||
|
||||
async execute(interaction) {
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle("Verification")
|
||||
.setCustomId("verifybox")
|
||||
.setComponents(
|
||||
new ActionRowBuilder<TextInputBuilder>().setComponents(
|
||||
new TextInputBuilder()
|
||||
.setLabel("IGN")
|
||||
.setCustomId("verifyign")
|
||||
.setStyle(TextInputStyle.Short)
|
||||
.setPlaceholder("Enter your ign.")
|
||||
.setRequired(true)
|
||||
.setMinLength(3)
|
||||
.setMaxLength(16),
|
||||
),
|
||||
)
|
||||
await interaction.showModal(modal)
|
||||
},
|
||||
} as Button
|
||||
Reference in New Issue
Block a user