blob: b3e5351442267860e9fa417927f0ff32d8834c6c [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";
3import { WrappedCheck } from "jshaiku";
pineafan73a7c4a2022-07-24 10:38:04 +01004import close from "../../actions/tickets/delete.js";
pineafan4f164f32022-02-26 22:07:12 +00005
6const command = (builder: SlashCommandSubcommandBuilder) =>
7 builder
pineafan63fc5e22022-08-04 22:04:10 +01008 .setName("close")
9 .setDescription("Closes a ticket");
pineafan4f164f32022-02-26 22:07:12 +000010
pineafan4edb7762022-06-26 19:21:04 +010011const callback = async (interaction: CommandInteraction): Promise<any> => {
pineafan377794f2022-04-18 19:01:01 +010012 await close(interaction);
pineafan63fc5e22022-08-04 22:04:10 +010013};
pineafan4f164f32022-02-26 22:07:12 +000014
15const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
16 return true;
pineafan63fc5e22022-08-04 22:04:10 +010017};
pineafan4f164f32022-02-26 22:07:12 +000018
19export { command };
20export { callback };
21export { check };