diff options
| author | Andrew Lee <alee14498@gmail.com> | 2019-10-26 09:26:46 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@gmail.com> | 2019-10-26 09:26:46 -0400 |
| commit | 36630ee89bdf045624d8e96621e588d00f57e0a5 (patch) | |
| tree | e65eed367ea2d5b73d1bec643e5f79590f0112bd /bot.js | |
| parent | 478d86650e02b91ebe4d1bb387d7ef3e7796a019 (diff) | |
| download | PokeBot-36630ee89bdf045624d8e96621e588d00f57e0a5.tar.gz PokeBot-36630ee89bdf045624d8e96621e588d00f57e0a5.tar.bz2 PokeBot-36630ee89bdf045624d8e96621e588d00f57e0a5.zip | |
Added console
Diffstat (limited to 'bot.js')
| -rw-r--r-- | bot.js | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -98,9 +98,7 @@ fs.readdir('./events', (err, files) => { console.log('\n'); }); - - -/*rl.on('line', function(cmd) { +rl.on('line', function(cmd) { const args = cmd.split(' '); switch (args[0]) { case 'guilds': @@ -119,7 +117,7 @@ fs.readdir('./events', (err, files) => { } else { 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}`); } } @@ -151,6 +149,7 @@ fs.readdir('./events', (err, files) => { break; case 'exit': console.log('[i] PokeBot will now exit!'); + bot.user.setStatus('invisible'); process.exit(0); break; case 'help': @@ -167,7 +166,7 @@ fs.readdir('./events', (err, files) => { console.log('Unknown Command type \'help\' to list the commands...'); } rl.prompt(); -});*/ +}); process.on('unhandledRejection', (err) => { console.error(err.stack); |
