blob: 64dc9803e76f888f68eda51f8f2dedef2121ad15 [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) => {
pineafan377794f2022-04-18 19:01:01 +010017 interaction.reply("This command is not yet finished [settings/tickets]");
pineafan4f164f32022-02-26 22:07:12 +000018}
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 };