diff --git a/commands/avataredit/3000years.js b/commands/avataredit/3000years.js index 0a781ae7..4c2d72a8 100644 --- a/commands/avataredit/3000years.js +++ b/commands/avataredit/3000years.js @@ -24,7 +24,7 @@ module.exports = class YearsCommand extends commando.Command { message.channel.send(':x: Error! Please mention one user!'); } else { - if (message.mentions.users.first().avatarURL === null) { + if (!message.mentions.users.first().avatarURL) { message.channel.send(":x: Error! This user has no avatar!"); } else { diff --git a/commands/avataredit/beautiful.js b/commands/avataredit/beautiful.js index 6aa08c1f..2677e278 100644 --- a/commands/avataredit/beautiful.js +++ b/commands/avataredit/beautiful.js @@ -24,7 +24,7 @@ module.exports = class BeautifulCommand extends commando.Command { message.channel.send(':x: Error! Please mention one user!'); } else { - if (message.mentions.users.first().avatarURL === null) { + if (!message.mentions.users.first().avatarURL) { message.channel.send(":x: Error! This user has no avatar!"); } else { diff --git a/commands/avataredit/bobross.js b/commands/avataredit/bobross.js index 4cbfb077..8a8fe56b 100644 --- a/commands/avataredit/bobross.js +++ b/commands/avataredit/bobross.js @@ -25,7 +25,7 @@ module.exports = class BobRossCommand extends commando.Command { message.channel.send(':x: Error! Please mention one user!'); } else { - if (message.mentions.users.first().avatarURL === null) { + if (!message.mentions.users.first().avatarURL) { message.channel.send(":x: Error! This user has no avatar!"); } else { diff --git a/commands/avataredit/rip.js b/commands/avataredit/rip.js index 1b81db47..b2227ed3 100644 --- a/commands/avataredit/rip.js +++ b/commands/avataredit/rip.js @@ -25,7 +25,7 @@ module.exports = class RIPCommand extends commando.Command { message.channel.send(':x: Error! Please mention one user!'); } else { - if (message.mentions.users.first().avatarURL === null) { + if (!message.mentions.users.first().avatarURL) { message.channel.send(":x: Error! This user has no avatar!"); } else { diff --git a/commands/avataredit/steamcard.js b/commands/avataredit/steamcard.js index 328a51d8..f740eda3 100644 --- a/commands/avataredit/steamcard.js +++ b/commands/avataredit/steamcard.js @@ -25,7 +25,7 @@ module.exports = class SteamCardCommand extends commando.Command { message.channel.send(':x: Error! Please mention one user!'); } else { - if (message.mentions.users.first().avatarURL === null) { + if (!message.mentions.users.first().avatarURL) { message.channel.send(":x: Error! This user has no avatar!"); } else { diff --git a/commands/botinfo/contact.js b/commands/botinfo/contact.js index 082558ef..0e327cfa 100644 --- a/commands/botinfo/contact.js +++ b/commands/botinfo/contact.js @@ -29,7 +29,7 @@ module.exports = class ContactCommand extends commando.Command { message.channel.send("Sorry, you've been banned from using this command."); } else { - if (messageToReport === '') { + if (!messageToReport) { message.channel.send(':x: Error! Please do not report nothing!'); } else { diff --git a/commands/botinfo/info.js b/commands/botinfo/info.js index 64e25895..cd90c888 100644 --- a/commands/botinfo/info.js +++ b/commands/botinfo/info.js @@ -59,7 +59,7 @@ module.exports = class InfoCommand extends commando.Command { .addField('Modules', "[cleverbot-node](https://github.com/fojas/cleverbot-node), [pirate-speak](https://github.com/mikewesthad/pirate-speak), [google-translate-api](https://github.com/matheuss/google-translate-api), [urban](https://github.com/mvrilo/urban), [zalgoize](https://github.com/clux/zalgolize), [hepburn](https://github.com/lovell/hepburn), [yahoo-weather](https://github.com/mamal72/node-yahoo-weather), [imdb-api](https://github.com/worr/node-imdb-api), [string-to-binary](https://www.npmjs.com/package/string-to-binary), [roman-numeral-converter-mmxvi](https://github.com/Cein-Markey/roman-numeral-conversion-library), [cowsay](https://github.com/piuccio/cowsay), [morse](https://github.com/ecto/morse)") .addField('Utility Modules', - "[superagent](https://github.com/visionmedia/superagent), [mathjs](http://mathjs.org/), [moment](http://momentjs.com), [moment-duration-format](https://github.com/jsmreese/moment-duration-format), [opusscript](https://github.com/abalabahaha/opusscript), [jimp](https://github.com/oliver-moran/jimp)") + "[superagent](https://github.com/visionmedia/superagent), [mathjs](http://mathjs.org/), [moment](http://momentjs.com), [moment-duration-format](https://github.com/jsmreese/moment-duration-format), [opusscript](https://github.com/abalabahaha/opusscript), [jimp](https://github.com/oliver-moran/jimp), [cheerio](https://cheerio.js.org/)") .addField('APIs', "[Cleverbot API](https://www.cleverbot.com/api/), [Wattpad API](https://developer.wattpad.com/docs/api), [Wordnik API](http://developer.wordnik.com/docs.html), [osu! API](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/), [Yugioh Prices API](http://docs.yugiohprices.apiary.io/#), [YouTube Data API](https://developers.google.com/youtube/v3/), [Yoda Speak API](https://market.mashape.com/ismaelc/yoda-speak), [Discord Bots API](https://bots.discord.pw/api)") .addField('Other Credit', diff --git a/commands/imageedit/meme.js b/commands/imageedit/meme.js index 650b331b..d40876a8 100644 --- a/commands/imageedit/meme.js +++ b/commands/imageedit/meme.js @@ -24,7 +24,7 @@ module.exports = class MemeCommand extends commando.Command { if (type === "list") { message.channel.send("**Type Codes:** tenguy, afraid, older, aag, tried, biw, blb, kermit, bd, ch, cbg, wonka, cb, keanu, dsm, live, ants, doge, alwaysonbeat, ermg, facepalm, fwp, fa, fbf, fry, hipster, icanhas, crazypills, mw, noidea, regret, boat, hagrid, sohappy, captain, inigo, iw, ackbar, happening, joker, ive, ll, morpheus, mb, badchoice, mmm, jetpack, red, mordor, oprah, oag, remembers, philosoraptor, jw, patrick, rollsafe, sad-obama, sad-clinton, sadfrog, sad-bush, sad-biden, sad-boehner, saltbae, sarcasticbear, dwight, sb, ss, sf, dodgson, money, sohot, nice, awesome-awkward, awesome, awkward-awesome, awkward, fetch, success, scc, ski, officespace, interesting, toohigh, bs, center, both, winter, xy, buzz, yodawg, uno, yallgot, bad, elf, chosen"); } - else if (message.content.includes("|")) { + else if (message.content.includes(" | ")) { if (message.content.split(" ").slice(1).join(" ").match(/^[a-zA-Z0-9|.,!?'-\s]+$/)) { let memeQuery = message.content.split(" ").slice(2).join("-").split('-|-'); let toprow = memeQuery[0].split("?").join("~q"); diff --git a/commands/random/mathgame.js b/commands/random/mathgame.js index ed6e6d7d..610184a9 100644 --- a/commands/random/mathgame.js +++ b/commands/random/mathgame.js @@ -40,7 +40,7 @@ module.exports = class MathGameCommand extends commando.Command { let randomValue2 = Math.floor(Math.random() * randomValue) + 1; let randomExpression = randomValue1 + randomType + randomValue2; let solved = math.eval(randomExpression); - if (randomValue === undefined) { + if (!randomValue) { message.channel.send(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)'); } else { diff --git a/commands/random/soundboard.js b/commands/random/soundboard.js index d3f37816..85226054 100644 --- a/commands/random/soundboard.js +++ b/commands/random/soundboard.js @@ -31,7 +31,7 @@ module.exports = class SoundBoardCommand extends commando.Command { return message.channel.send(`:x: Error! Please be in a voice channel first!`); } let soundToPlay = message.content.toLowerCase().split(" ").slice(1).join(" "); - if (soundToPlay === "") { + if (!soundToPlay) { message.channel.send(':x: Error! No sound set. Please use ;soundboard list to see a list of sounds you can play.'); } else if (soundToPlay === 'list') { diff --git a/commands/random/typinggame.js b/commands/random/typinggame.js index 2afe7005..a35467e2 100644 --- a/commands/random/typinggame.js +++ b/commands/random/typinggame.js @@ -50,7 +50,7 @@ module.exports = class TypingGameCommand extends commando.Command { levelWord = "ten"; break; } - if (time === undefined) { + if (!time) { message.channel.send(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)'); } else { diff --git a/commands/response/8ball.js b/commands/response/8ball.js index e08f9efe..026e9ca0 100644 --- a/commands/response/8ball.js +++ b/commands/response/8ball.js @@ -19,8 +19,8 @@ module.exports = class MagicBall extends commando.Command { let question = message.content.split(" ").slice(1).join(" "); let answers = ['It seems the answer is yes, yes?', 'It seems the answer is no.', 'It is a little doubtful, yes?', 'It seems it is very likely to be true.']; answers = answers[Math.floor(Math.random() * answers.length)]; - if (question === "") { - question = "Not Specified." + if (!question) { + question = "Not Specified."; } message.channel.send("Question: " + question + "\n:8ball: " + answers + " :8ball:"); } diff --git a/commands/response/compliment.js b/commands/response/compliment.js index c3837b66..9d35e023 100644 --- a/commands/response/compliment.js +++ b/commands/response/compliment.js @@ -19,7 +19,7 @@ module.exports = class ComplimentCommand extends commando.Command { let thingToCompliment = message.content.split(" ").slice(1).join(" "); let compliments = ["Your smile is contagious.", "You look great today.", "You're a smart cookie.", "I bet you make babies smile.", "You have impeccable manners.", "I like your style.", "You have the best laugh.", "I appreciate you.", "You are the most perfect you there is.", "You are enough.", "You're strong.", "Your perspective is refreshing.", "You're an awesome friend.", "You light up the room.", "You shine brighter than a shooting star.", "You deserve a hug right now.", "You should be proud of yourself.", "You're more helpful than you realize.", "You have a great sense of humor.", "You've got all the right moves!", "Is that your picture next to 'charming' in the dictionary?", "Your kindness is a balm to all who encounter it.", "You're all that and a super-size bag of chips.", "On a scale from 1 to 10, you're an 11.", "You are brave.", "You're even more beautiful on the inside than you are on the outside.", "You have the courage of your convictions.", "Your eyes are breathtaking.", "If cartoon bluebirds were real, a bunch of them would be sitting on your shoulders singing right now.", "You are making a difference.", "You're like sunshine on a rainy day.", "You bring out the best in other people.", "Your ability to recall random factoids at just the right time is impressive.", "You're a great listener.", "How is it that you always look great, even in sweatpants?", "Everything would be better if more people were like you!", "I bet you sweat glitter.", "You were cool way before hipsters were cool.", "That color is perfect on you.", "Hanging out with you is always a blast.", "You always know -- and say -- exactly what I need to hear when I need to hear it.", "You smell really good.", "You may dance like no one's watching, but everyone's watching because you're an amazing dancer!", "Being around you makes everything better!", "When you say, 'I meant to do that,' I totally believe you.", "When you're not afraid to be yourself is when you're most incredible.", "Colors seem brighter when you're around.", "You're more fun than a ball pit filled with candy. (And seriously, what could be more fun than that?)", "That thing you don't like about yourself is what makes you so interesting.", "You're wonderful.", "You have cute elbows. For reals!", "Jokes are funnier when you tell them.", "You're better than a triple-scoop ice cream cone. With sprinkles.", "Your bellybutton is kind of adorable.", "Your hair looks stunning.", "You're one of a kind!", "You're inspiring.", "If you were a box of crayons, you'd be the giant name-brand one with the built-in sharpener.", "You should be thanked more often. So thank you!!", "Our community is better because you're in it.", "Someone is getting through something hard right now because you've got their back.", "You have the best ideas.", "You always know how to find that silver lining.", "Everyone gets knocked down sometimes, but you always get back up and keep going.", "You're a candle in the darkness.", "You're a great example to others.", "Being around you is like being on a happy little vacation.", "You always know just what to say.", "You're always learning new things and trying to better yourself, which is awesome.", "If someone based an Internet meme on you, it would have impeccable grammar.", "You could survive a Zombie apocalypse.", "You're more fun than bubble wrap.", "When you make a mistake, you fix it.", "Who raised you? They deserve a medal for a job well done.", "You're great at figuring stuff out.", "Your voice is magnificent.", "The people you love are lucky to have you in their lives.", "You're like a breath of fresh air.", "You're gorgeous -- and that's the least interesting thing about you, too.", "You're so thoughtful.", "Your creative potential seems limitless.", "Your name suits you to a T.", "You're irresistible when you blush.", "Actions speak louder than words, and yours tell an incredible story.", "Somehow you make time stop and fly at the same time.", "When you make up your mind about something, nothing stands in your way.", "You seem to really know who you are.", "Any team would be lucky to have you on it.", "In high school I bet you were voted 'most likely to keep being awesome.'", "I bet you do the crossword puzzle in ink.", "Babies and small animals probably love you.", "If you were a scented candle they'd call it Perfectly Imperfect (and it would smell like summer).", "There's ordinary, and then there's you.", "You're someone's reason to smile.", "You're even better than a unicorn, because you're real.", "How do you keep being so funny and making everyone laugh?", "You have a good head on your shoulders.", "Has anyone ever told you that you have great posture?", "The way you treasure your loved ones is incredible.", "You're really something special.", "You're a gift to those around you.", "You don't deserve it."]; compliments = compliments[Math.floor(Math.random() * compliments.length)]; - if (thingToCompliment === '') { + if (!thingToCompliment) { message.reply(compliments); } else { diff --git a/commands/response/motivate.js b/commands/response/motivate.js index 0367636f..5ff71d64 100644 --- a/commands/response/motivate.js +++ b/commands/response/motivate.js @@ -21,7 +21,7 @@ module.exports = class MotivateCommand extends commando.Command { } console.log("[Command] " + message.content); let userToMotivate = message.content.split(" ").slice(1).join(" "); - if (userToMotivate === '') { + if (!userToMotivate) { message.reply('https://www.youtube.com/watch?v=ZXsQAXx_ao0'); } else { diff --git a/commands/response/quantumcoin.js b/commands/response/quantumcoin.js index d9b915d9..929dc1cd 100644 --- a/commands/response/quantumcoin.js +++ b/commands/response/quantumcoin.js @@ -6,7 +6,8 @@ module.exports = class QuantumCoin extends commando.Command { name: 'quantumcoin', aliases: [ 'oddcoin', - 'brokencoin' + 'brokencoin', + 'qcoin' ], group: 'response', memberName: 'quantumcoin', diff --git a/commands/response/roast.js b/commands/response/roast.js index ff4a50ed..e90c223e 100644 --- a/commands/response/roast.js +++ b/commands/response/roast.js @@ -22,7 +22,7 @@ module.exports = class RoastMeCommand extends commando.Command { let userToRoast = message.content.split(" ").slice(1).join(" "); let roasts = ["*puts you in the oven*", "You're so stupid.", "Sorry, I can't hear you over how annoying you are.", "I've got better things to do.", "You're as dumb as Cleverbot.", "Your IQ is lower than the Mariana Trench.", "You're so annoying even the flies stay away from your stench.", "Go away, please.", "I'd give you a nasty look but you've already got one.", "It looks like your face caught fire and someone tried to put it out with a hammer.", "Your family tree must be a cactus because everyone on it is a prick.", "Someday you will go far, and I hope you stay there.", "The zoo called. They're wondering how you got out of your cage.", "I was hoping for a battle of wits, but you appear to be unarmed.", "You are proof that evolution can go in reverse.", "Brains aren't everything, in your case, they're nothing.", "Sorry I didn't get that, I don't speak idiot.", "Why is it acceptable for you to be an idiot, but not for me to point it out?", "We all sprang from apes, but you did not spring far enough.", "You're an unknown command.", "If you could go anywhere I chose, I'd choose dead.", "Even monkeys can go to space, so clearly you lack some potential.", "It's brains over brawn, yet you have neither.", "You look like a monkey, and you smell like one too.", "Even among idiots you're lacking.", "You fail even when you're doing absolutely nothing.", "If there was a vote for 'least likely to succeed' you'd win first prize.", "I'm surrounded by idiots... Or, wait, that's just you.", "I wanna go home. Well, really I just want to get away from the awful aroma you've got going there.", "Every time you touch me I have to go home and wash all my clothes nine times just to get a normal smell back.", "If I had a nickel for every brain you don't have, I'd have one dollar.", "I'd help you succeed but you're incapable."]; roasts = roasts[Math.floor(Math.random() * roasts.length)]; - if (userToRoast === '') { + if (!userToRoast) { message.reply(roasts); } else { diff --git a/commands/response/rockpaperscissors.js b/commands/response/rockpaperscissors.js index bb5589b3..8c5f8be0 100644 --- a/commands/response/rockpaperscissors.js +++ b/commands/response/rockpaperscissors.js @@ -22,7 +22,7 @@ module.exports = class RockPaperScissors extends commando.Command { let [rps] = message.content.toLowerCase().split(" ").slice(1); let response = ['Paper', 'Rock', 'Scissors']; response = response[Math.floor(Math.random() * response.length)]; - if (rps === undefined) { + if (!rps) { message.channel.send(":x: Error! Your message contains nothing!"); } else if (rps.includes("rock")) { diff --git a/commands/response/roll.js b/commands/response/roll.js index cf428283..d3433bbf 100644 --- a/commands/response/roll.js +++ b/commands/response/roll.js @@ -21,7 +21,7 @@ module.exports = class RollChooseCommand extends commando.Command { } console.log("[Command] " + message.content); let [value] = message.content.split(" ").slice(1); - if (value === undefined) { + if (!value) { let roll = Math.floor(Math.random() * 6) + 1; message.channel.send("You rolled a " + roll); } diff --git a/commands/search/google.js b/commands/search/google.js index 0bb20ad2..a9b80bbd 100644 --- a/commands/search/google.js +++ b/commands/search/google.js @@ -34,7 +34,7 @@ module.exports = class DefineCommand extends commando.Command { href = querystring.parse(href.replace('/url?', '')); msg.edit(href.q); }).catch(function(err) { - message.channel.send(':x: Error! No Results Found!'); + msg.edit(':x: Error! No Results Found!'); }); }); } diff --git a/commands/search/imdb.js b/commands/search/imdb.js index ded4bec4..09aa793e 100644 --- a/commands/search/imdb.js +++ b/commands/search/imdb.js @@ -29,7 +29,7 @@ module.exports = class IMDBCommand extends commando.Command { name: queryMovie }, (err, response) => { movie = response; - if (movie === undefined) { + if (!movie) { message.channel.send(":x: Error! Movie not found!"); } else { diff --git a/commands/search/osu.js b/commands/search/osu.js index 40a024be..148a428b 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -33,7 +33,7 @@ module.exports = class OsuCommand extends commando.Command { type: 'string' }) .then(function(response) { - if (response.body[0] === undefined) { + if (!response.body[0]) { message.channel.send(":x: Error! User not found!"); } else { diff --git a/commands/search/urban.js b/commands/search/urban.js index 2efdf953..d725d45f 100644 --- a/commands/search/urban.js +++ b/commands/search/urban.js @@ -25,13 +25,13 @@ module.exports = class UrbanDictionary extends commando.Command { console.log("[Command] " + message.content); let wordToDefine = message.content.split(" ").slice(1).join(" "); urban(wordToDefine).first(function(response) { - if (response === undefined) { + if (!response) { message.channel.send(":x: Error! Word not found!"); } - else if (response.definition === '') { + else if (!response.definition) { message.channel.send(":x: Error! Word has no definition!"); } - else if (response.example !== '') { + else if (response.example) { const embed = new Discord.RichEmbed() .setColor(0x32a8f0) .setAuthor('Urban Dictionary', 'http://a1.mzstatic.com/eu/r30/Purple71/v4/66/54/68/6654683f-cacd-4a55-1784-f14257f77874/icon175x175.png') diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index 5700b8fc..df772906 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -25,7 +25,7 @@ module.exports = class WikipediaCommand extends commando.Command { let description = response.body.query.pages[0].extract; let name = response.body.query.pages[0].title; thingToSearch = thingToSearch.split(")").join("%29"); - if (description === undefined) { + if (!description) { message.channel.send(":x: Error! Entry Not Found!"); } else { diff --git a/commands/search/youtube.js b/commands/search/youtube.js index 40e35a44..24256507 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -33,7 +33,7 @@ module.exports = class YouTubeCommand extends commando.Command { key: config.youtubekey }) .then(function(response) { - if (response.body.items[0].snippet === undefined) { + if (!response.body.items[0].snippet) { message.channel.send(':x: Error! No Video Found!'); } else { diff --git a/commands/textedit/cowsay.js b/commands/textedit/cowsay.js index ff667a03..390b592c 100644 --- a/commands/textedit/cowsay.js +++ b/commands/textedit/cowsay.js @@ -17,7 +17,7 @@ module.exports = class CowsayCommand extends commando.Command { if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return; } console.log("[Command] " + message.content); - if (message.content.split(" ").slice(1).join(" ") === "") { + if (!message.content.split(" ").slice(1).join(" ")) { message.channel.send(":x: Error! You entered nothing!"); } else { diff --git a/commands/textedit/embed.js b/commands/textedit/embed.js index ac56cfea..3a210f51 100644 --- a/commands/textedit/embed.js +++ b/commands/textedit/embed.js @@ -18,7 +18,7 @@ module.exports = class EmbedCommand extends commando.Command { } console.log("[Command] " + message.content); let embedMessage = message.content.split(" ").slice(1).join(" "); - if (embedMessage === "") { + if (!embedMessage) { message.channel.send(":x: Error! Nothing to embed!"); } else { diff --git a/commands/textedit/morse.js b/commands/textedit/morse.js index b9df52a6..50ccc64b 100644 --- a/commands/textedit/morse.js +++ b/commands/textedit/morse.js @@ -22,7 +22,7 @@ module.exports = class MorseCommand extends commando.Command { console.log("[Command] " + message.content); let [methodToUse] = message.content.toLowerCase().split(" ").slice(1); let toMorse = message.content.split(" ").slice(2).join(" "); - if (toMorse === "") { + if (!toMorse) { message.channel.send(":x: Error! Nothing to translate! Perhaps you forgot to set the method? Use either encode or decode before your text."); } else if (methodToUse === 'encode') { diff --git a/commands/textedit/pirate.js b/commands/textedit/pirate.js index d1529979..d08bd2c8 100644 --- a/commands/textedit/pirate.js +++ b/commands/textedit/pirate.js @@ -23,7 +23,7 @@ module.exports = class PirateCommand extends commando.Command { console.log("[Command] " + message.content); let turnToPirate = message.content.split(" ").slice(1).join(" "); let pirate = pirateSpeak.translate(turnToPirate); - if (turnToPirate === "") { + if (!turnToPirate) { message.channel.send(":x: Error! Nothing to translate!"); } else { diff --git a/commands/textedit/reverse.js b/commands/textedit/reverse.js index a4104bab..7abe55bb 100644 --- a/commands/textedit/reverse.js +++ b/commands/textedit/reverse.js @@ -17,7 +17,7 @@ module.exports = class ReverseCommand extends commando.Command { } console.log("[Command] " + message.content); let stringToReverse = message.content.split(" ").slice(1).join(" "); - if (stringToReverse === "") { + if (!stringToReverse) { message.channel.send(":x: Error! Nothing to reverse!"); } else { diff --git a/commands/textedit/say.js b/commands/textedit/say.js index 7eeb96be..9643da16 100644 --- a/commands/textedit/say.js +++ b/commands/textedit/say.js @@ -7,7 +7,8 @@ module.exports = class SayCommand extends commando.Command { aliases: [ 'copy', 'repeat', - 'parrot' + 'parrot', + 'echo' ], group: 'textedit', memberName: 'say', @@ -22,7 +23,7 @@ module.exports = class SayCommand extends commando.Command { } console.log("[Command] " + message.content); let copycat = message.content.split(" ").slice(1).join(" "); - if (copycat === "") { + if (!copycat) { message.channel.send(":x: Error! Nothing to say!"); } else { diff --git a/commands/textedit/shuffle.js b/commands/textedit/shuffle.js index 6cd6c9e6..c25fa6da 100644 --- a/commands/textedit/shuffle.js +++ b/commands/textedit/shuffle.js @@ -29,7 +29,7 @@ module.exports = class ShuffleCommand extends commando.Command { } console.log("[Command] " + message.content); let thingToShuffle = message.content.split(" ").slice(1).join(" "); - if (thingToShuffle === '') { + if (!thingToShuffle) { message.channel.send(":x: Error! Nothing to shuffle!"); } else { diff --git a/commands/textedit/temmie.js b/commands/textedit/temmie.js index cb65e37c..c6f8b62d 100644 --- a/commands/textedit/temmie.js +++ b/commands/textedit/temmie.js @@ -18,6 +18,7 @@ const dictionary = { "meal": "tem flakes", "meals": "tem flakes", "human": "hooman", + "humans": "hoomans", "chocolate": "choco", "cute": "coot", "allergic": "allergics", @@ -191,7 +192,12 @@ module.exports = class TemmieCommand extends commando.Command { } console.log("[Command] " + message.content); let thingToTranslate = message.content.split(" ").slice(1).join(" "); - let temmized = temmize(thingToTranslate); - message.channel.send(temmized); + if (!thingToTranslate) { + message.channel.send(':x: Error! Nothing to translate!'); + } + else { + let temmized = temmize(thingToTranslate); + message.channel.send(temmized); + } } }; diff --git a/commands/textedit/translate.js b/commands/textedit/translate.js index b4710f9a..f3d9e93b 100644 --- a/commands/textedit/translate.js +++ b/commands/textedit/translate.js @@ -25,7 +25,7 @@ module.exports = class TranslateCommand extends commando.Command { message.channel.send("‘af': 'Afrikaans’\n’sq': 'Albanian'\n'ar': 'Arabic’\n’hy': 'Armenian’\n’az': 'Azerbaijani’\n’eu': 'Basque’\n’be': 'Belarusian’\n’bn': 'Bengali’\n’bs': 'Bosnian’\n’bg': 'Bulgarian’\n’ca': 'Catalan’\n’ceb': 'Cebuano’\n’ny': 'Chichewa’\n’zh-cn': 'Chinese Simplified’\n’zh-tw': 'Chinese Traditional’\n’co': 'Corsican’\n’hr': 'Croatian’\n’cs': 'Czech’\n’da': 'Danish’\n’nl': 'Dutch’\n’en': 'English’\n’eo': 'Esperanto’\n’et': 'Estonian’\n’tl': 'Filipino’\n’fi': 'Finnish’\n’fr': 'French’\n’fy': 'Frisian’\n’gl': 'Galician’\n’ka': 'Georgian’\n’de': 'German’\n’el': 'Greek’\n’gu': 'Gujarati’\n’ht': 'Haitian Creole’\n’ha': 'Hausa’\n’haw': 'Hawaiian’\n’iw': 'Hebrew’\n’hi': 'Hindi’\n’hmn': 'Hmong’\n’hu': 'Hungarian’\n’is': 'Icelandic’\n’ig': 'Igbo’\n’id': 'Indonesian’\n’ga': 'Irish’\n’it': 'Italian’\n’ja': 'Japanese’\n’jw': 'Javanese’\n’kn': 'Kannada’\n’kk': 'Kazakh’\n’km': 'Khmer’\n’ko': 'Korean’\n’ku': 'Kurdish (Kurmanji)’\n’ky': 'Kyrgyz’\n’lo': 'Lao’\n’la': 'Latin’\n’lv': 'Latvian’\n’lt': 'Lithuanian’\n’lb': 'Luxembourgish’\n’mk': 'Macedonian’\n’mg': 'Malagasy’\n’ms': 'Malay’\n’ml': 'Malayalam’\n’mt': 'Maltese’\n’mi': 'Maori’\n’mr': 'Marathi’\n’mn': 'Mongolian’\n’my': 'Myanmar (Burmese)’\n’ne': 'Nepali’\n’no': 'Norwegian’\n’ps': 'Pashto’\n’fa': 'Persian’\n’pl': 'Polish’\n’pt': 'Portuguese’\n’ma': 'Punjabi’\n’ro': 'Romanian’\n’ru': 'Russian’\nsm': 'Samoan’\n’gd': 'Scots Gaelic’\n’sr': 'Serbian’\n’st': 'Sesotho’\n’sn': 'Shona’\n’sd': 'Sindhi’\n’si': 'Sinhala’\n’sk': 'Slovak’\n’sl': 'Slovenian’\n’so': 'Somali’\n’es': 'Spanish’\n’su': 'Sudanese’\n’sw': 'Swahili’\n’sv': 'Swedish’\n’tg': 'Tajik’\n’ta': 'Tamil’\n’te': 'Telugu’\n’th': 'Thai’\n’tr': 'Turkish’\n’uk': 'Ukrainian’\n’ur': 'Urdu’\n’uz': 'Uzbek’\n’vi': 'Vietnamese’\n’cy': 'Welsh’\n’xh': 'Xhosa’\n’yi': 'Yiddish’\n’yo': 'Yoruba’\n’zu': 'Zulu'"); } else if (languages.entries[languageto]) { - if (thingToTranslate === "") { + if (!thingToTranslate) { message.channel.send(":x: Error! Nothing to translate!"); } else if (thingToTranslate.length > 200) { diff --git a/commands/textedit/yoda.js b/commands/textedit/yoda.js index e7498dfc..04fb81bc 100644 --- a/commands/textedit/yoda.js +++ b/commands/textedit/yoda.js @@ -19,7 +19,7 @@ module.exports = class YodaCommand extends commando.Command { } console.log("[Command] " + message.content); let turnToYoda = message.content.split(" ").slice(1).join(" "); - if (turnToYoda === "") { + if (!turnToYoda) { message.channel.send(':x: Error! Nothing to translate!'); } else { diff --git a/commands/textedit/zalgo.js b/commands/textedit/zalgo.js index fb896819..cd35fdf5 100644 --- a/commands/textedit/zalgo.js +++ b/commands/textedit/zalgo.js @@ -18,7 +18,7 @@ module.exports = class ZalgoCommand extends commando.Command { } console.log("[Command] " + message.content); let zalgoified = zalgo(message.content.split(" ").slice(1).join(" ")); - if (zalgoified === '') { + if (!zalgoified) { message.channel.send(":x: Error! Nothing to zalgoify!"); } else if (zalgoified.length > 1950) { diff --git a/commands/userinfo/avatar.js b/commands/userinfo/avatar.js index 00df314d..dfa6081a 100644 --- a/commands/userinfo/avatar.js +++ b/commands/userinfo/avatar.js @@ -20,7 +20,7 @@ module.exports = class AvatarCommand extends commando.Command { message.channel.send(':x: Error! Please mention one user!'); } else { - if (message.mentions.users.first().avatarURL === null) { + if (!message.mentions.users.first().avatarURL) { message.channel.send(":x: Error! This person has no avatar!"); } else { diff --git a/commands/userinfo/userinfo.js b/commands/userinfo/userinfo.js index b0f36e32..5ee88f34 100644 --- a/commands/userinfo/userinfo.js +++ b/commands/userinfo/userinfo.js @@ -57,7 +57,7 @@ module.exports = class UserInfoCommand extends commando.Command { message.channel.send(':x: Error! Please mention one user!'); } else { - if (message.mentions.users.first().presence.game === null) { + if (!message.mentions.users.first().presence.game) { const embed = new Discord.RichEmbed() .setColor(color) .setThumbnail(message.mentions.users.first().avatarURL) diff --git a/index.js b/index.js index 43e7a3d2..51663a7a 100644 --- a/index.js +++ b/index.js @@ -141,7 +141,7 @@ client.once('ready', () => { }); process.on('unhandledRejection', function(reason, p) { - console.log("[Error] A Possibly Unhandled Rejection has Occurred. " + reason + p); + console.log("[Error] A Possibly Unhandled Rejection has Occurred. " + reason); }); client.login(config.token);