blob: b9a0dc67020e1f90b76051165b91a97e7da750e8 [file] [log] [blame]
PineaFan5bea7e12023-01-05 21:20:04 +00001import type { CommandInteraction } from "discord.js";
TheCodedProff86ba092023-01-27 17:10:07 -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 +000017export { command };
18export { callback };