pineafan | ad54d75 | 2022-04-18 19:01:43 +0100 | [diff] [blame^] | 1 | import { CommandInteraction, MessageActionRow, MessageButton } from "discord.js"; |
| 2 | import { SlashCommandBuilder } from "@discordjs/builders"; |
| 3 | import { WrappedCheck } from "jshaiku"; |
| 4 | |
| 5 | const command = new SlashCommandBuilder() |
| 6 | .setName("createtestbutton") |
| 7 | .setDescription("creates a test button") |
| 8 | |
| 9 | const callback = (interaction: CommandInteraction) => { |
| 10 | interaction.reply({components: [new MessageActionRow().addComponents([ |
| 11 | new MessageButton() |
| 12 | .setCustomId("createticket") |
| 13 | .setLabel("Create Ticket") |
| 14 | .setStyle("PRIMARY") |
| 15 | .setDisabled(false), |
| 16 | new MessageButton() |
| 17 | .setCustomId("verifybutton") |
| 18 | .setLabel("Verify") |
| 19 | .setStyle("PRIMARY") |
| 20 | .setDisabled(false), |
| 21 | new MessageButton() |
| 22 | .setCustomId("rolemenu") |
| 23 | .setLabel("Get roles") |
| 24 | .setStyle("PRIMARY") |
| 25 | .setDisabled(false) |
| 26 | ])]}); |
| 27 | } |
| 28 | |
| 29 | const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => { |
| 30 | return true; |
| 31 | } |
| 32 | |
| 33 | export { command }; |
| 34 | export { callback }; |
| 35 | export { check }; |