mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 14:19:56 +02:00
Fix Replace Regex in Pokedex
This commit is contained in:
@@ -30,7 +30,7 @@ module.exports = class PokedexCommand extends Command {
|
|||||||
.get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}`);
|
.get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}`);
|
||||||
const id = `${'000'.slice(body.id.toString().length)}${body.id}`;
|
const id = `${'000'.slice(body.id.toString().length)}${body.id}`;
|
||||||
const name = this.filter(body.names).name;
|
const name = this.filter(body.names).name;
|
||||||
const flavor = this.filter(body.flavor_text_entries).flavor_text.replace(/\n/g, ' ');
|
const flavor = this.filter(body.flavor_text_entries).flavor_text.replace(/(\n|\f|\r)/g, ' ');
|
||||||
const species = this.filter(body.genera).genus;
|
const species = this.filter(body.genera).genus;
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setColor(0xED1C24)
|
.setColor(0xED1C24)
|
||||||
|
|||||||
Reference in New Issue
Block a user