Skyler Turner | 66ac794 | 2022-02-24 01:59:22 +0000 | [diff] [blame] | 1 | import { CommandInteraction } from "discord.js"; |
| 2 | import { SlashCommandBuilder } from "@discordjs/builders"; |
| 3 | import { WrappedCheck } from "jshaiku"; |
| 4 | |
| 5 | const command = new SlashCommandBuilder() |
| 6 | .setName("examplecommand") |
| 7 | .setDescription("An example command") |
| 8 | |
| 9 | const callback = (interaction: CommandInteraction) => { |
| 10 | interaction.reply("Hello, world!"); |
| 11 | } |
| 12 | |
| 13 | const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => { |
| 14 | return interaction.user.id !== "123456789"; |
| 15 | } |
| 16 | |
| 17 | export { command }; |
| 18 | export { callback }; |
| 19 | export { check }; |