blob: 3d0b5ce80fe5650b0b10839cce055e1d73424b5c [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) =>
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 };