diff options
| author | Alee <alee14498@gmail.com> | 2018-02-23 21:09:52 -0500 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-02-23 21:09:52 -0500 |
| commit | 722097790e7fa7f3b8868ad6e097996a27c2c5c5 (patch) | |
| tree | 7ce08d19e460373428af1be412c218830690df65 | |
| parent | 4bfd57f73dbdf8e1d5ecbbc8c2b89b91c2e9fba0 (diff) | |
| download | PokeBot-722097790e7fa7f3b8868ad6e097996a27c2c5c5.tar.gz PokeBot-722097790e7fa7f3b8868ad6e097996a27c2c5c5.tar.bz2 PokeBot-722097790e7fa7f3b8868ad6e097996a27c2c5c5.zip | |
Added on what the is playing
| -rw-r--r-- | bot.js | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -7,6 +7,24 @@ const fs = require('fs'); bot.commands = new Discord.Collection(); bot.aliases = new Discord.Collection(); +function setGame() { + var games = [ + "Pokemon", + "Catching things", + "Finding pokemons", + "Type p: for help" + ] + + bot.user.setPresence({ + status: 'online', + afk: false, + game: { + type: 0, + name: games[Math.floor(Math.random() * games.length)] + } + }) +} + fs.readdir('./commands', (err, files) => { if (err) console.error(err); console.log(`Attempting to load a total of ${files.length} commands into the memory.`); @@ -31,6 +49,8 @@ fs.readdir('./commands', (err, files) => { bot.on('ready', () => { console.log('PokeBot has finished loading.'); + setGame(); + bot.setInterval(setGame, 200000); }); bot.on('guildMemberAdd', (member) => { |
