aboutsummaryrefslogtreecommitdiff
path: root/bot.js
diff options
context:
space:
mode:
authorAlee <alee14498@gmail.com>2018-04-22 18:20:52 -0400
committerAlee <alee14498@gmail.com>2018-04-22 18:20:52 -0400
commit4a4841f22f26a4c0d92009883dcccd597984c250 (patch)
tree4b7bf2f0a77b5132b54b853dc25789ba274c24b5 /bot.js
parent872776a4f8270d1a57aba6391c9e175558b96b64 (diff)
downloadPokeBot-4a4841f22f26a4c0d92009883dcccd597984c250.tar.gz
PokeBot-4a4841f22f26a4c0d92009883dcccd597984c250.tar.bz2
PokeBot-4a4841f22f26a4c0d92009883dcccd597984c250.zip
Channels command for console
Diffstat (limited to 'bot.js')
-rw-r--r--bot.js11
1 files changed, 11 insertions, 0 deletions
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.');