diff --git a/commands/search/pokedex.js b/commands/search/pokedex.js index 3b8e0fab..eb34b131 100644 --- a/commands/search/pokedex.js +++ b/commands/search/pokedex.js @@ -43,6 +43,9 @@ module.exports = class PokedexCommand extends Command { location2 = 'foomoon'; } try { + index = index.toString(); + const pad = '000'.slice(index.length); + index = `${pad}${index}`; const response = await snekfetch .get(`http://www.serebii.net/pokedex-${dex}/${index}.shtml`); const $ = cheerio.load(response.text);