diff --git a/.gitignore b/.gitignore index e1806d7a..9b1028d8 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ command-leaderboard.json *.traineddata # In-Development Commands +commands/games-mp/domineering.js diff --git a/commands/pokedex/pokedex-ability.js b/commands/pokedex/pokedex-ability.js index b926f4c1..26b6e3d9 100644 --- a/commands/pokedex/pokedex-ability.js +++ b/commands/pokedex/pokedex-ability.js @@ -39,7 +39,7 @@ module.exports = class PokedexAbilityCommand extends Command { const embed = new MessageEmbed() .setColor(0xED1C24) .setTitle(data.name) - .setDescription(data.description); + .setDescription(data.description || 'No description available.'); return msg.embed(embed); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); diff --git a/commands/pokedex/pokedex-move.js b/commands/pokedex/pokedex-move.js index f7322a9a..753dd748 100644 --- a/commands/pokedex/pokedex-move.js +++ b/commands/pokedex/pokedex-move.js @@ -39,7 +39,7 @@ module.exports = class PokedexMoveCommand extends Command { const embed = new MessageEmbed() .setColor(0xED1C24) .setTitle(data.name) - .setDescription(data.cleanDescription) + .setDescription(data.description ? data.cleanDescription : 'No description available.') .addField('❯ Accuracy', `${data.accuracy}%`, true) .addField('❯ Power', data.power, true) .addField('❯ PP', data.pp, true) diff --git a/package.json b/package.json index 36382598..0db7e813 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "126.11.2", + "version": "126.11.3", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": { diff --git a/structures/pokemon/Ability.js b/structures/pokemon/Ability.js index 28e82144..ccacdb3b 100644 --- a/structures/pokemon/Ability.js +++ b/structures/pokemon/Ability.js @@ -8,6 +8,10 @@ module.exports = class Ability { this.name = data.names.length ? data.names.find(entry => entry.language.name === 'en').name : slugName; - this.description = data.effect_entries.find(entry => entry.language.name === 'en').effect; + this.description = data.effect_entries + ? data.effect_entries.find(entry => entry.language.name === 'en').effect + : data.flavor_text_entries + ? data.flavor_text_entries.find(entry => entry.language.name === 'en').flavor_text + : null; } }; diff --git a/structures/pokemon/Move.js b/structures/pokemon/Move.js index 4e64133d..064a2267 100644 --- a/structures/pokemon/Move.js +++ b/structures/pokemon/Move.js @@ -8,7 +8,11 @@ module.exports = class Move { this.name = data.names.length ? data.names.find(entry => entry.language.name === 'en').name : slugName; - this.description = data.effect_entries.find(entry => entry.language.name === 'en').effect; + this.description = data.effect_entries + ? data.effect_entries.find(entry => entry.language.name === 'en').effect + : data.flavor_text_entries + ? data.flavor_text_entries.find(entry => entry.language.name === 'en').flavor_text + : null; this.accuracy = data.accuracy; this.effectChance = data.effect_chance; this.power = data.power;