mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 10:02:05 +02:00
eslint-config-aqua 2.0.0
This commit is contained in:
@@ -21,7 +21,7 @@ module.exports = class WhosThatPokemonCommand extends Command {
|
|||||||
const { body } = await snekfetch
|
const { body } = await snekfetch
|
||||||
.get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}`);
|
.get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}`);
|
||||||
const names = body.names.map(name => name.name.toLowerCase());
|
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 id = `${'000'.slice(body.id.toString().length)}${body.id}`;
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setTitle('You have 15 seconds, who\'s that Pokémon?')
|
.setTitle('You have 15 seconds, who\'s that Pokémon?')
|
||||||
@@ -32,8 +32,8 @@ module.exports = class WhosThatPokemonCommand extends Command {
|
|||||||
max: 1,
|
max: 1,
|
||||||
time: 15000
|
time: 15000
|
||||||
});
|
});
|
||||||
if (!msgs.size) return msg.say(`Time! It was ${name}, sorry!`);
|
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 ${name}.`);
|
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!');
|
return msg.say('Nice job! 10/10! You deserve some cake!');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "34.0.3",
|
"version": "34.0.4",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^4.5.0",
|
"eslint": "^4.5.0",
|
||||||
"eslint-config-aqua": "^1.4.1"
|
"eslint-config-aqua": "^2.0.0"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": "aqua",
|
"extends": "aqua",
|
||||||
|
|||||||
Reference in New Issue
Block a user