for coded
diff --git a/src/commands/settings/tickets.ts b/src/commands/settings/tickets.ts
index 33e1586..2c2b806 100644
--- a/src/commands/settings/tickets.ts
+++ b/src/commands/settings/tickets.ts
@@ -1,18 +1,24 @@
import { CommandInteraction } from "discord.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { WrappedCheck } from "jshaiku";
+import { ChannelType } from 'discord-api-types';
const command = (builder: SlashCommandSubcommandBuilder) =>
builder
.setName("tickets")
.setDescription("Shows settings for tickets")
+ .addStringOption(option => option.setName("enabled").setDescription("If users should be able to create tickets | Default yes").setRequired(false)
+ .addChoices([["Yes", "yes"], ["No", "no"]]))
+ .addChannelOption(option => option.setName("category").setDescription("The category where tickets are created").addChannelType(ChannelType.GuildCategory).setRequired(false))
+ .addNumberOption(option => option.setName("maxtickets").setDescription("The maximum amount of tickets a user can create | Default 5").setRequired(false).setMinValue(1))
+ .addRoleOption(option => option.setName("supportping").setDescription("The role pinged when a ticket is created").setRequired(false))
const callback = (interaction: CommandInteraction) => {
interaction.reply("Command incomplete [settings/tickets]");
}
const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
- return true;
+ return interaction.memberPermissions.has("MANAGE_GUILD");
}
export { command };