blob: 25de336336f96c7b279cd2546adbcaf3bc5b669d [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
pineafan63fc5e22022-08-04 22:04:10 +01008 .setName("create")
9 .setDescription("Creates a new modmail ticket")
10 .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> => {
pineafan63fc5e22022-08-04 22:04:10 +010013 await create(interaction);
14};
pineafan4f164f32022-02-26 22:07:12 +000015
16const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
17 return true;
pineafan63fc5e22022-08-04 22:04:10 +010018};
pineafan4f164f32022-02-26 22:07:12 +000019
20export { command };
21export { callback };
22export { check };