You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a bot using v13, but now transitioning to v14 with only 2 active commands: coords and ping.
The coords command has options built in (dimension,x andz, all are required), I just now discovered that the options just disappeared and cannot recognize the options hence crashing the "frontend" bot.
slash-command.js
import { SlashCommandBuilder } from '@discordjs/builders';
import { details, DIMENSION } from './constants.js';
export const slash = new SlashCommandBuilder()
.setName(details.name)
.setDescription(details.description)
.addStringOption(option =>
option.setName('dimension')
.setDescription('The dimension you\'re going to use this coordinate.')
.setRequired(true)
.addChoice('overworld', DIMENSION.overworld)
.addChoice('nether', DIMENSION.nether))
.addIntegerOption(option =>
option.setName('x')
.setDescription('x coordinate')
.setRequired(true))
.addIntegerOption(option =>
option.setName('z')
.setDescription('z coordinate')
.setRequired(true));
Command list on Discord after running the command.
This has been tested in both mobile and web client using Firefox. I'll try and redo this on v14 to see if it gets resolved there.
Note: On the bot permissions, the applications.commands and Use Slash Commands are ticked, I also kicked (by Removing Integrations) and re-added the bot to the same server. I can provide the other files connected to slash commands.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First time using GitHub Discussions.
I have a bot using v13, but now transitioning to v14 with only 2 active commands:
coords
andping
.The
coords
command has options built in (dimension
,x
andz
, all are required), I just now discovered that the options just disappeared and cannot recognize the options hence crashing the "frontend" bot.slash-command.js
I followed this document on deploying slash commands, split into multiple files
Commands when I run a
console.log
.Command list on Discord after running the command.
This has been tested in both mobile and web client using Firefox. I'll try and redo this on v14 to see if it gets resolved there.
Note: On the bot permissions, the
applications.commands
andUse Slash Commands
are ticked, I also kicked (by Removing Integrations) and re-added the bot to the same server. I can provide the other files connected to slash commands.Beta Was this translation helpful? Give feedback.
All reactions