COMMAND REGISTRATION WORKS
diff --git a/src/commands/settings/logs/_meta.ts b/src/commands/settings/logs/_meta.ts
index fadff33..24a1e54 100644
--- a/src/commands/settings/logs/_meta.ts
+++ b/src/commands/settings/logs/_meta.ts
@@ -1,4 +1,8 @@
+import { group } from "../../../utils/commandRegistration/slashCommandBuilder.js";
+
const name = "logs";
const description = "Settings for logging";
-export { name, description };
+const subcommand = await group(name, description, `settings/logs`)
+
+export { name, description, subcommand as command};
diff --git a/src/commands/settings/logs/attachment.ts b/src/commands/settings/logs/attachment.ts
index 38f66fb..7d4fef3 100644
--- a/src/commands/settings/logs/attachment.ts
+++ b/src/commands/settings/logs/attachment.ts
@@ -4,8 +4,7 @@
import EmojiEmbed from "../../../utils/generateEmojiEmbed.js";
import confirmationMessage from "../../../utils/confirmationMessage.js";
import getEmojiByName from "../../../utils/getEmojiByName.js";
-import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
-import { WrappedCheck } from "jshaiku";
+import type { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import client from "../../../utils/client.js";
const command = (builder: SlashCommandSubcommandBuilder) =>
@@ -16,7 +15,7 @@
option
.setName("channel")
.setDescription("The channel to log attachments in")
- .addChannelTypes([ChannelType.GuildNews, ChannelType.GuildText])
+ .addChannelTypes(ChannelType.GuildText)
.setRequired(false)
);
@@ -189,7 +188,7 @@
});
};
-const check = (interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
+const check = (interaction: CommandInteraction) => {
const member = interaction.member as Discord.GuildMember;
if (!member.permissions.has("MANAGE_GUILD"))
throw new Error("You must have the *Manage Server* permission to use this command");
diff --git a/src/commands/settings/logs/channel.ts b/src/commands/settings/logs/channel.ts
index a06198d..0288bf7 100644
--- a/src/commands/settings/logs/channel.ts
+++ b/src/commands/settings/logs/channel.ts
@@ -5,7 +5,6 @@
import confirmationMessage from "../../../utils/confirmationMessage.js";
import getEmojiByName from "../../../utils/getEmojiByName.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
-import { WrappedCheck } from "jshaiku";
import client from "../../../utils/client.js";
const command = (builder: SlashCommandSubcommandBuilder) =>
@@ -16,7 +15,7 @@
option
.setName("channel")
.setDescription("The channel to set the log channel to")
- .addChannelTypes([ChannelType.GuildNews, ChannelType.GuildText])
+ .addChannelTypes(ChannelType.GuildText)
);
const callback = async (interaction: CommandInteraction): Promise<unknown> => {
@@ -181,7 +180,7 @@
});
};
-const check = (interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
+const check = (interaction: CommandInteraction) => {
const member = interaction.member as Discord.GuildMember;
if (!member.permissions.has("MANAGE_GUILD"))
throw new Error("You must have the *Manage Server* permission to use this command");
diff --git a/src/commands/settings/logs/events.ts b/src/commands/settings/logs/events.ts
index 793d1fa..9eaf25c 100644
--- a/src/commands/settings/logs/events.ts
+++ b/src/commands/settings/logs/events.ts
@@ -1,7 +1,6 @@
import { LoadingEmbed } from "./../../../utils/defaultEmbeds.js";
import Discord, { CommandInteraction, Message, ActionRowBuilder, ButtonBuilder, SelectMenuBuilder, ButtonStyle } from "discord.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
-import { WrappedCheck } from "jshaiku";
import EmojiEmbed from "../../../utils/generateEmojiEmbed.js";
import client from "../../../utils/client.js";
import { toHexArray, toHexInteger } from "../../../utils/calculate.js";
@@ -104,7 +103,7 @@
return;
};
-const check = (interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
+const check = (interaction: CommandInteraction) => {
const member = interaction.member as Discord.GuildMember;
if (!member.permissions.has("MANAGE_GUILD"))
throw new Error("You must have the *Manage Server* permission to use this command");
diff --git a/src/commands/settings/logs/staff.ts b/src/commands/settings/logs/staff.ts
index 44b8d69..c1b2380 100644
--- a/src/commands/settings/logs/staff.ts
+++ b/src/commands/settings/logs/staff.ts
@@ -5,8 +5,6 @@
import confirmationMessage from "../../../utils/confirmationMessage.js";
import getEmojiByName from "../../../utils/getEmojiByName.js";
import type { SlashCommandSubcommandBuilder } from "@discordjs/builders";
-// @ts-expect-error
-import type { WrappedCheck } from "jshaiku";
import client from "../../../utils/client.js";
const command = (builder: SlashCommandSubcommandBuilder) =>
@@ -17,7 +15,7 @@
option
.setName("channel")
.setDescription("The channel to set the staff notifications channel to")
- .addChannelTypes([ChannelType.GuildNews, ChannelType.GuildText])
+ .addChannelTypes(ChannelType.GuildText)
.setRequired(false)
);
@@ -187,7 +185,7 @@
});
};
-const check = (interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
+const check = (interaction: CommandInteraction) => {
const member = interaction.member as Discord.GuildMember;
if (!member.permissions.has("MANAGE_GUILD"))
throw new Error("You must have the *Manage Server* permission to use this command");