blob: 2c2b8064153bd4a32091778e3e7c6e83e2c6c14e [file] [log] [blame]
pineafan4f164f32022-02-26 22:07:12 +00001import { CommandInteraction } from "discord.js";
2import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
3import { WrappedCheck } from "jshaiku";
pineafan1dc15722022-03-14 21:27:34 +00004import { ChannelType } from 'discord-api-types';
pineafan4f164f32022-02-26 22:07:12 +00005
6const command = (builder: SlashCommandSubcommandBuilder) =>
7 builder
8 .setName("tickets")
9 .setDescription("Shows settings for tickets")
pineafan1dc15722022-03-14 21:27:34 +000010 .addStringOption(option => option.setName("enabled").setDescription("If users should be able to create tickets | Default yes").setRequired(false)
11 .addChoices([["Yes", "yes"], ["No", "no"]]))
12 .addChannelOption(option => option.setName("category").setDescription("The category where tickets are created").addChannelType(ChannelType.GuildCategory).setRequired(false))
13 .addNumberOption(option => option.setName("maxtickets").setDescription("The maximum amount of tickets a user can create | Default 5").setRequired(false).setMinValue(1))
14 .addRoleOption(option => option.setName("supportping").setDescription("The role pinged when a ticket is created").setRequired(false))
pineafan4f164f32022-02-26 22:07:12 +000015
16const callback = (interaction: CommandInteraction) => {
17 interaction.reply("Command incomplete [settings/tickets]");
18}
19
20const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
pineafan1dc15722022-03-14 21:27:34 +000021 return interaction.memberPermissions.has("MANAGE_GUILD");
pineafan4f164f32022-02-26 22:07:12 +000022}
23
24export { command };
25export { callback };
26export { check };