From 36630ee89bdf045624d8e96621e588d00f57e0a5 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sat, 26 Oct 2019 09:26:46 -0400 Subject: Added console --- bot.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bot.js b/bot.js index b81da71..93a12ad 100644 --- a/bot.js +++ b/bot.js @@ -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); -- cgit v1.2.3