When I try to access client.guilds
, I receive an unfamiliar object that I am struggling to interpret.
Object:
GuildManager {
cacheType: [Function: Collection],
cache: Collection(1) [Map] {
'11111111111111111' => Guild {
// Guild information here
}
}
}
I am finding it challenging to extract the names of the servers I am connected to from this object. Currently, I am connected to only one server, but there will be more in the future. Ideally, I would like to be able to do the following:
client.guilds.forEach(server => {
console.log(guild.name+" id: "+guild.id);
});