for coded
diff --git a/src/commands/settings/all.ts b/src/commands/settings/all.ts
deleted file mode 100644
index 0f17545..0000000
--- a/src/commands/settings/all.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { CommandInteraction } from "discord.js";
-import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
-import { WrappedCheck } from "jshaiku";
-
-const command = (builder: SlashCommandSubcommandBuilder) =>
- builder
- .setName("all")
- .setDescription("Shows a full UI of all settings")
-
-const callback = (interaction: CommandInteraction) => {
- interaction.reply("Command incomplete [settings/all]");
-}
-
-const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
- return true;
-}
-
-export { command };
-export { callback };
-export { check };
\ No newline at end of file
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 };