mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-09 01:04:16 +02:00
Fix
This commit is contained in:
@@ -76,7 +76,7 @@ module.exports = class PokedexCommand extends Command {
|
|||||||
};
|
};
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setColor(0xED1C24)
|
.setColor(0xED1C24)
|
||||||
.setAuthor(`#${data.displayID} - ${data.name}`, data.boxImageURL, data.serebiiURL)
|
.setAuthor(`#${data.displayID} - ${data.name}`, data.formBoxImageURL(variety.id), data.serebiiURL)
|
||||||
.setThumbnail(data.formSpriteImageURL(variety.id))
|
.setThumbnail(data.formSpriteImageURL(variety.id))
|
||||||
.addField(`❯ Base Stats (${variety.name || 'Base'} Form)`, stripIndents`
|
.addField(`❯ Base Stats (${variety.name || 'Base'} Form)`, stripIndents`
|
||||||
\`HP: [${'█'.repeat(repeat.hp)}${' '.repeat(20 - repeat.hp)}]\` **${variety.stats.hp}**
|
\`HP: [${'█'.repeat(repeat.hp)}${' '.repeat(20 - repeat.hp)}]\` **${variety.stats.hp}**
|
||||||
|
|||||||
@@ -121,6 +121,13 @@ module.exports = class Pokemon {
|
|||||||
return `https://www.serebii.net/pokedex-swsh/icon/${this.displayID}.png`;
|
return `https://www.serebii.net/pokedex-swsh/icon/${this.displayID}.png`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
formBoxImageURL(variety) {
|
||||||
|
if (this.missingno) return missingno.box;
|
||||||
|
const found = this.varieties.find(vrity => variety ? vrity.id === variety.toLowerCase() : vrity.default);
|
||||||
|
const name = found.default ? '' : found.name.toLowerCase().split(' ').map(n => n.charAt(0)).join('');
|
||||||
|
return `https://www.serebii.net/pokedex-swsh/icon/${this.displayID}${name ? `-${name}` : ''}.png`;
|
||||||
|
}
|
||||||
|
|
||||||
get serebiiURL() {
|
get serebiiURL() {
|
||||||
if (this.missingno) return missingno.url;
|
if (this.missingno) return missingno.url;
|
||||||
return `https://www.serebii.net/pokedex-swsh/${this.displayID}.shtml`;
|
return `https://www.serebii.net/pokedex-swsh/${this.displayID}.shtml`;
|
||||||
|
|||||||
Reference in New Issue
Block a user