eslint-config-aqua 2.0.0

This commit is contained in:
Daniel Odendahl Jr
2017-08-30 22:41:58 +00:00
parent 9cdce88dfb
commit 41882dd004
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -21,7 +21,7 @@ module.exports = class WhosThatPokemonCommand extends Command {
const { body } = await snekfetch
.get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}`);
const names = body.names.map(name => name.name.toLowerCase());
const name = filterPkmn(body.names).name;
const displayName = filterPkmn(body.names).name;
const id = `${'000'.slice(body.id.toString().length)}${body.id}`;
const embed = new MessageEmbed()
.setTitle('You have 15 seconds, who\'s that Pokémon?')
@@ -32,8 +32,8 @@ module.exports = class WhosThatPokemonCommand extends Command {
max: 1,
time: 15000
});
if (!msgs.size) return msg.say(`Time! It was ${name}, sorry!`);
if (!names.includes(msgs.first().content.toLowerCase())) return msg.say(`Nope, sorry, it's ${name}.`);
if (!msgs.size) return msg.say(`Time! It was ${displayName}, sorry!`);
if (!names.includes(msgs.first().content.toLowerCase())) return msg.say(`Nope, sorry, it's ${displayName}.`);
return msg.say('Nice job! 10/10! You deserve some cake!');
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "34.0.3",
"version": "34.0.4",
"description": "Your personal server companion.",
"main": "Shard.js",
"scripts": {
@@ -45,7 +45,7 @@
},
"devDependencies": {
"eslint": "^4.5.0",
"eslint-config-aqua": "^1.4.1"
"eslint-config-aqua": "^2.0.0"
},
"eslintConfig": {
"extends": "aqua",