Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //check guilds
- client.on('ready', () => {
- console.log(`Logged in as ${client.user.tag}`);
- const guildIds = client.guilds.cache.map(guild => guild.id);
- const guildNames = [];
- guildIds.forEach(guildId => {
- const guild = client.guilds.cache.get(guildId);
- if (guild) {
- console.log("+", guild.name, "+")
- console.log("ID:", guild.id)
- console.log("Owner:", guild.ownerId)
- console.log("Member Count:", guild.memberCount)
- console.log("Afk Channel")
- } else {
- console.log(`Bot is not a member of the guild with ID ${guildId}`);
- }
- });
- console.log(`Guild Names: ${guildNames.join(', ')}`);
- });
Advertisement
Add Comment
Please, Sign In to add comment