blob: 3d796aa4f111e445a8f3486fbf3a8133225b32c1 [file] [log] [blame]
pineafan377794f2022-04-18 19:01:01 +01001import { CommandInteraction } from "discord.js";
pineafan4f164f32022-02-26 22:07:12 +00002import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
3import { WrappedCheck } from "jshaiku";
pineafan73a7c4a2022-07-24 10:38:04 +01004import create from "../../actions/tickets/create.js";
pineafan4f164f32022-02-26 22:07:12 +00005
6const command = (builder: SlashCommandSubcommandBuilder) =>
7 builder
8 .setName("create")
9 .setDescription("Creates a new modmail ticket")
pineafan1dc15722022-03-14 21:27:34 +000010 .addStringOption(option => option.setName("message").setDescription("The content of the ticket").setRequired(false))
pineafan4f164f32022-02-26 22:07:12 +000011
pineafan4edb7762022-06-26 19:21:04 +010012const callback = async (interaction: CommandInteraction): Promise<any> => {
pineafan377794f2022-04-18 19:01:01 +010013 await create(interaction)
pineafan4f164f32022-02-26 22:07:12 +000014}
15
16const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
17 return true;
18}
19
20export { command };
21export { callback };
22export { check };