Deploying commands not working.

Deployment function:
async function deployGuildCommands() {
log.info("Deploying Guild Commands...");
if (!process.env.BOT_TOKEN || !bot.application?.id) { log.error("Couldn't deploy commands due to no token or Application ID present."); return; }
const rest = new REST({ version: "10" }).setToken(process.env.BOT_TOKEN || "");
try {
log.info(`Started deploying ${commands.length} application (/) commands.`);
const data = await rest.put(
Routes.applicationGuildCommands(bot.application.id, config.guildID),
{ body: commands.map((cmd) => cmd.toJSON()) },
);
log.success(`Successfully deployed ${0} application (/) commands.`);
} catch (error) {
console.error(error);
}
}
async function deployGuildCommands() {
log.info("Deploying Guild Commands...");
if (!process.env.BOT_TOKEN || !bot.application?.id) { log.error("Couldn't deploy commands due to no token or Application ID present."); return; }
const rest = new REST({ version: "10" }).setToken(process.env.BOT_TOKEN || "");
try {
log.info(`Started deploying ${commands.length} application (/) commands.`);
const data = await rest.put(
Routes.applicationGuildCommands(bot.application.id, config.guildID),
{ body: commands.map((cmd) => cmd.toJSON()) },
);
log.success(`Successfully deployed ${0} application (/) commands.`);
} catch (error) {
console.error(error);
}
}
No description
16 Replies
d.js toolkit
d.js toolkitβ€’6mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - βœ… Marked as resolved by OP
teletvbis_
teletvbis_β€’6mo ago
The client interface:
export interface XeerClient extends Client {
commands: Collection<string, SlashCommand>
}
export interface XeerClient extends Client {
commands: Collection<string, SlashCommand>
}
Versions - Discord.js: discord.js@14.14.1 - Node: v20.10.0
treble/luna
treble/lunaβ€’6mo ago
one of your commands is missing a required property somewhere whether that be name or description, thats up to you to figure out
teletvbis_
teletvbis_β€’6mo ago
is the code right btw?
treble/luna
treble/lunaβ€’6mo ago
looks to be good i just dont see what you expect ${0} to be
teletvbis_
teletvbis_β€’6mo ago
it was data.length and all of my commands have "name" and "description"
treble/luna
treble/lunaβ€’6mo ago
check your options then
teletvbis_
teletvbis_β€’6mo ago
Okay... lot of them had missing descriptions Still, the same problem.
treble/luna
treble/lunaβ€’6mo ago
then one or more does not have a name or description
teletvbis_
teletvbis_β€’6mo ago
now everything has lemme test
teletvbis_
teletvbis_β€’6mo ago
GitHub
GitHub - xeer-bot/xeer: A general-purpose discord bot.
A general-purpose discord bot. Contribute to xeer-bot/xeer development by creating an account on GitHub.
teletvbis_
teletvbis_β€’6mo ago
still the same
treble/luna
treble/lunaβ€’6mo ago
make sure its saved and otherwise you have to recheck
teletvbis_
teletvbis_β€’6mo ago
hmmm ok defo my commands problem it worked with 3 categories okay... one command had duplicate name @polarwolvinny ❄ 🌈 can it be empty btw?
treble/luna
treble/lunaβ€’6mo ago
no
teletvbis_
teletvbis_β€’6mo ago
sad Alright, it got fixed. Ty so much because I literally was thinking about it the whole day. (And I had a headache)