blob: 10ec842ac773d2581ef39bde122495c437eb61b1 [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";
pineafan73a7c4a2022-07-24 10:38:04 +01003import create from "../../actions/tickets/create.js";
pineafan4f164f32022-02-26 22:07:12 +00004
5const command = (builder: SlashCommandSubcommandBuilder) =>
6 builder
pineafan63fc5e22022-08-04 22:04:10 +01007 .setName("create")
8 .setDescription("Creates a new modmail ticket")
Skyler Grey75ea9172022-08-06 10:22:23 +01009 .addStringOption((option) =>
10 option
11 .setName("message")
12 .setDescription("The content of the ticket")
13 .setRequired(false)
14 );
pineafan4f164f32022-02-26 22:07:12 +000015
Skyler Grey1a67e182022-08-04 23:05:44 +010016const callback = async (interaction: CommandInteraction): Promise<void> => {
pineafan63fc5e22022-08-04 22:04:10 +010017 await create(interaction);
18};
pineafan4f164f32022-02-26 22:07:12 +000019
Skyler Grey1a67e182022-08-04 23:05:44 +010020const check = () => {
pineafan4f164f32022-02-26 22:07:12 +000021 return true;
pineafan63fc5e22022-08-04 22:04:10 +010022};
pineafan4f164f32022-02-26 22:07:12 +000023
24export { command };
25export { callback };
Skyler Grey1a67e182022-08-04 23:05:44 +010026export { check };