mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Clean-ups
This commit is contained in:
@@ -38,7 +38,7 @@ module.exports = class PokemonFusionCommand extends Command {
|
||||
|
||||
run(msg, { body, palette }) {
|
||||
const prefix = body.slice(0, Math.round(body.length / 2));
|
||||
const suffix = palette.slice(Math.round(palette.length / 2), palette.length);
|
||||
const suffix = palette.slice(Math.round(palette.length / 2));
|
||||
return msg.say(firstUpperCase(`${prefix}${suffix}`), {
|
||||
files: [`http://images.alexonsager.net/pokemon/fused/${pokemon[body]}/${pokemon[body]}.${pokemon[palette]}.png`]
|
||||
});
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "95.1.2",
|
||||
"version": "95.1.3",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
module.exports = class Pokemon {
|
||||
constructor(data) {
|
||||
this.id = data.id;
|
||||
this.name = data.names.filter(entry => entry.language.name === 'en')[0].name;
|
||||
this.name = data.names.find(entry => entry.language.name === 'en').name;
|
||||
this.entries = data.flavor_text_entries
|
||||
.filter(entry => entry.language.name === 'en')
|
||||
.map(entry => entry.flavor_text.replace(/\n|\f|\r/g, ' '));
|
||||
this.names = data.names;
|
||||
this.names = data.names.map(entry => ({ name: entry.name, language: entry.language.name }));
|
||||
this.genus = `The ${data.genera.filter(entry => entry.language.name === 'en')[0].genus}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user