error fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { ButtonInteraction, Client, GuildMember, Interaction, MessageButton, MessageSelectMenu, SelectMenuInteraction } from "discord.js";
|
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 * as Opt from "../types/Opt";
|
||||||
import { getGuild, getMember } from "../util/discord";
|
import { getGuild, getMember } from "../util/discord";
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import { RolesAllCommand, RolesCommand } from './commands';
|
|||||||
|
|
||||||
export function initSlash() {
|
export function initSlash() {
|
||||||
|
|
||||||
const Categories: OptionChoices[] = InteractionRoles.map((opt, i) => ({
|
const Categories: OptionChoices[] = InteractionRoles.map(opt => ({
|
||||||
name: opt.message,
|
name: opt.message,
|
||||||
value: i
|
value: opt.id
|
||||||
}));
|
}));
|
||||||
|
|
||||||
addCommand([
|
addCommand([
|
||||||
@@ -36,11 +36,13 @@ export function initSlash() {
|
|||||||
|
|
||||||
new CommandOptionGenerator()
|
new CommandOptionGenerator()
|
||||||
.setName('category')
|
.setName('category')
|
||||||
|
.setType('string')
|
||||||
.setDescription(Lang.get('command.rolesall.description.category'))
|
.setDescription(Lang.get('command.rolesall.description.category'))
|
||||||
.addChoice(Categories),
|
.addChoice(Categories),
|
||||||
|
|
||||||
new CommandOptionGenerator()
|
new CommandOptionGenerator()
|
||||||
.setName('channel')
|
.setName('channel')
|
||||||
|
.setType('channel')
|
||||||
.setDescription(Lang.get('command.rolesall.description.command'))
|
.setDescription(Lang.get('command.rolesall.description.command'))
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user