From f09fadae763c2029cb8dd5dad3caf69ebcc88577 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 29 Jul 2017 23:45:38 +0000 Subject: [PATCH] Random Pokedex Entries --- commands/search/pokedex.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/search/pokedex.js b/commands/search/pokedex.js index 432ffa3e..8ab8b279 100644 --- a/commands/search/pokedex.js +++ b/commands/search/pokedex.js @@ -49,6 +49,6 @@ module.exports = class PokedexCommand extends Command { } filter(arr) { - return arr.filter(entry => entry.language.name === 'en')[0]; + return arr.filter(entry => entry.language.name === 'en')[Math.floor(Math.random() * arr.length)]; } }; diff --git a/package.json b/package.json index af7db1cb..f5e915e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "28.0.1", + "version": "28.0.2", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {