This commit is contained in:
Dragon Fire
2021-01-20 18:05:18 -05:00
parent 1dca3ae20b
commit 4659409f06
3 changed files with 11 additions and 3 deletions
+3
View File
@@ -96,6 +96,9 @@
}
],
"moveSetVersion": "red-blue",
"smogonTiers": {
"rb": ["Anything Goes"]
},
"encounters": [],
"chain": [0],
"missingno": true,
+7 -2
View File
@@ -2,6 +2,11 @@ const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const { stripIndents } = require('common-tags');
const { list } = require('../../util/Util');
const games = {
rb: 'Red/Blue',
sm: 'Sun/Moon',
ss: 'Sword/Shield'
};
module.exports = class PokedexCommand extends Command {
constructor(client) {
@@ -54,7 +59,7 @@ module.exports = class PokedexCommand extends Command {
const data = await this.client.pokemon.fetch(pokemon);
if (!data) return msg.say('Could not find any results.');
if (!data.gameDataCached) await data.fetchGameData();
const game = data.id > 807 ? 'ss' : 'sm';
const game = data.missingno ? 'rb' : data.id > 807 ? 'ss' : 'sm';
if (!data.smogonTiers[game]) await data.fetchSmogonTiers(game);
const displayForms = data.varieties.filter(vrity => vrity.statsDiffer);
const variety = displayForms.find(vrity => {
@@ -91,7 +96,7 @@ module.exports = class PokedexCommand extends Command {
\`Total: [${'█'.repeat(repeat.total)}${' '.repeat(20 - repeat.total)}]\` **${statTotal}**
`)
.addField(' Abilities', variety.abilities.join('/'))
.addField(' Smogon Tiers', `[${data.smogonTiers[game].join('/')}](${data.smogonURL})`)
.addField(' Smogon Tiers', `[${data.smogonTiers[game].join('/')}](${data.smogonURL}) (${games[game]})`)
.addField(' Other Forms', stripIndents`
_Use ${this.usage(`${data.id} <form>`)} to get stats for another form._
+1 -1
View File
@@ -139,7 +139,7 @@ module.exports = class Pokemon {
}
get smogonURL() {
if (this.missingno) return null;
if (this.missingno) return missingno.url;
return `https://www.smogon.com/dex/${this.id > 807 ? 'ss' : 'sm'}/pokemon/${this.slug}/`;
}