blob: e2efcc340d4b8a42d5641d7c2a553f6b96e15d59 [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
Skyler Grey11236ba2022-08-08 21:13:33 +01005const command = (builder: SlashCommandSubcommandBuilder) => builder.setName("close").setDescription("Closes a ticket");
pineafan4f164f32022-02-26 22:07:12 +00006
Skyler Grey1a67e182022-08-04 23:05:44 +01007const callback = async (interaction: CommandInteraction): Promise<void> => {
pineafan377794f2022-04-18 19:01:01 +01008 await close(interaction);
pineafan63fc5e22022-08-04 22:04:10 +01009};
pineafan4f164f32022-02-26 22:07:12 +000010
Skyler Grey1a67e182022-08-04 23:05:44 +010011const check = () => {
pineafan4f164f32022-02-26 22:07:12 +000012 return true;
pineafan63fc5e22022-08-04 22:04:10 +010013};
pineafan4f164f32022-02-26 22:07:12 +000014
15export { command };
16export { callback };
Skyler Grey1a67e182022-08-04 23:05:44 +010017export { check };