From 4a4841f22f26a4c0d92009883dcccd597984c250 Mon Sep 17 00:00:00 2001 From: Alee Date: Sun, 22 Apr 2018 18:20:52 -0400 Subject: Channels command for console --- bot.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bot.js') diff --git a/bot.js b/bot.js index 0bc043d..ad413ab 100644 --- a/bot.js +++ b/bot.js @@ -110,6 +110,17 @@ rl.on('line', function(cmd){ } } break; + case "channels": + if (!args[1]) { + console.log('[!] Please insert the guild\'s ID.') + } else { + var guild = client.guilds.get(args[1]); + console.log('[i] Here\'s the channels that this guild have:') + for ([id, channel, guild] of guild && client.channels) { + console.log(` Channel: #${channel.name} - ID: ${channel.id}`); + } + } + break; case "leave": if (!args[1]) { console.log('[!] Please insert the guild\'s ID.'); -- cgit v1.2.3