blob: c44e5763fb29885a6750f2b62a59a3eb9cf581e3 [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";
pineafan377794f2022-04-18 19:01:01 +01004import create from "../../automations/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 };