Weird slash command registering problem
Hello, i'm having a weird issue where not logging (console.log) the result of
Not working:
Working:
}
rest.putrest.put does not register the slash commandNot working:
for (const [guild, commands] of Object.entries(guildCommands)) {
console.log(chalk.cyan(`Started reloading "${guild}" (/)`));
const data = await rest.put(
Routes.applicationGuildCommands(config.clientId, guild),
{ body: commands },
);
console.log(chalk.green(`Reloaded ${commands.length} commands for "${guild}"`))
}for (const [guild, commands] of Object.entries(guildCommands)) {
console.log(chalk.cyan(`Started reloading "${guild}" (/)`));
const data = await rest.put(
Routes.applicationGuildCommands(config.clientId, guild),
{ body: commands },
);
console.log(chalk.green(`Reloaded ${commands.length} commands for "${guild}"`))
}Working:
for (const [guild, commands] of Object.entries(guildCommands)) {
console.log(chalk.cyan(`Started reloading "${guild}" (/)`));
const data = await rest.put(
Routes.applicationGuildCommands(config.clientId, guild),
{ body: commands },
);
console.log(data) // here
console.log(chalk.green(`Reloaded ${commands.length} commands for "${guild}"`))for (const [guild, commands] of Object.entries(guildCommands)) {
console.log(chalk.cyan(`Started reloading "${guild}" (/)`));
const data = await rest.put(
Routes.applicationGuildCommands(config.clientId, guild),
{ body: commands },
);
console.log(data) // here
console.log(chalk.green(`Reloaded ${commands.length} commands for "${guild}"`))}