COMMAND REGISTRATION WORKS
diff --git a/src/commands/role/_meta.ts b/src/commands/role/_meta.ts
index c5936c9..f546d51 100644
--- a/src/commands/role/_meta.ts
+++ b/src/commands/role/_meta.ts
@@ -1,4 +1,8 @@
+import { command } from "../../utils/commandRegistration/slashCommandBuilder.js";
+
const name = "role";
const description = "Change roles for users";
-export { name, description };
+const subcommand = await command(name, description, `role`);
+
+export { name, description, subcommand as command };
diff --git a/src/commands/role/user.ts b/src/commands/role/user.ts
index bdadd9d..ac94b47 100644
--- a/src/commands/role/user.ts
+++ b/src/commands/role/user.ts
@@ -1,6 +1,5 @@
import { CommandInteraction, GuildMember, Role } from "discord.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
-import { WrappedCheck } from "jshaiku";
import client from "../../utils/client.js";
import confirmationMessage from "../../utils/confirmationMessage.js";
import keyValueList from "../../utils/generateKeyValueList.js";
@@ -21,10 +20,10 @@
.setName("action")
.setDescription("The action to perform")
.setRequired(true)
- .addChoices([
- ["Add", "give"],
- ["Remove", "remove"]
- ])
+ .addChoices(
+ {name: "Add", value: "give"},
+ {name: "Remove", value: "remove"}
+ )
);
const callback = async (interaction: CommandInteraction): Promise<unknown> => {
@@ -91,7 +90,7 @@
}
};
-const check = (interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
+const check = (interaction: CommandInteraction) => {
const member = interaction.member as GuildMember;
const me = interaction.guild.me!;
const apply = interaction.options.getMember("user") as GuildMember | null;