VoidKaz
VoidKaz
DIAdiscord.js - Imagine an app
Created by VoidKaz on 11/3/2024 in #djs-questions
Obtaining Guild Name Doesn't Seem To Work v13.4.
Hi, I have returned to a year old bot and it seems that a function about getting and listing all guilds isn't detecting any guilds attached. When checked about length it is equal to 0. The function in question:
module.exports = async (message) => {

let guilds = await message.client.guilds.cache.values();
let guildNames = ''
for (let i = 0; i < guilds.length; i++) {
guildNames = guilds[i].name + "\n"
}
console.log(guildNames)
return
}
module.exports = async (message) => {

let guilds = await message.client.guilds.cache.values();
let guildNames = ''
for (let i = 0; i < guilds.length; i++) {
guildNames = guilds[i].name + "\n"
}
console.log(guildNames)
return
}
9 replies