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 | |
pineafan | bd02b4a | 2022-08-05 22:01:38 +0100 | [diff] [blame^] | 14 | const check = (_interaction: CommandInteraction, _defaultCheck: WrappedCheck) => { |
pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 15 | return true; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 16 | }; |
pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 17 | |
| 18 | export { command }; |
| 19 | export { callback }; |
| 20 | export { check }; |