diff --git a/commands/games/mathgame.js b/commands/games/mathgame.js index 8ebb0ab5..7eee2344 100644 --- a/commands/games/mathgame.js +++ b/commands/games/mathgame.js @@ -63,10 +63,16 @@ module.exports = class MathGameCommand extends Command { errors: ['time'] }); if (collected.first().content !== solved) - return msg.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`); + return msg.say( + `Aw... Too bad, try again next time! + The correct answer is: ${solved}` + ); return msg.say(`Good Job! You won! ${solved} is the correct answer!`); } catch (err) { - return msg.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`); + return msg.say( + `Aw... Too bad, try again next time! + The correct answer is: ${solved}` + ); } } }; diff --git a/commands/games/quiz.js b/commands/games/quiz.js index 6b2170ed..fe22fd92 100644 --- a/commands/games/quiz.js +++ b/commands/games/quiz.js @@ -25,7 +25,10 @@ module.exports = class QuizCommand extends Command { const answer = body[0].answer.toLowerCase().replace(/(|<\/i>)/g, ''); const embed = new RichEmbed() .setTitle('You have **15** seconds to answer this question:') - .setDescription(`**Category: ${body[0].category.title}**\n${body[0].question}`); + .setDescription( + `**Category: ${body[0].category.title}** + ${body[0].question}` + ); await msg.embed(embed); try { const collected = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { @@ -37,7 +40,10 @@ module.exports = class QuizCommand extends Command { return msg.say(`The correct answer is: ${answer}`); return msg.say(`Perfect! The correct answer is: ${answer}`); } catch (err) { - return msg.say(`Aw... Too bad, try again next time!\nThe Correct Answer was: ${answer}`); + return msg.say( + `Aw... Too bad, try again next time! + The Correct Answer was: ${answer}` + ); } } catch (err) { return msg.say('An Unknown Error Occurred.'); diff --git a/commands/games/slots.js b/commands/games/slots.js index 83f47bd3..2b0d26e4 100644 --- a/commands/games/slots.js +++ b/commands/games/slots.js @@ -16,7 +16,13 @@ module.exports = class SlotsCommand extends Command { const slotTwo = slotThing[Math.floor(Math.random() * slotThing.length)]; const slotThree = slotThing[Math.floor(Math.random() * slotThing.length)]; if (slotOne === slotTwo && slotOne === slotThree) - return msg.say(`${slotOne}|${slotTwo}|${slotThree}\nWow! You won! Great job... er... luck!`); - return msg.say(`${slotOne}|${slotTwo}|${slotThree}\nAww... You lost... Guess it's just bad luck, huh?`); + return msg.say( + `${slotOne}|${slotTwo}|${slotThree} + Wow! You won! Great job... er... luck!` + ); + return msg.say( + `${slotOne}|${slotTwo}|${slotThree} + Aww... You lost... Guess it's just bad luck, huh?` + ); } }; diff --git a/commands/guildinfo/guildinfo.js b/commands/guildinfo/guildinfo.js index 03a4ac2f..3f15c2f3 100644 --- a/commands/guildinfo/guildinfo.js +++ b/commands/guildinfo/guildinfo.js @@ -30,7 +30,8 @@ module.exports = class GuildInfoCommand extends Command { .addField('**ID:**', msg.guild.id, true) .addField('**Created On:**', - `${msg.guild.createdAt}\n${moment.duration(Date.now() - msg.guild.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.`, true) + `${msg.guild.createdAt} + ${moment.duration(Date.now() - msg.guild.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.`, true) .addField('**Default Channel:**', msg.guild.defaultChannel, true) .addField('**Region:**', diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index 046c7590..de9a02c2 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -50,7 +50,10 @@ module.exports = class BanCommand extends Command { return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); try { try { - await member.send(`You were banned from ${msg.guild.name}!\nReason: ${reason}.`); + await member.send( + `You were banned from ${msg.guild.name}! + Reason: ${reason}.` + ); } catch (err) { await msg.say('Failed to send DM to user.'); } @@ -63,7 +66,11 @@ module.exports = class BanCommand extends Command { .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFF0000) .setTimestamp() - .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Ban\n**Reason:** ${reason}`); + .setDescription( + `**Member:** ${member.user.tag} (${member.id}) + **Action:** Ban + **Reason:** ${reason}` + ); return modlogs.send({embed}); } catch (err) { return msg.say('An Unknown Error Occurred.'); diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index d133fa31..a5230b7c 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -47,7 +47,10 @@ module.exports = class KickCommand extends Command { return msg.say('This member is not kickable. Perhaps they have a higher role than me?'); try { try { - await member.send(`You were kicked from ${msg.guild.name}!\nReason: ${reason}.`); + await member.send( + `You were kicked from ${msg.guild.name}! + Reason: ${reason}.` + ); } catch (err) { await msg.say('Failed to send DM.'); } @@ -59,7 +62,11 @@ module.exports = class KickCommand extends Command { .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFFA500) .setTimestamp() - .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Kick\n**Reason:** ${reason}`); + .setDescription( + `**Member:** ${member.user.tag} (${member.id}) + **Action:** Kick + **Reason:** ${reason}` + ); return modlogs.send({embed}); } catch (err) { return msg.say('An Unknown Error Occurred.'); diff --git a/commands/moderation/softban.js b/commands/moderation/softban.js index 5480f33b..743bbff4 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -49,7 +49,10 @@ module.exports = class SoftbanCommand extends Command { return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); try { try { - await member.send(`You were softbanned from ${msg.guild.name}!\nReason: ${reason}.`); + await member.send( + `You were softbanned from ${msg.guild.name}! + Reason: ${reason}.` + ); } catch (err) { await msg.say('Failed to send DM to user.'); } @@ -63,7 +66,11 @@ module.exports = class SoftbanCommand extends Command { .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFF4500) .setTimestamp() - .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Softban\n**Reason:** ${reason}`); + .setDescription( + `**Member:** ${member.user.tag} (${member.id}) + **Action:** Softban + **Reason:** ${reason}` + ); return modlogs.send({embed}); } catch (err) { return msg.say('An Unknown Error Occurred.'); diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index 80c0a3ef..21fa7dbb 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -61,7 +61,11 @@ module.exports = class UnbanCommand extends Command { .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0x00AE86) .setTimestamp() - .setDescription(`**Member:** ${member.tag} (${member.id})\n**Action:** Unban\n**Reason:** ${reason}`); + .setDescription( + `**Member:** ${member.tag} (${member.id}) + **Action:** Unban + **Reason:** ${reason}` + ); return modlogs.send({embed}); } catch (err) { return msg.say('An Unknown Error Occurred.'); diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index 927dc032..5dd49019 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -46,7 +46,11 @@ module.exports = class WarnCommand extends Command { .setAuthor(msg.author.tag, msg.author.displayAvatarURL) .setColor(0xFFFF00) .setTimestamp() - .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Warn\n**Reason:** ${reason}`); + .setDescription( + `**Member:** ${member.user.tag} (${member.id}) + **Action:** Warn + **Reason:** ${reason}` + ); return modlogs.send({embed}); } catch (err) { return msg.say('An Unknown Error Occurred.'); diff --git a/commands/random/strawpoll.js b/commands/random/strawpoll.js index 7cde6446..c2546dce 100644 --- a/commands/random/strawpoll.js +++ b/commands/random/strawpoll.js @@ -47,7 +47,10 @@ module.exports = class StrawpollCommand extends Command { title, options }); - return msg.say(`${body.title}\nhttp://strawpoll.me/${body.id}`); + return msg.say( + `${body.title} + http://strawpoll.me/${body.id}` + ); } catch (err) { return msg.say('An Unknown Error Occurred.'); } diff --git a/commands/response/8ball.js b/commands/response/8ball.js index e9fcf398..5e4edc1a 100644 --- a/commands/response/8ball.js +++ b/commands/response/8ball.js @@ -21,6 +21,9 @@ module.exports = class MagicBallCommand extends Command { run(msg, args) { const { question } = args; const answer = answers[Math.floor(Math.random() * answers.length)]; - return msg.say(`Question: ${question}\n:8ball: ${answer} :8ball:`); + return msg.say( + `Question: ${question} + :8ball: ${answer} :8ball:` + ); } }; diff --git a/commands/textedit/cowsay.js b/commands/textedit/cowsay.js index 35a36452..92ef466a 100644 --- a/commands/textedit/cowsay.js +++ b/commands/textedit/cowsay.js @@ -24,6 +24,13 @@ module.exports = class CowsayCommand extends Command { run(msg, args) { const { text } = args; - return msg.code(null, `< ${text} >\n \\ ^__^\n \\ (oO)\\_______\n (__)\\ )\\/\\\n U ||----w |\n || ||`); + return msg.code(null, + `< ${text} > + \\ ^__^ + \\ (oO)\\_______ + (__)\\ )\\/\\ + U ||----w | + || ||` + ); } }; diff --git a/commands/userinfo/userinfo.js b/commands/userinfo/userinfo.js index b7a52949..f5087b4b 100644 --- a/commands/userinfo/userinfo.js +++ b/commands/userinfo/userinfo.js @@ -60,9 +60,11 @@ module.exports = class UserInfoCommand extends Command { .addField('**ID:**', user.id, true) .addField('**Joined Discord On:**', - `${user.createdAt}\n${moment.duration(Date.now() - user.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.`, true) + `${user.createdAt} + ${moment.duration(Date.now() - user.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.`, true) .addField('**Joined Server On:**', - `${member.joinedAt}\n${moment.duration(Date.now() - member.joinedTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.`, true) + `${member.joinedAt} + ${moment.duration(Date.now() - member.joinedTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.`, true) .addField('**Status:**', stat, true) .addField('**Playing:**', diff --git a/commands/util/help.js b/commands/util/help.js index 0e94d7b7..0e9e2a0d 100644 --- a/commands/util/help.js +++ b/commands/util/help.js @@ -1,5 +1,4 @@ const { Command } = require('discord.js-commando'); -const { stripIndents } = require('common-tags'); const { RichEmbed } = require('discord.js'); module.exports = class HelpCommand extends Command { @@ -30,18 +29,18 @@ module.exports = class HelpCommand extends Command { const showAll = command && command.toLowerCase() === 'all'; if (command && !showAll) { if (commands.length === 1) { - msg.say(stripIndents` - __Command **${commands[0].name}**:__ *${commands[0].description}* + return msg.say( + `__Command **${commands[0].name}**:__ *${commands[0].description}* ${commands[0].guildOnly ? 'Usable Only in Servers' : 'Usable in Server and DM'} **Format:** ${msg.anyUsage(`${commands[0].name}${commands[0].format ? ` ${commands[0].format}` : ''}`)} **Aliases:** ${commands[0].aliases.join(', ') || 'None'} **Group:** ${commands[0].group.name} - ${commands[0].details || ''} - `); + ${commands[0].details || ''}` + ); } else if (commands.length > 1) { - msg.say('Multiple Commands Found. Please be more specific.'); + return msg.say('Multiple Commands Found. Please be more specific.'); } else { - msg.say( + return msg.say( `Could not identify command. Use ${msg.usage( null, msg.channel.type === 'dm' ? null : undefined, msg.channel.type === 'dm' ? null : undefined )} to view a list of commands you can use.` diff --git a/commands/util/invite.js b/commands/util/invite.js index 92df3c33..537d3861 100644 --- a/commands/util/invite.js +++ b/commands/util/invite.js @@ -12,6 +12,11 @@ module.exports = class InviteCommand extends Command { async run(msg) { const invite = await this.client.generateInvite('1345846343'); - return msg.say(`Add me to your server with this link:\n${invite}\nOr, come to my server with this link:\n${this.client.options.invite}`); + return msg.say( + `Add me to your server with this link: + ${invite} + Or, come to my server with this link: + ${this.client.options.invite}` + ); } }; diff --git a/package.json b/package.json index c0f18bba..f1a19604 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "17.2.4", + "version": "17.2.5", "description": "A Discord Bot", "main": "shardingmanager.js", "scripts": {