mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 13:53:12 +02:00
Update lint
This commit is contained in:
@@ -42,7 +42,7 @@ module.exports = class NekoAtsumePasswordCommand extends Command {
|
||||
|
||||
async fetchPassword(locale) {
|
||||
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 date = new Date();
|
||||
date.setUTCHours(date.getUTCHours() + 9);
|
||||
|
||||
@@ -88,12 +88,12 @@ module.exports = class BattleCommand extends Command {
|
||||
reset(false);
|
||||
} else if (choice === 'special') {
|
||||
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);
|
||||
await msg.say(`${user} deals **${damage}** damage!`);
|
||||
dealDamage(damage);
|
||||
} else {
|
||||
await msg.say(`${user}'s attack missed!`);
|
||||
}
|
||||
reset();
|
||||
} else if (choice === 'run') {
|
||||
|
||||
@@ -41,7 +41,7 @@ module.exports = class RouletteCommand extends Command {
|
||||
|
||||
run(msg, { space }) {
|
||||
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);
|
||||
return msg.reply(`The result is **${number}${color ? ` ${color}` : ''}**. ${win ? 'You win!' : 'You lose...'}`);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ module.exports = class UserInfoCommand extends Command {
|
||||
.addField('❯ Server Join Date', member.joinedAt.toDateString(), true)
|
||||
.addField('❯ Nickname', member.nickname || 'None', true)
|
||||
.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);
|
||||
} catch (err) {
|
||||
embed.setFooter('Failed to resolve member, showing basic user information instead.');
|
||||
|
||||
@@ -28,7 +28,7 @@ module.exports = class PortalSendCommand extends Command {
|
||||
if (!channels.size) return msg.reply('No channels have an open portal...');
|
||||
const channel = channels.random();
|
||||
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}**!`);
|
||||
} catch (err) {
|
||||
return msg.reply('Failed to send the message. Try again later!');
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^5.3.0",
|
||||
"eslint-config-amber": "^1.0.4",
|
||||
"eslint-config-amber": "^1.1.0",
|
||||
"eslint-plugin-json": "^1.2.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
||||
Reference in New Issue
Block a user