blob: 6567c494cb4e6e19553f4e0bef88d9d0890dbe37 [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
pineafan1dc15722022-03-14 21:27:34 +000012const callback = async (interaction: CommandInteraction) => {
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 };