From 3d36bcf0591f2694c3a2472a157ecca0de8d35fc Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 24 Feb 2018 14:28:47 -0500 Subject: Hopefully it works --- events/ready.js | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/events/ready.js b/events/ready.js index 67ef6ec..5115690 100644 --- a/events/ready.js +++ b/events/ready.js @@ -1,23 +1,21 @@ -function setGame(bot) { - const games = [ - 'Pokemon', - 'Catching things', - 'Finding pokemon', - 'Type p:help for help', - 'Fighting AstralMod', - ]; - - bot.user.setPresence({ - status: 'online', - afk: false, - game: { - type: 0, - name: games[Math.floor(Math.random() * games.length)], - }, - }); -} module.exports = (bot) => { console.log('PokeBot has finished loading.'); - setGame(bot); - bot.setInterval(setGame(bot), 200000); + bot.setInterval(function() { + const games = [ + 'Pokemon', + 'Catching things', + 'Finding pokemon', + 'Type p:help for help', + 'Fighting AstralMod', + ]; + + bot.user.setPresence({ + status: 'online', + afk: false, + game: { + type: 0, + name: games[Math.floor(Math.random() * games.length)], + }, + }); + }, 200000); }; -- cgit v1.2.3