diff options
| author | Alee <alee14498@gmail.com> | 2018-08-01 22:59:21 -0400 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-08-01 22:59:21 -0400 |
| commit | b18fb14b4e1618327037deeb0582d201f7ca999a (patch) | |
| tree | 4bd015ad17a70c4e12a09dfb00befd4212c371bf /bot.js | |
| parent | ad5ced94e9212fff66877a8abc393b6996bde934 (diff) | |
| download | PokeBot-b18fb14b4e1618327037deeb0582d201f7ca999a.tar.gz PokeBot-b18fb14b4e1618327037deeb0582d201f7ca999a.tar.bz2 PokeBot-b18fb14b4e1618327037deeb0582d201f7ca999a.zip | |
readline changes
Diffstat (limited to 'bot.js')
| -rw-r--r-- | bot.js | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -96,11 +96,11 @@ rl.on('line', function(cmd){ var args = cmd.split(" "); switch(args[0]) { case "guilds": - if (client.guilds.size === 0) { + if (bot.guilds.size === 0) { console.log(('[!] No guilds found.')); } else { console.log('[i] Here\'s the servers that Galaxy is connected to:') - for ([id, guild] of client.guilds) { + for ([id, guild] of bot.guilds) { console.log(` Guild Name: ${guild.name} - ID: ${guild.id}`); } } @@ -109,9 +109,9 @@ rl.on('line', function(cmd){ if (!args[1]) { console.log('[!] Please insert the guild\'s ID.') } else { - var guild = client.guilds.get(args[1]); + var guild = bot.guilds.get(args[1]); console.log('[i] Here\'s the channels that this guild have:') - for ([id, channel, guild] of guild && client.channels) { + for ([id, channel, guild] of guild && bot.channels) { console.log(` Channel: #${channel.name} - ID: ${channel.id}`); } } @@ -120,7 +120,7 @@ rl.on('line', function(cmd){ if (!args[1]) { console.log('[!] Please insert the guild\'s ID.'); } else { - var guild = client.guilds.get(args[1]); + var guild = bot.guilds.get(args[1]); guild.leave(); } break; @@ -130,7 +130,7 @@ rl.on('line', function(cmd){ } else { let broadcast = args.join(" ").slice(48); var guild = null; - guild = client.guilds.get(args[1]); + guild = bot.guilds.get(args[1]); var channel = null; channel = guild.channels.get(args[2]) if (channel != null) { @@ -139,7 +139,7 @@ rl.on('line', function(cmd){ } break; case "uptime": - let uptime = parseInt(client.uptime); + let uptime = parseInt(bot.uptime); uptime = Math.floor(uptime / 1000); let uptimeMinutes = Math.floor(uptime / 60); const minutes = uptime % 60; @@ -167,7 +167,7 @@ rl.on('line', function(cmd){ console.log(msg); break; default: - console.log('Unknown command, type \'help\' to list the commands...'.yellow) + console.log('Unknown command, type \'help\' to list the commands...') } rl.prompt(); }); |
