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);
}
}