aboutsummaryrefslogtreecommitdiff
path: root/events/ready.js
diff options
context:
space:
mode:
authorUnknown <jtsshieh@outlook.com>2018-02-24 14:24:42 -0500
committerUnknown <jtsshieh@outlook.com>2018-02-24 14:24:42 -0500
commitb93ce2f771cfae601794739f9c2355f3d9ced577 (patch)
treed4ffadd7d0ecbbf48eb4a6955e2dbdc01659093f /events/ready.js
parent6f510d3f3e8eeece0ed6c624ea6c8e87732d64f3 (diff)
downloadPokeBot-b93ce2f771cfae601794739f9c2355f3d9ced577.tar.gz
PokeBot-b93ce2f771cfae601794739f9c2355f3d9ced577.tar.bz2
PokeBot-b93ce2f771cfae601794739f9c2355f3d9ced577.zip
all events in seperate files
Diffstat (limited to 'events/ready.js')
-rw-r--r--events/ready.js23
1 files changed, 23 insertions, 0 deletions
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);
+};