From 4c742fd4c92f32a34000d924bdbd6ebf4fc63463 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sat, 11 Mar 2023 17:10:21 -0700 Subject: [PATCH] AAA --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 00e0c68..3226d5b 100644 --- a/index.js +++ b/index.js @@ -72,9 +72,13 @@ client.on("ready", async () => { // Automatically leave servers that aren't in the authorized channels list await (async () => { - console.log(`${colors.cyan("[INFO]")} Leaving Servers...`) + let m = false; client.guilds.cache.forEach((guild) => { if (!config.discord.authorized_guilds.includes(guild.id)) { + if (!m) { + console.log(`${colors.cyan("[INFO]")} Leaving unauthorized guilds...`); + m = true; + } guild.leave(); console.log(`${colors.cyan("[INFO]")} Left ${colors.green(guild.name)}`) }