pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 1 | import { CommandInteraction } from "discord.js"; |
| 2 | import { SlashCommandBuilder } from "@discordjs/builders"; |
| 3 | import { WrappedCheck } from "jshaiku"; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 4 | import { callback as roleMenu } from "../actions/roleMenu.js"; |
pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 5 | |
| 6 | const command = new SlashCommandBuilder() |
| 7 | .setName("rolemenu") |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 8 | .setDescription("Lets you choose from sets of roles to apply to yourself"); |
pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 9 | |
pineafan | bd02b4a | 2022-08-05 22:01:38 +0100 | [diff] [blame] | 10 | const callback = async (interaction: CommandInteraction): Promise<void> => { |
pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 11 | await roleMenu(interaction); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 12 | }; |
pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 13 | |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame^] | 14 | const check = ( |
| 15 | _interaction: CommandInteraction, |
| 16 | _defaultCheck: WrappedCheck |
| 17 | ) => { |
pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 18 | return true; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 19 | }; |
pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 20 | |
| 21 | export { command }; |
| 22 | export { callback }; |
| 23 | export { check }; |