diff --git a/src/rolemanager/index.ts b/src/rolemanager/index.ts index 21c5c7c..de09211 100644 --- a/src/rolemanager/index.ts +++ b/src/rolemanager/index.ts @@ -1,5 +1,5 @@ import { ButtonInteraction, Client, GuildMember, Interaction, MessageButton, MessageSelectMenu, SelectMenuInteraction } from "discord.js"; -import { emsg, errorMessage } from "discordslash"; +import { emsg } from "discordslash"; import * as Opt from "../types/Opt"; import { getGuild, getMember } from "../util/discord"; diff --git a/src/rolemanager/slash.ts b/src/rolemanager/slash.ts index 75a02bf..392d9c6 100644 --- a/src/rolemanager/slash.ts +++ b/src/rolemanager/slash.ts @@ -5,9 +5,9 @@ import { RolesAllCommand, RolesCommand } from './commands'; export function initSlash() { - const Categories: OptionChoices[] = InteractionRoles.map((opt, i) => ({ + const Categories: OptionChoices[] = InteractionRoles.map(opt => ({ name: opt.message, - value: i + value: opt.id })); addCommand([ @@ -36,11 +36,13 @@ export function initSlash() { new CommandOptionGenerator() .setName('category') + .setType('string') .setDescription(Lang.get('command.rolesall.description.category')) .addChoice(Categories), new CommandOptionGenerator() .setName('channel') + .setType('channel') .setDescription(Lang.get('command.rolesall.description.command')) ])