aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlee <alee14498@gmail.com>2018-02-23 21:09:52 -0500
committerAlee <alee14498@gmail.com>2018-02-23 21:09:52 -0500
commit722097790e7fa7f3b8868ad6e097996a27c2c5c5 (patch)
tree7ce08d19e460373428af1be412c218830690df65
parent4bfd57f73dbdf8e1d5ecbbc8c2b89b91c2e9fba0 (diff)
downloadPokeBot-722097790e7fa7f3b8868ad6e097996a27c2c5c5.tar.gz
PokeBot-722097790e7fa7f3b8868ad6e097996a27c2c5c5.tar.bz2
PokeBot-722097790e7fa7f3b8868ad6e097996a27c2c5c5.zip
Added on what the is playing
-rw-r--r--bot.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/bot.js b/bot.js
index c30b615..d0b26e1 100644
--- a/bot.js
+++ b/bot.js
@@ -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) => {