From b93ce2f771cfae601794739f9c2355f3d9ced577 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 24 Feb 2018 14:24:42 -0500 Subject: all events in seperate files --- events/ready.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 events/ready.js (limited to 'events/ready.js') diff --git a/events/ready.js b/events/ready.js new file mode 100644 index 0000000..67ef6ec --- /dev/null +++ b/events/ready.js @@ -0,0 +1,23 @@ +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); +}; -- cgit v1.2.3