blob: 2f3ddc65951986c9c7119784728c93a8c7256af9 [file] [log] [blame]
PineaFan5bea7e12023-01-05 21:20:04 +00001import type { CommandInteraction } from "discord.js";
Samuel Shuert27bf3cd2023-03-03 15:51:25 -05002import type { SlashCommandSubcommandBuilder } from "discord.js";
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) =>
Skyler Grey11236ba2022-08-08 21:13:33 +010010 option.setName("message").setDescription("The content of the ticket").setRequired(false)
Skyler Grey75ea9172022-08-06 10:22:23 +010011 );
pineafan4f164f32022-02-26 22:07:12 +000012
Skyler Grey1a67e182022-08-04 23:05:44 +010013const callback = async (interaction: CommandInteraction): Promise<void> => {
pineafan63fc5e22022-08-04 22:04:10 +010014 await create(interaction);
15};
pineafan4f164f32022-02-26 22:07:12 +000016
pineafan4f164f32022-02-26 22:07:12 +000017
18export { command };
19export { callback };