mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Add Abilities
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
"sDef": 6,
|
||||
"spd": 29
|
||||
},
|
||||
"abilities": ["N/A"],
|
||||
"chain": [0],
|
||||
"missingno": true,
|
||||
"sprite": "https://cdn.bulbagarden.net/upload/9/98/Missingno_RB.png",
|
||||
|
||||
@@ -103,7 +103,8 @@ module.exports = class PokedexCommand extends Command {
|
||||
\`Sp. Attack: [${'█'.repeat(repeat.sAtk)}${' '.repeat(20 - repeat.sAtk)}]\` **${data.stats.sAtk}**
|
||||
\`Sp. Defense: [${'█'.repeat(repeat.sDef)}${' '.repeat(20 - repeat.sDef)}]\` **${data.stats.sDef}**
|
||||
\`Speed: [${'█'.repeat(repeat.spd)}${' '.repeat(20 - repeat.spd)}]\` **${data.stats.spd}**
|
||||
`);
|
||||
`)
|
||||
.addField('❯ Abilities', data.abilities.join(' / '));
|
||||
if (data.cry) {
|
||||
const connection = msg.guild ? this.client.voice.connections.get(msg.guild.id) : null;
|
||||
if (connection) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "123.2.1",
|
||||
"version": "123.2.2",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -37,6 +37,7 @@ module.exports = class Pokemon {
|
||||
data: data.missingno ? missingno.chain : data.evolution_chain ? [] : [data.id]
|
||||
};
|
||||
this.stats = data.missingno ? data.stats : null;
|
||||
this.abilities = data.missingno ? data.abilities : null;
|
||||
this.gameDataCached = data.missingno || false;
|
||||
this.missingno = data.missingno || false;
|
||||
this.cry = data.id > store.pokemonCountWithCry
|
||||
@@ -92,6 +93,10 @@ module.exports = class Pokemon {
|
||||
variety.display = true;
|
||||
}
|
||||
}
|
||||
for (const ability of defaultBody.abilities) {
|
||||
const { body } = await request.get(ability.ability.url);
|
||||
this.abilities.push(body.names.find(name => name.language.name === 'en').name);
|
||||
}
|
||||
this.gameDataCached = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user