blob: ed27abc07c50eadcb8ffb104e1ecac50f7e5b848 [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 close from "../../actions/tickets/delete.js";
pineafan4f164f32022-02-26 22:07:12 +00004
5const command = (builder: SlashCommandSubcommandBuilder) =>
6 builder
pineafan63fc5e22022-08-04 22:04:10 +01007 .setName("close")
8 .setDescription("Closes a ticket");
pineafan4f164f32022-02-26 22:07:12 +00009
Skyler Grey1a67e182022-08-04 23:05:44 +010010const callback = async (interaction: CommandInteraction): Promise<void> => {
pineafan377794f2022-04-18 19:01:01 +010011 await close(interaction);
pineafan63fc5e22022-08-04 22:04:10 +010012};
pineafan4f164f32022-02-26 22:07:12 +000013
Skyler Grey1a67e182022-08-04 23:05:44 +010014const check = () => {
pineafan4f164f32022-02-26 22:07:12 +000015 return true;
pineafan63fc5e22022-08-04 22:04:10 +010016};
pineafan4f164f32022-02-26 22:07:12 +000017
18export { command };
19export { callback };
Skyler Grey1a67e182022-08-04 23:05:44 +010020export { check };