From a2920bc381eef5ced913317b5cb2632980db2529 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Thu, 8 Jul 2021 20:08:36 +0200 Subject: [PATCH] Add guilds command that sends all guild names --- commands/guilds.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 commands/guilds.js diff --git a/commands/guilds.js b/commands/guilds.js new file mode 100644 index 0000000..fbd9012 --- /dev/null +++ b/commands/guilds.js @@ -0,0 +1,11 @@ +module.exports = { + name: 'guilds', + description: 'Returns guild names', + execute({message, client}) { + let guildNames = ""; + client.guilds.cache.each(guild => { + guildNames = guildNames + guild.name + "\n"; + }); + message.channel.send(guildNames) + } +}; \ No newline at end of file