blob: 55962d73099eaff4aeaac3cce520da1fa4cf06e0 [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")
9 .addStringOption(option => option.setName("message").setDescription("The content of the ticket").setRequired(false));
pineafan4f164f32022-02-26 22:07:12 +000010
Skyler Grey1a67e182022-08-04 23:05:44 +010011const callback = async (interaction: CommandInteraction): Promise<void> => {
pineafan63fc5e22022-08-04 22:04:10 +010012 await create(interaction);
13};
pineafan4f164f32022-02-26 22:07:12 +000014
Skyler Grey1a67e182022-08-04 23:05:44 +010015const check = () => {
pineafan4f164f32022-02-26 22:07:12 +000016 return true;
pineafan63fc5e22022-08-04 22:04:10 +010017};
pineafan4f164f32022-02-26 22:07:12 +000018
19export { command };
20export { callback };
Skyler Grey1a67e182022-08-04 23:05:44 +010021export { check };