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