Update lint

This commit is contained in:
Daniel Odendahl Jr
2018-08-19 02:22:41 +00:00
parent db419e3f64
commit 786d51ece5
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ module.exports = class NekoAtsumePasswordCommand extends Command {
async fetchPassword(locale) { async fetchPassword(locale) {
const { text } = await request const { text } = await request
.get(`http://hpmobile.jp/app/nekoatsume/neko_daily${locale !== 'jp' ? `_${locale}` : ''}.php`); .get(`http://hpmobile.jp/app/nekoatsume/neko_daily${locale === 'jp' ? '' : `_${locale}`}.php`);
const data = text.split(','); const data = text.split(',');
const date = new Date(); const date = new Date();
date.setUTCHours(date.getUTCHours() + 9); date.setUTCHours(date.getUTCHours() + 9);
+3 -3
View File
@@ -88,12 +88,12 @@ module.exports = class BattleCommand extends Command {
reset(false); reset(false);
} else if (choice === 'special') { } else if (choice === 'special') {
const miss = Math.floor(Math.random() * 4); const miss = Math.floor(Math.random() * 4);
if (!miss) { if (miss) {
await msg.say(`${user}'s attack missed!`);
} else {
const damage = randomRange(100, guard ? 150 : 300); const damage = randomRange(100, guard ? 150 : 300);
await msg.say(`${user} deals **${damage}** damage!`); await msg.say(`${user} deals **${damage}** damage!`);
dealDamage(damage); dealDamage(damage);
} else {
await msg.say(`${user}'s attack missed!`);
} }
reset(); reset();
} else if (choice === 'run') { } else if (choice === 'run') {
+1 -1
View File
@@ -41,7 +41,7 @@ module.exports = class RouletteCommand extends Command {
run(msg, { space }) { run(msg, { space }) {
const number = Math.floor(Math.random() * 37); const number = Math.floor(Math.random() * 37);
const color = !number ? null : red.includes(number) ? 'RED' : 'BLACK'; const color = number ? red.includes(number) ? 'RED' : 'BLACK' : null;
const win = this.verifyWin(space, number); const win = this.verifyWin(space, number);
return msg.reply(`The result is **${number}${color ? ` ${color}` : ''}**. ${win ? 'You win!' : 'You lose...'}`); return msg.reply(`The result is **${number}${color ? ` ${color}` : ''}**. ${win ? 'You win!' : 'You lose...'}`);
} }
+1 -1
View File
@@ -36,7 +36,7 @@ module.exports = class UserInfoCommand extends Command {
.addField(' Server Join Date', member.joinedAt.toDateString(), true) .addField(' Server Join Date', member.joinedAt.toDateString(), true)
.addField(' Nickname', member.nickname || 'None', true) .addField(' Nickname', member.nickname || 'None', true)
.addField(' Highest Role', .addField(' Highest Role',
member.roles.highest.id !== msg.guild.defaultRole.id ? member.roles.highest.name : 'None', true) member.roles.highest.id === msg.guild.defaultRole.id ? 'None' : member.roles.highest.name, true)
.addField(' Hoist Role', member.roles.hoist ? member.roles.hoist.name : 'None', true); .addField(' Hoist Role', member.roles.hoist ? member.roles.hoist.name : 'None', true);
} catch (err) { } catch (err) {
embed.setFooter('Failed to resolve member, showing basic user information instead.'); embed.setFooter('Failed to resolve member, showing basic user information instead.');
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class PortalSendCommand extends Command {
if (!channels.size) return msg.reply('No channels have an open portal...'); if (!channels.size) return msg.reply('No channels have an open portal...');
const channel = channels.random(); const channel = channels.random();
try { try {
await channel.send(`**${msg.author.tag} (${msg.channel.type !== 'text' ? 'DM' : msg.guild.name})**: ${message}`); await channel.send(`**${msg.author.tag} (${msg.channel.type === 'text' ? msg.guild.name : 'DM'})**: ${message}`);
return msg.say(`Message sent to **${channel.name}** in **${channel.guild.name}**!`); return msg.say(`Message sent to **${channel.name}** in **${channel.guild.name}**!`);
} catch (err) { } catch (err) {
return msg.reply('Failed to send the message. Try again later!'); return msg.reply('Failed to send the message. Try again later!');
+1 -1
View File
@@ -47,7 +47,7 @@
}, },
"devDependencies": { "devDependencies": {
"eslint": "^5.3.0", "eslint": "^5.3.0",
"eslint-config-amber": "^1.0.4", "eslint-config-amber": "^1.1.0",
"eslint-plugin-json": "^1.2.1" "eslint-plugin-json": "^1.2.1"
}, },
"eslintConfig": { "eslintConfig": {