blob: 91442b5b3d91321ffca276fcee7723c36ec431a3 [file] [log] [blame]
PineaFan5bea7e12023-01-05 21:20:04 +00001import type { CommandInteraction } from "discord.js";
2import type { 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) =>
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
Skyler Grey1a67e182022-08-04 23:05:44 +010017const check = () => {
pineafan4f164f32022-02-26 22:07:12 +000018 return true;
pineafan63fc5e22022-08-04 22:04:10 +010019};
pineafan4f164f32022-02-26 22:07:12 +000020
21export { command };
22export { callback };
Skyler Grey1a67e182022-08-04 23:05:44 +010023export { check };