'How do I list all servers in a discord.js v12 bot
I'm trying to make a command so when you go ;listservers it brings a list of current servers the bot is in but my code is sending servers one at a time making it really slow is there anyway I could fix this? this is my current code
message.channel.send(`Found ${client.guilds.cache.size} servers\nServer List:`)
client.guilds.cache.forEach(guild => {
message.channel.send(`${guild.name} | ${guild.id}`)
})
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
