Getting slash commands
const commandsColl = await client.application.commands.fetch();I use this to get all the commands and then I try to iterate through the collection with
But the terminal doesnt say anything so the for loop never started
const commandsColl = await client.application.commands.fetch(); for (const command in commandsColl) {
//and i do something here
console.log(command);
}npm list discord.js and node node -v version?✅ Marked as resolved by OPinteraction.guild.commands.fetch(); and it fetched nothingfor...of over Collection#values or forEachCollection#map[...collection.values()]for(const command in commandsColl.values())?in it doesn't do anythinginteraction.guild.commands.fetch();for...ofCollection#valuesforEachCollection#map[...collection.values()]for(const command in commandsColl.values())in