From c225ea465996c074d44366eb73935e9589f79397 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 24 Oct 2017 19:02:27 +0000 Subject: [PATCH] Small changes, reply to some things --- commands/avatar-edit/3000-years.js | 2 +- commands/avatar-edit/approved.js | 2 +- commands/avatar-edit/avatar-fusion.js | 2 +- commands/avatar-edit/beautiful.js | 2 +- commands/avatar-edit/bob-ross.js | 2 +- commands/avatar-edit/card.js | 2 +- commands/avatar-edit/challenger.js | 2 +- commands/avatar-edit/christmas-hat.js | 2 +- commands/avatar-edit/dexter.js | 2 +- commands/avatar-edit/food-broke.js | 2 +- commands/avatar-edit/greyscale.js | 2 +- commands/avatar-edit/he-lives-in-you.js | 2 +- commands/avatar-edit/i-have-the-power.js | 2 +- commands/avatar-edit/invert.js | 2 +- .../avatar-edit/look-at-this-photograph.js | 2 +- commands/avatar-edit/pixelize.js | 2 +- commands/avatar-edit/rainbow.js | 2 +- commands/avatar-edit/rejected.js | 2 +- commands/avatar-edit/rip.js | 2 +- commands/avatar-edit/sepia.js | 2 +- commands/avatar-edit/silhouette.js | 2 +- commands/avatar-edit/steam-card.js | 2 +- commands/avatar-edit/steam-now-playing.js | 2 +- commands/avatar-edit/thug-life.js | 2 +- commands/avatar-edit/triggered.js | 2 +- commands/avatar-edit/wanted.js | 2 +- commands/avatar-edit/yu-gi-oh-token.js | 2 +- commands/games/akinator.js | 6 ++--- commands/games/battle.js | 6 ++--- commands/games/emoji-emoji-revolution.js | 6 ++--- commands/games/gunfight.js | 6 ++--- commands/games/hangman.js | 4 ++-- commands/games/hunger-games.js | 6 ++--- commands/games/lottery.js | 4 ++-- commands/games/quiz.js | 4 ++-- commands/games/tic-tac-toe.js | 6 ++--- commands/games/whos-that-pokemon.js | 2 +- commands/games/wizard-convention.js | 14 +++++++----- commands/image-edit/be-like-bill.js | 5 ++--- commands/image-edit/meme.js | 2 +- commands/image-edit/robohash.js | 2 +- commands/moderation/ban.js | 10 ++++----- commands/moderation/clear-channel.js | 2 +- commands/moderation/hackban.js | 8 +++---- commands/moderation/kick.js | 10 ++++----- commands/moderation/prune.js | 4 ++-- commands/moderation/softban.js | 10 ++++----- commands/moderation/unban.js | 4 ++-- commands/num-edit/currency.js | 2 +- .../other/astronomy-picture-of-the-day.js | 2 +- commands/other/avatar.js | 7 +++--- commands/other/coolness.js | 15 ++++++------- commands/other/days-until.js | 5 +++-- commands/other/gender-guess.js | 2 +- commands/other/google-autofill.js | 2 +- commands/other/google-doodle.js | 2 +- commands/other/horoscope.js | 2 +- commands/other/shorten-url.js | 2 +- commands/other/soundboard.js | 8 +++---- commands/other/spoopy-link.js | 2 +- commands/other/strawpoll.js | 6 ++--- commands/other/word-of-the-day.js | 4 ++-- commands/other/xkcd.js | 2 +- commands/random-res/cat.js | 2 +- commands/random-res/chuck-norris.js | 2 +- commands/random-res/dog.js | 2 +- commands/random-res/guess-my-looks.js | 7 +++--- commands/random-res/history.js | 2 +- commands/random-res/name.js | 2 +- commands/random-res/number-fact.js | 2 +- commands/random-res/quantum-coin.js | 2 +- commands/random-res/quote.js | 2 +- commands/random-res/shower-thought.js | 2 +- commands/roleplay/break-up.js | 2 +- commands/roleplay/cuddle.js | 2 +- commands/roleplay/eat.js | 2 +- commands/roleplay/evolve.js | 2 +- commands/roleplay/falcon-punch.js | 2 +- commands/roleplay/fist-bump.js | 2 +- commands/roleplay/high-five.js | 2 +- commands/roleplay/hit-with-shovel.js | 2 +- commands/roleplay/hug.js | 2 +- commands/roleplay/inhale.js | 2 +- commands/roleplay/kill.js | 2 +- commands/roleplay/kiss.js | 2 +- commands/roleplay/marry.js | 2 +- commands/roleplay/pat.js | 2 +- commands/roleplay/poke.js | 2 +- commands/roleplay/punch.js | 2 +- commands/roleplay/slap.js | 2 +- commands/roleplay/tackle.js | 2 +- commands/search/anime.js | 8 +++---- commands/search/bot-info.js | 2 +- commands/search/bulbapedia.js | 2 +- commands/search/danbooru.js | 4 ++-- commands/search/derpibooru.js | 2 +- commands/search/dictionary.js | 4 ++-- commands/search/gelbooru.js | 4 ++-- commands/search/giphy.js | 2 +- commands/search/github.js | 4 ++-- commands/search/imgur.js | 2 +- commands/search/itunes.js | 2 +- commands/search/jisho.js | 2 +- commands/search/kickstarter.js | 2 +- commands/search/konachan.js | 4 ++-- commands/search/league-of-legends-champion.js | 9 ++++---- commands/search/manga.js | 8 +++---- commands/search/map.js | 2 +- commands/search/mdn.js | 2 +- commands/search/movie.js | 10 ++++----- commands/search/nasa.js | 2 +- commands/search/neopet.js | 2 +- commands/search/new-york-times.js | 2 +- commands/search/npm.js | 2 +- commands/search/osu.js | 22 +++++++++---------- commands/search/pokedex.js | 2 +- commands/search/recipe.js | 2 +- commands/search/reddit.js | 3 +-- commands/search/rotten-tomatoes.js | 6 ++--- commands/search/safebooru.js | 2 +- commands/search/steam.js | 12 +++++----- commands/search/stocks.js | 2 +- commands/search/thesaurus.js | 6 ++--- commands/search/tumblr.js | 2 +- commands/search/tv-show.js | 14 ++++++------ commands/search/urban.js | 2 +- commands/search/vocaloid.js | 2 +- commands/search/wattpad.js | 2 +- commands/search/weather.js | 16 +++++++------- commands/search/wikipedia.js | 2 +- commands/search/youtube.js | 2 +- commands/search/yu-gi-oh.js | 2 +- commands/text-edit/anagram.js | 4 +--- commands/text-edit/cow-say.js | 2 +- commands/text-edit/dec-talk.js | 2 +- commands/text-edit/portal-send.js | 2 +- commands/text-edit/ship-name.js | 2 ++ commands/text-edit/translate.js | 2 +- commands/text-edit/yoda.js | 4 ++-- commands/util/help.js | 2 +- package.json | 2 +- 141 files changed, 251 insertions(+), 254 deletions(-) diff --git a/commands/avatar-edit/3000-years.js b/commands/avatar-edit/3000-years.js index 8cd5cd4b..3244df24 100644 --- a/commands/avatar-edit/3000-years.js +++ b/commands/avatar-edit/3000-years.js @@ -43,7 +43,7 @@ module.exports = class YearsCommand extends Command { ctx.drawImage(avatar, 461, 127, 200, 200); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: '3000-years.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/approved.js b/commands/avatar-edit/approved.js index 271c97d5..b93952e7 100644 --- a/commands/avatar-edit/approved.js +++ b/commands/avatar-edit/approved.js @@ -43,7 +43,7 @@ module.exports = class ApprovedCommand extends Command { ctx.drawImage(base, 0, 0, avatar.width, avatar.height); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'approved.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/avatar-fusion.js b/commands/avatar-edit/avatar-fusion.js index b6314bc2..fef7531f 100644 --- a/commands/avatar-edit/avatar-fusion.js +++ b/commands/avatar-edit/avatar-fusion.js @@ -53,7 +53,7 @@ module.exports = class AvatarFusionCommand extends Command { ctx.drawImage(overlayAvatar, 0, 0, baseAvatar.width, baseAvatar.height); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'avatar-fusion.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/beautiful.js b/commands/avatar-edit/beautiful.js index 6ef0b5bb..9b49ed0f 100644 --- a/commands/avatar-edit/beautiful.js +++ b/commands/avatar-edit/beautiful.js @@ -44,7 +44,7 @@ module.exports = class BeautifulCommand extends Command { ctx.drawImage(avatar, 343, 301, 117, 135); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'beautiful.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/bob-ross.js b/commands/avatar-edit/bob-ross.js index 62dce0c4..d6e550d3 100644 --- a/commands/avatar-edit/bob-ross.js +++ b/commands/avatar-edit/bob-ross.js @@ -47,7 +47,7 @@ module.exports = class BobRossCommand extends Command { ctx.drawImage(base, 0, 0); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'bob-ross.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/card.js b/commands/avatar-edit/card.js index 6afd408c..dd5d991a 100644 --- a/commands/avatar-edit/card.js +++ b/commands/avatar-edit/card.js @@ -65,7 +65,7 @@ module.exports = class CardCommand extends Command { ctx.fillText(`#${user.discriminator}`, 313, 355); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'card.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/challenger.js b/commands/avatar-edit/challenger.js index 95d42ec2..6079ff1b 100644 --- a/commands/avatar-edit/challenger.js +++ b/commands/avatar-edit/challenger.js @@ -43,7 +43,7 @@ module.exports = class ChallengerCommand extends Command { ctx.drawImage(avatar, 484, 98, 256, 256); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'challenger.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/christmas-hat.js b/commands/avatar-edit/christmas-hat.js index fd5fa878..a356ae81 100644 --- a/commands/avatar-edit/christmas-hat.js +++ b/commands/avatar-edit/christmas-hat.js @@ -42,7 +42,7 @@ module.exports = class ChristmasHatCommand extends Command { ctx.drawImage(base, 0, 0, avatar.width, avatar.height); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'christmas-hat.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/dexter.js b/commands/avatar-edit/dexter.js index 7f4048d0..8f36e1aa 100644 --- a/commands/avatar-edit/dexter.js +++ b/commands/avatar-edit/dexter.js @@ -44,7 +44,7 @@ module.exports = class DexterCommand extends Command { ctx.rotate(11 * (Math.PI / 180)); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'dexter.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/food-broke.js b/commands/avatar-edit/food-broke.js index ff6461dd..53871051 100644 --- a/commands/avatar-edit/food-broke.js +++ b/commands/avatar-edit/food-broke.js @@ -44,7 +44,7 @@ module.exports = class FoodBrokeCommand extends Command { ctx.drawImage(avatar, 117, 382, 75, 75); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'food-broke.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/greyscale.js b/commands/avatar-edit/greyscale.js index ad2390df..f3709306 100644 --- a/commands/avatar-edit/greyscale.js +++ b/commands/avatar-edit/greyscale.js @@ -42,7 +42,7 @@ module.exports = class GreyscaleCommand extends Command { greyscale(ctx, 0, 0, avatar.width, avatar.height); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'greyscale.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/he-lives-in-you.js b/commands/avatar-edit/he-lives-in-you.js index 841c7b68..427df749 100644 --- a/commands/avatar-edit/he-lives-in-you.js +++ b/commands/avatar-edit/he-lives-in-you.js @@ -45,7 +45,7 @@ module.exports = class HeLivesInYouCommand extends Command { ctx.rotate(24 * (Math.PI / 180)); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'he-lives-in-you.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/i-have-the-power.js b/commands/avatar-edit/i-have-the-power.js index 923a9a56..1c151c21 100644 --- a/commands/avatar-edit/i-have-the-power.js +++ b/commands/avatar-edit/i-have-the-power.js @@ -45,7 +45,7 @@ module.exports = class IHaveThePowerCommand extends Command { ctx.rotate(-18.3 * (Math.PI / 180)); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'i-have-the-power.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/invert.js b/commands/avatar-edit/invert.js index f9bc2cfc..e3dcc093 100644 --- a/commands/avatar-edit/invert.js +++ b/commands/avatar-edit/invert.js @@ -41,7 +41,7 @@ module.exports = class InvertCommand extends Command { invert(ctx, 0, 0, avatar.width, avatar.height); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'invert.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/look-at-this-photograph.js b/commands/avatar-edit/look-at-this-photograph.js index 9d82d515..5bba714b 100644 --- a/commands/avatar-edit/look-at-this-photograph.js +++ b/commands/avatar-edit/look-at-this-photograph.js @@ -45,7 +45,7 @@ module.exports = class LookAtThisPhotographCommand extends Command { ctx.rotate(13.5 * (Math.PI / 180)); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'look-at-this-photograph.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/pixelize.js b/commands/avatar-edit/pixelize.js index 8cc3c843..78952d5c 100644 --- a/commands/avatar-edit/pixelize.js +++ b/commands/avatar-edit/pixelize.js @@ -40,7 +40,7 @@ module.exports = class PixelizeCommand extends Command { ctx.drawImage(avatar, 0, 0, 512, 512); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'pixelize.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/rainbow.js b/commands/avatar-edit/rainbow.js index 27166c01..64f518db 100644 --- a/commands/avatar-edit/rainbow.js +++ b/commands/avatar-edit/rainbow.js @@ -43,7 +43,7 @@ module.exports = class RainbowCommand extends Command { ctx.drawImage(base, 0, 0, avatar.width, avatar.height); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rainbow.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/rejected.js b/commands/avatar-edit/rejected.js index 88f14b4a..e8758fb2 100644 --- a/commands/avatar-edit/rejected.js +++ b/commands/avatar-edit/rejected.js @@ -43,7 +43,7 @@ module.exports = class RejctedCommand extends Command { ctx.drawImage(base, 0, 0, avatar.width, avatar.height); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rejected.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/rip.js b/commands/avatar-edit/rip.js index 43b622cb..79dd18ea 100644 --- a/commands/avatar-edit/rip.js +++ b/commands/avatar-edit/rip.js @@ -45,7 +45,7 @@ module.exports = class RIPCommand extends Command { greyscale(ctx, 158, 51, 200, 200); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rip.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/sepia.js b/commands/avatar-edit/sepia.js index bdb26b65..a802765a 100644 --- a/commands/avatar-edit/sepia.js +++ b/commands/avatar-edit/sepia.js @@ -41,7 +41,7 @@ module.exports = class SepiaCommand extends Command { sepia(ctx, 0, 0, avatar.width, avatar.height); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'sepia.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/silhouette.js b/commands/avatar-edit/silhouette.js index de1bd408..a18085b5 100644 --- a/commands/avatar-edit/silhouette.js +++ b/commands/avatar-edit/silhouette.js @@ -41,7 +41,7 @@ module.exports = class SilhouetteCommand extends Command { silhouette(ctx, 0, 0, avatar.width, avatar.height); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'silhouette.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/steam-card.js b/commands/avatar-edit/steam-card.js index 507c69af..df1b446c 100644 --- a/commands/avatar-edit/steam-card.js +++ b/commands/avatar-edit/steam-card.js @@ -51,7 +51,7 @@ module.exports = class SteamCardCommand extends Command { ctx.fillText(member.displayName, 35, 48); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-card.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/steam-now-playing.js b/commands/avatar-edit/steam-now-playing.js index a2974a70..7eba9ca1 100644 --- a/commands/avatar-edit/steam-now-playing.js +++ b/commands/avatar-edit/steam-now-playing.js @@ -59,7 +59,7 @@ module.exports = class SteamNowPlayingCommand extends Command { ctx.fillText(shorten ? `${game}...` : game, 63, 54); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-now-playing.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/thug-life.js b/commands/avatar-edit/thug-life.js index f6aa669a..f7788899 100644 --- a/commands/avatar-edit/thug-life.js +++ b/commands/avatar-edit/thug-life.js @@ -44,7 +44,7 @@ module.exports = class ThugLifeCommand extends Command { ctx.drawImage(base, 0, 0, avatar.width, avatar.height); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'thug-life.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/triggered.js b/commands/avatar-edit/triggered.js index 7c4faa46..8e08f20d 100644 --- a/commands/avatar-edit/triggered.js +++ b/commands/avatar-edit/triggered.js @@ -47,7 +47,7 @@ module.exports = class TriggeredCommand extends Command { ctx.drawImage(base, 0, 0); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'triggered.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/wanted.js b/commands/avatar-edit/wanted.js index e3e9f236..48761c89 100644 --- a/commands/avatar-edit/wanted.js +++ b/commands/avatar-edit/wanted.js @@ -45,7 +45,7 @@ module.exports = class WantedCommand extends Command { sepia(ctx, 150, 360, 430, 430); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'wanted.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/avatar-edit/yu-gi-oh-token.js b/commands/avatar-edit/yu-gi-oh-token.js index 028f9dd3..7bb369b5 100644 --- a/commands/avatar-edit/yu-gi-oh-token.js +++ b/commands/avatar-edit/yu-gi-oh-token.js @@ -43,7 +43,7 @@ module.exports = class YuGiOhTokenCommand extends Command { ctx.drawImage(avatar, 45, 102, 293, 294); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'yu-gi-oh-token.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/games/akinator.js b/commands/games/akinator.js index 1ecc0ed3..95280f08 100644 --- a/commands/games/akinator.js +++ b/commands/games/akinator.js @@ -19,7 +19,7 @@ module.exports = class AkinatorCommand extends Command { } async run(msg) { - if (this.sessions.has(msg.channel.id)) return msg.say('Only one game may be occuring per channel.'); + if (this.sessions.has(msg.channel.id)) return msg.reply('Only one game may be occuring per channel.'); try { let ans = null; this.sessions.set(msg.channel.id, { progress: null }); @@ -55,12 +55,12 @@ module.exports = class AkinatorCommand extends Command { await msg.embed(embed); const verification = await verify(msg.channel, msg.author); this.sessions.delete(msg.channel.id); - if (verification === 0) return msg.reply('I guess your silence means I have won.'); + if (verification === 0) return msg.say('I guess your silence means I have won.'); if (!verification) return msg.say('Bravo, you have defeated me.'); return msg.say('Guessed right one more time! I love playing with you!'); } catch (err) { this.sessions.delete(msg.channel.id); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } diff --git a/commands/games/battle.js b/commands/games/battle.js index 489fdb3f..768bb712 100644 --- a/commands/games/battle.js +++ b/commands/games/battle.js @@ -25,8 +25,8 @@ module.exports = class BattleCommand extends Command { async run(msg, { opponent }) { // eslint-disable-line complexity if (!opponent) opponent = this.client.user; - if (opponent.id === msg.author.id) return msg.say('You may not fight yourself.'); - if (this.fighting.has(msg.channel.id)) return msg.say('Only one fight may be occurring per channel.'); + if (opponent.id === msg.author.id) return msg.reply('You may not fight yourself.'); + if (this.fighting.has(msg.channel.id)) return msg.reply('Only one fight may be occurring per channel.'); this.fighting.add(msg.channel.id); try { if (!opponent.bot) { @@ -100,7 +100,7 @@ module.exports = class BattleCommand extends Command { forfeit(); break; } else { - await msg.say(`${user}, I do not understand what you want to do.`); + await msg.say('I do not understand what you want to do.'); } } this.fighting.delete(msg.channel.id); diff --git a/commands/games/emoji-emoji-revolution.js b/commands/games/emoji-emoji-revolution.js index 302a170a..eec73791 100644 --- a/commands/games/emoji-emoji-revolution.js +++ b/commands/games/emoji-emoji-revolution.js @@ -25,9 +25,9 @@ module.exports = class EmojiEmojiRevolutionCommand extends Command { } async run(msg, { opponent }) { - if (opponent.bot) return msg.say('Bots may not be played against.'); - if (opponent.id === msg.author.id) return msg.say('You may not play against yourself.'); - if (this.playing.has(msg.channel.id)) return msg.say('Only one fight may be occurring per channel.'); + if (opponent.bot) return msg.reply('Bots may not be played against.'); + if (opponent.id === msg.author.id) return msg.reply('You may not play against yourself.'); + if (this.playing.has(msg.channel.id)) return msg.reply('Only one fight may be occurring per channel.'); this.playing.add(msg.channel.id); try { await msg.say(`${opponent}, do you accept this challenge?`); diff --git a/commands/games/gunfight.js b/commands/games/gunfight.js index 2f28838e..9451ff03 100644 --- a/commands/games/gunfight.js +++ b/commands/games/gunfight.js @@ -24,9 +24,9 @@ module.exports = class GunfightCommand extends Command { } async run(msg, { opponent }) { - if (opponent.bot) return msg.say('Bots may not be fought.'); - if (opponent.id === msg.author.id) return msg.say('You may not fight yourself.'); - if (this.fighting.has(msg.channel.id)) return msg.say('Only one fight may be occurring per channel.'); + if (opponent.bot) return msg.reply('Bots may not be fought.'); + if (opponent.id === msg.author.id) return msg.reply('You may not fight yourself.'); + if (this.fighting.has(msg.channel.id)) return msg.reply('Only one fight may be occurring per channel.'); this.fighting.add(msg.channel.id); try { await msg.say(`${opponent}, do you accept this challenge?`); diff --git a/commands/games/hangman.js b/commands/games/hangman.js index 063d9f1a..3025d9bd 100644 --- a/commands/games/hangman.js +++ b/commands/games/hangman.js @@ -16,7 +16,7 @@ module.exports = class HangmanCommand extends Command { } async run(msg) { - if (this.playing.has(msg.channel.id)) return msg.say('Only one game may be occurring per channel.'); + if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.'); this.playing.add(msg.channel.id); try { const { body } = await snekfetch @@ -73,7 +73,7 @@ module.exports = class HangmanCommand extends Command { return msg.say(`Too bad... It was ${word}...`); } catch (err) { this.playing.delete(msg.channel.id); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/games/hunger-games.js b/commands/games/hunger-games.js index 02cfc304..2ea2ea14 100644 --- a/commands/games/hunger-games.js +++ b/commands/games/hunger-games.js @@ -30,9 +30,9 @@ module.exports = class HungerGamesCommand extends Command { async run(msg, { tributes }) { if (tributes.length < 2) return msg.say(`...${tributes[0]} wins, as they were the only tribute.`); - if (tributes.length > 24) return msg.say('Please do not enter more than 24 tributes.'); - if (new Set(tributes).size !== tributes.length) return msg.say('Please do not enter the same tribute twice.'); - if (this.playing.has(msg.channel.id)) return msg.say('Only one game may be occurring per channel.'); + if (tributes.length > 24) return msg.reply('Please do not enter more than 24 tributes.'); + if (new Set(tributes).size !== tributes.length) return msg.reply('Please do not enter the same tribute twice.'); + if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.'); this.playing.add(msg.channel.id); try { let sun = true; diff --git a/commands/games/lottery.js b/commands/games/lottery.js index c7a7da5b..50c87c8a 100644 --- a/commands/games/lottery.js +++ b/commands/games/lottery.js @@ -12,7 +12,7 @@ module.exports = class LotteryCommand extends Command { run(msg) { const lottery = Math.floor(Math.random() * 100) + 1; - if (lottery === 1) return msg.say('Nice job! 10/10! You deserve some cake!'); - return msg.say('Nope, sorry, you lost.'); + if (lottery === 1) return msg.reply('Nice job! 10/10! You deserve some cake!'); + return msg.reply('Nope, sorry, you lost.'); } }; diff --git a/commands/games/quiz.js b/commands/games/quiz.js index affd3569..13eb36f2 100644 --- a/commands/games/quiz.js +++ b/commands/games/quiz.js @@ -49,7 +49,7 @@ module.exports = class QuizCommand extends Command { encode: 'url3986', difficulty }); - if (!body.results) return msg.say('Oh no, a question could not be fetched. Try again later!'); + if (!body.results) return msg.reply('Oh no, a question could not be fetched. Try again later!'); const answers = body.results[0].incorrect_answers.map(answer => decodeURIComponent(answer.toLowerCase())); const correct = decodeURIComponent(body.results[0].correct_answer.toLowerCase()); answers.push(correct); @@ -67,7 +67,7 @@ module.exports = class QuizCommand extends Command { if (msgs.first().content.toLowerCase() !== correct) return msg.say(`Nope, sorry, it's ${correct}.`); return msg.say('Nice job! 10/10! You deserve some cake!'); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/games/tic-tac-toe.js b/commands/games/tic-tac-toe.js index 85078b75..d861c8b9 100644 --- a/commands/games/tic-tac-toe.js +++ b/commands/games/tic-tac-toe.js @@ -22,9 +22,9 @@ module.exports = class TicTacToeCommand extends Command { } async run(msg, { opponent }) { // eslint-disable-line complexity - if (opponent.bot) return msg.say('Bots may not be played against.'); - if (opponent.id === msg.author.id) return msg.say('You may not play against yourself.'); - if (this.playing.has(msg.channel.id)) return msg.say('Only one game may be occurring per channel.'); + if (opponent.bot) return msg.reply('Bots may not be played against.'); + if (opponent.id === msg.author.id) return msg.reply('You may not play against yourself.'); + if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.'); this.playing.add(msg.channel.id); try { await msg.say(`${opponent}, do you accept this challenge?`); diff --git a/commands/games/whos-that-pokemon.js b/commands/games/whos-that-pokemon.js index 484712eb..8cb55ca7 100644 --- a/commands/games/whos-that-pokemon.js +++ b/commands/games/whos-that-pokemon.js @@ -61,7 +61,7 @@ module.exports = class WhosThatPokemonCommand extends Command { 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!'); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/games/wizard-convention.js b/commands/games/wizard-convention.js index 78f3f48c..d956bed4 100644 --- a/commands/games/wizard-convention.js +++ b/commands/games/wizard-convention.js @@ -18,10 +18,10 @@ module.exports = class WizardConventionCommand extends Command { } async run(msg) { // eslint-disable-line complexity - if (this.playing.has(msg.channel.id)) return msg.say('Only one game may be occurring per channel.'); + if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.'); this.playing.add(msg.channel.id); try { - await msg.say('You will need at least 2 more players. To join, type `join game`.'); + await msg.say('You will need at least 2 more players, at maximum 15. To join, type `join game`.'); const joined = []; joined.push(msg.author.id); const filter = res => { @@ -30,7 +30,10 @@ module.exports = class WizardConventionCommand extends Command { joined.push(res.author.id); return true; }; - const verify = await msg.channel.awaitMessages(filter, { time: 30000 }); + const verify = await msg.channel.awaitMessages(filter, { + max: 15, + time: 30000 + }); if (verify.size < 2) { this.playing.delete(msg.channel.id); return msg.say('Failed to start the game...'); @@ -51,7 +54,7 @@ module.exports = class WizardConventionCommand extends Command { i++; } let turn = 1; - while (players.size > 2) { + while (players.size > 2 && players.exists('role', 'dragon')) { let eaten = null; let healed = null; await msg.say(`Night ${turn}, sending DMs...`); @@ -140,7 +143,6 @@ module.exports = class WizardConventionCommand extends Command { const expelled = counts.sort((a, b) => b.votes - a.votes).first(); await msg.say(`${expelled.user} will be expelled.`); players.delete(expelled.id); - if (!players.exists('role', 'dragon')) break; ++turn; } this.playing.delete(msg.channel.id); @@ -149,7 +151,7 @@ module.exports = class WizardConventionCommand extends Command { return msg.say(`Oh no, the dragon wasn't caught in time... Nice job, ${dragon.user}!`); } catch (err) { this.playing.delete(msg.channel.id); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/image-edit/be-like-bill.js b/commands/image-edit/be-like-bill.js index 26949393..5ff6cd54 100644 --- a/commands/image-edit/be-like-bill.js +++ b/commands/image-edit/be-like-bill.js @@ -37,15 +37,14 @@ module.exports = class BeLikeBillCommand extends Command { const ctx = canvas.getContext('2d'); ctx.drawImage(base, 0, 0); ctx.font = '23px Noto'; - const text = stripIndents` + ctx.fillText(stripIndents` This is ${name}. ${texts[Math.floor(Math.random() * texts.length)].replace(/{{name}}/gi, name)} ${name} is smart. Be like ${name}. - `; - ctx.fillText(text, 31, 80); + `, 31, 80); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'be-like-bill.png' }] }); } }; diff --git a/commands/image-edit/meme.js b/commands/image-edit/meme.js index dbc8248c..d30f8101 100644 --- a/commands/image-edit/meme.js +++ b/commands/image-edit/meme.js @@ -47,7 +47,7 @@ module.exports = class MemeCommand extends Command { const { body } = await snekfetch.get(search.body[0].template.blank.replace(/\/_/, `/${top}/${bottom}`)); return msg.say({ files: [{ attachment: body, name: 'meme.jpg' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/image-edit/robohash.js b/commands/image-edit/robohash.js index 48e11ce6..4f155c56 100644 --- a/commands/image-edit/robohash.js +++ b/commands/image-edit/robohash.js @@ -25,7 +25,7 @@ module.exports = class RobohashCommand extends Command { const { body } = await snekfetch.get(`https://robohash.org/${text}`); return msg.say({ files: [{ attachment: body, name: 'robohash.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index ed989213..3278c7df 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -33,11 +33,11 @@ module.exports = class BanCommand extends Command { } async run(msg, { member, reason }) { - if (member.id === msg.author.id) return msg.say('I don\'t think you want to ban yourself...'); - if (member.id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?'); - if (!member.bannable) return msg.say('This member is not bannable. Perhaps they have a higher role than me?'); + if (member.id === msg.author.id) return msg.reply('I don\'t think you want to ban yourself...'); + if (member.id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?'); + if (!member.bannable) return msg.reply('This member is not bannable. Perhaps they have a higher role than me?'); if (member.highestRole.position > msg.member.highestRole.position - 1) { - return msg.say('Your roles are too low to ban this member.'); + return msg.reply('Your roles are too low to ban this member.'); } await msg.say(`Are you sure you want to ban ${member.user.tag} (${member.id})?`); const verification = await verify(msg.channel, msg.author); @@ -56,7 +56,7 @@ module.exports = class BanCommand extends Command { reason: `${msg.author.tag}: ${reason}` }); } catch (err) { - return msg.say(`Failed to ban ${member.user.tag}: \`${err.message}\`.`); + return msg.reply(`Failed to ban ${member.user.tag}: \`${err.message}\`.`); } return msg.say(`Successfully banned ${member.user.tag}.`); } diff --git a/commands/moderation/clear-channel.js b/commands/moderation/clear-channel.js index e44b81ea..0854f9a4 100644 --- a/commands/moderation/clear-channel.js +++ b/commands/moderation/clear-channel.js @@ -19,7 +19,7 @@ module.exports = class ClearChannelCommand extends Command { } async run(msg) { - if (!msg.channel.deletable) return msg.say('This channel cannot be deleted.'); + if (!msg.channel.deletable) return msg.reply('This channel cannot be deleted.'); const channel = await msg.channel.clone(); if (msg.channel.parent) await channel.setParent(msg.channel.parent); await msg.channel.delete(); diff --git a/commands/moderation/hackban.js b/commands/moderation/hackban.js index 15321cb2..a4b3c4fa 100644 --- a/commands/moderation/hackban.js +++ b/commands/moderation/hackban.js @@ -32,13 +32,13 @@ module.exports = class HackbanCommand extends Command { } async run(msg, { id, reason }) { - if (id === msg.author.id) return msg.say('I don\'t think you want to ban yourself...'); - if (id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?'); + if (id === msg.author.id) return msg.reply('I don\'t think you want to ban yourself...'); + if (id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?'); let user; try { user = await this.client.users.fetch(id); } catch (err) { - return msg.say('Could not resolve user.'); + return msg.reply('Could not resolve user.'); } await msg.say(`Are you sure you want to hackban ${user.tag} (${user.id})?`); const verification = await verify(msg.channel, msg.author); @@ -49,7 +49,7 @@ module.exports = class HackbanCommand extends Command { reason: `${msg.author.tag}: ${reason}` }); } catch (err) { - return msg.say(`Failed to hackban ${user.tag}: \`${err.message}\`.`); + return msg.reply(`Failed to hackban ${user.tag}: \`${err.message}\`.`); } return msg.say(`Successfully hackbanned ${user.tag}.`); } diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index 8905e423..2af3caf5 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -33,11 +33,11 @@ module.exports = class KickCommand extends Command { } async run(msg, { member, reason }) { - if (member.id === msg.author.id) return msg.say('I don\'t think you want to kick yourself...'); - if (member.id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?'); - if (!member.kickable) return msg.say('This member is not kickable. Perhaps they have a higher role than me?'); + if (member.id === msg.author.id) return msg.reply('I don\'t think you want to kick yourself...'); + if (member.id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?'); + if (!member.kickable) return msg.reply('This member is not kickable. Perhaps they have a higher role than me?'); if (member.highestRole.position > msg.member.highestRole.position - 1) { - return msg.say('Your roles are too low to kick this member.'); + return msg.reply('Your roles are too low to kick this member.'); } await msg.say(`Are you sure you want to kick ${member.user.tag} (${member.id})?`); const verification = await verify(msg.channel, msg.author); @@ -53,7 +53,7 @@ module.exports = class KickCommand extends Command { try { await member.kick(`${msg.author.tag}: ${reason}`); } catch (err) { - return msg.say(`Failed to kick ${member.user.tag}: \`${err.message}\`.`); + return msg.reply(`Failed to kick ${member.user.tag}: \`${err.message}\`.`); } return msg.say(`Successfully kicked ${member.user.tag}.`); } diff --git a/commands/moderation/prune.js b/commands/moderation/prune.js index 32759a41..43d3f9de 100644 --- a/commands/moderation/prune.js +++ b/commands/moderation/prune.js @@ -34,10 +34,10 @@ module.exports = class PruneCommand extends Command { try { const messages = await msg.channel.messages.fetch({ limit: count + 1 }); const msgs = await msg.channel.bulkDelete(messages, true); - if (!msgs.size) return msg.say('There are no messages younger than two weeks that can be deleted.'); + if (!msgs.size) return msg.reply('There are no messages younger than two weeks that can be deleted.'); return null; } catch (err) { - return msg.say('There are no messages younger than two weeks that can be deleted.'); + return msg.reply('There are no messages younger than two weeks that can be deleted.'); } } }; diff --git a/commands/moderation/softban.js b/commands/moderation/softban.js index 6e823ee6..50957dea 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -33,11 +33,11 @@ module.exports = class SoftbanCommand extends Command { } async run(msg, { member, reason }) { - if (member.id === msg.author.id) return msg.say('I don\'t think you want to softban yourself...'); - if (member.id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?'); - if (!member.bannable) return msg.say('This member is not softbannable. Perhaps they have a higher role than me?'); + if (member.id === msg.author.id) return msg.reply('I don\'t think you want to softban yourself...'); + if (member.id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?'); + if (!member.bannable) return msg.reply('This member is not softbannable. Perhaps they have a higher role than me?'); if (member.highestRole.position > msg.member.highestRole.position - 1) { - return msg.say('Your roles are too low to softban this member.'); + return msg.reply('Your roles are too low to softban this member.'); } await msg.say(`Are you sure you want to softban ${member.user.tag} (${member.id})?`); const verification = await verify(msg.channel, msg.author); @@ -57,7 +57,7 @@ module.exports = class SoftbanCommand extends Command { }); await msg.guild.unban(member.user, 'Softban'); } catch (err) { - return msg.say(`Failed to softban ${member.user.tag}: \`${err.message}\`.`); + return msg.reply(`Failed to softban ${member.user.tag}: \`${err.message}\`.`); } return msg.say(`Successfully softbanned ${member.user.tag}.`); } diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index 06f6d087..ce7b326c 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -33,7 +33,7 @@ module.exports = class UnbanCommand extends Command { async run(msg, { id, reason }) { const bans = await msg.guild.fetchBans(); - if (!bans.has(id)) return msg.say('This ID is not in the server banlist.'); + if (!bans.has(id)) return msg.reply('This ID is not in the server banlist.'); const member = bans.get(id).user; await msg.say(`Are you sure you want to unban ${member.tag} (${member.id})?`); const verification = await verify(msg.channel, msg.author); @@ -41,7 +41,7 @@ module.exports = class UnbanCommand extends Command { try { await msg.guild.unban(member, `${msg.author.tag}: ${reason}`); } catch (err) { - return msg.say(`Failed to unban ${member.tag}: \`${err.message}\`.`); + return msg.reply(`Failed to unban ${member.tag}: \`${err.message}\`.`); } return msg.say(`Successfully unbanned ${member.tag}.`); } diff --git a/commands/num-edit/currency.js b/commands/num-edit/currency.js index 9cb23552..ed67f259 100644 --- a/commands/num-edit/currency.js +++ b/commands/num-edit/currency.js @@ -53,7 +53,7 @@ module.exports = class CurrencyCommand extends Command { }); return msg.say(`${amount} ${base} is ${amount * body.rates[target]} ${target}.`); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/astronomy-picture-of-the-day.js b/commands/other/astronomy-picture-of-the-day.js index 284dfc8e..112ff934 100644 --- a/commands/other/astronomy-picture-of-the-day.js +++ b/commands/other/astronomy-picture-of-the-day.js @@ -22,7 +22,7 @@ module.exports = class AstronomyPictureOfTheDayCommand extends Command { .query({ api_key: GOV_KEY }); return msg.say(shorten(body.explanation), { files: [body.url] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/avatar.js b/commands/other/avatar.js index 6334a35e..9b25b2af 100644 --- a/commands/other/avatar.js +++ b/commands/other/avatar.js @@ -23,9 +23,8 @@ module.exports = class AvatarCommand extends Command { async run(msg, { user }) { if (!user) user = msg.author; - if (!user.avatar) return msg.say('This user has no avatar.'); - const format = user.avatar.startsWith('a_') ? 'gif' : 'png'; - const avatarURL = user.avatarURL({ + const format = user.avatar && user.avatar.startsWith('a_') ? 'gif' : 'png'; + const avatarURL = user.displayAvatarURL({ format, size: 512 }); @@ -33,7 +32,7 @@ module.exports = class AvatarCommand extends Command { const { body } = await snekfetch.get(avatarURL); return msg.say({ files: [{ attachment: body, name: `avatar.${format}` }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/coolness.js b/commands/other/coolness.js index 7ff6f42b..9d259847 100644 --- a/commands/other/coolness.js +++ b/commands/other/coolness.js @@ -21,13 +21,12 @@ module.exports = class CoolnessCommand extends Command { run(msg, { user }) { if (!user) user = msg.author; const coolness = user.id / this.client.user.id; - const prefix = user.id === msg.author.id ? 'You\'re' : 'They\'re'; - if (user.id === '234318196893548545') return msg.reply(`${prefix} the best person ever ❤.`); - if (coolness < 0.3) return msg.reply(`${prefix} the coolest being to walk this Earth.`); - if (coolness < 0.5) return msg.reply(`${prefix} an extremely cool dude.`); - if (coolness < 0.8) return msg.reply(`${prefix} pretty sweet, not gonna lie.`); - if (coolness < 1) return msg.reply(`${prefix} okay, nothing special.`); - if (coolness < 1.3) return msg.reply(`${prefix} just not all that neat.`); - return msg.reply(`${prefix} awful, honestly.`); + if (user.id === '234318196893548545') return msg.say(`${user.username} is the best person ever ❤.`); + if (coolness < 0.3) return msg.say(`${user.username} is the coolest being to walk this Earth.`); + if (coolness < 0.5) return msg.say(`${user.username} is an extremely cool dude.`); + if (coolness < 0.8) return msg.say(`${user.username} is pretty sweet, not gonna lie.`); + if (coolness < 1) return msg.say(`${user.username} is okay, nothing special.`); + if (coolness < 1.3) return msg.say(`${user.username} is just not all that neat.`); + return msg.say(`${user.username} is awful, honestly.`); } }; diff --git a/commands/other/days-until.js b/commands/other/days-until.js index 28e87eb6..c4ca2c8e 100644 --- a/commands/other/days-until.js +++ b/commands/other/days-until.js @@ -23,12 +23,13 @@ module.exports = class DaysUntilCommand extends Command { run(msg, { date }) { const month = parseInt(date[0], 10); const day = parseInt(date[1], 10); - if (!month || !day) return msg.say('There are N/A days until Invalid Date!'); + if (!month || !day) return msg.reply('Invalid date.'); const now = new Date(); let year = now.getMonth() + 1 <= month ? now.getFullYear() : now.getFullYear() + 1; if (month === now.getMonth() + 1 && now.getDate() >= day) ++year; const future = new Date(`${month}/${day}/${year}`); const time = Math.round((future - now) / (1000 * 60 * 60 * 24)) + 1; - return msg.say(`There are ${time || 'N/A'} days until ${future.toDateString()}!`); + if (!time) return msg.reply('Invalid date.'); + return msg.say(`There are ${time} days until ${future.toDateString()}!`); } }; diff --git a/commands/other/gender-guess.js b/commands/other/gender-guess.js index fb5752cb..911d92ad 100644 --- a/commands/other/gender-guess.js +++ b/commands/other/gender-guess.js @@ -31,7 +31,7 @@ module.exports = class GenderGuessCommand extends Command { const gender = body.male > body.female ? 'male' : 'female'; return msg.say(`I'm ${body[gender]}% sure ${body.name} is a ${gender} name.`); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/google-autofill.js b/commands/other/google-autofill.js index 9762ed7e..e64b4c25 100644 --- a/commands/other/google-autofill.js +++ b/commands/other/google-autofill.js @@ -31,7 +31,7 @@ module.exports = class GoogleAutofillCommand extends Command { if (!data.length) return msg.say('Could not find any results.'); return msg.say(data.join('\n')); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/google-doodle.js b/commands/other/google-doodle.js index 2c9463a2..59d0d7af 100644 --- a/commands/other/google-doodle.js +++ b/commands/other/google-doodle.js @@ -40,7 +40,7 @@ module.exports = class GoogleDoodleCommand extends Command { const data = body[latest ? 0 : Math.floor(Math.random() * body.length)]; return msg.say(data.share_text, { files: [`https:${data.url}`] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/horoscope.js b/commands/other/horoscope.js index 4213fb9f..9d618559 100644 --- a/commands/other/horoscope.js +++ b/commands/other/horoscope.js @@ -46,7 +46,7 @@ module.exports = class HoroscopeCommand extends Command { body.date, true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/shorten-url.js b/commands/other/shorten-url.js index 4af06dbe..e5073936 100644 --- a/commands/other/shorten-url.js +++ b/commands/other/shorten-url.js @@ -28,7 +28,7 @@ module.exports = class ShortenURLCommand extends Command { .send({ longUrl: url }); return msg.say(`<${body.id}>`); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/soundboard.js b/commands/other/soundboard.js index fd1db091..881e63e6 100644 --- a/commands/other/soundboard.js +++ b/commands/other/soundboard.js @@ -36,12 +36,12 @@ module.exports = class SoundboardCommand extends Command { async run(msg, { sound }) { if (!sound) sound = sounds[Math.floor(Math.random() * sounds.length)]; const channel = msg.member.voiceChannel; - if (!channel) return msg.say('Please enter a voice channel first.'); + if (!channel) return msg.reply('Please enter a voice channel first.'); if (!channel.permissionsFor(this.client.user).has(['CONNECT', 'SPEAK'])) { - return msg.say('Missing the "Connect" or "Speak" permission for the voice channel.'); + return msg.reply('Missing the "Connect" or "Speak" permission for the voice channel.'); } - if (!channel.joinable) return msg.say('Your voice channel is not joinable.'); - if (this.client.voiceConnections.has(channel.guild.id)) return msg.say('I am already playing a sound.'); + if (!channel.joinable) return msg.reply('Your voice channel is not joinable.'); + if (this.client.voiceConnections.has(channel.guild.id)) return msg.reply('I am already playing a sound.'); try { const connection = await channel.join(); const dispatcher = connection.playFile(path.join(__dirname, '..', '..', 'assets', 'sounds', `${sound}.mp3`)); diff --git a/commands/other/spoopy-link.js b/commands/other/spoopy-link.js index c1bba1e5..606b55a3 100644 --- a/commands/other/spoopy-link.js +++ b/commands/other/spoopy-link.js @@ -29,7 +29,7 @@ module.exports = class SpoopyLinkCommand extends Command { ${body.chain.map(url => `<${url.url}> ${url.safe ? '✅' : `❌ (${url.reasons.join(', ')})`}`).join('\n')} `); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/strawpoll.js b/commands/other/strawpoll.js index 4a5b9bb9..33f13d3c 100644 --- a/commands/other/strawpoll.js +++ b/commands/other/strawpoll.js @@ -35,8 +35,8 @@ module.exports = class StrawpollCommand extends Command { } async run(msg, { title, options }) { - if (options.length < 2) return msg.say('Please provide more than one choice.'); - if (options.length > 31) return msg.say('Please provide thirty or less choices.'); + if (options.length < 2) return msg.reply('Please provide more than one choice.'); + if (options.length > 31) return msg.reply('Please provide thirty or less choices.'); try { const { body } = await snekfetch .post('https://www.strawpoll.me/api/v2/polls') @@ -47,7 +47,7 @@ module.exports = class StrawpollCommand extends Command { http://www.strawpoll.me/${body.id} `); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/word-of-the-day.js b/commands/other/word-of-the-day.js index 9598a87f..53c46ff3 100644 --- a/commands/other/word-of-the-day.js +++ b/commands/other/word-of-the-day.js @@ -21,10 +21,10 @@ module.exports = class WordOfTheDayCommand extends Command { .query({ api_key: WORDNIK_KEY }); return msg.say(stripIndents` **${body.word}** - (${body.definitions[0].partOfSpeech || 'N/A'}) ${body.definitions[0].text} + (${body.definitions[0].partOfSpeech || '???'}) ${body.definitions[0].text} `); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/other/xkcd.js b/commands/other/xkcd.js index 23007d6b..ac976051 100644 --- a/commands/other/xkcd.js +++ b/commands/other/xkcd.js @@ -57,7 +57,7 @@ module.exports = class XKCDCommand extends Command { .setFooter(body.alt); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/random-res/cat.js b/commands/random-res/cat.js index c890059d..b8a0c034 100644 --- a/commands/random-res/cat.js +++ b/commands/random-res/cat.js @@ -18,7 +18,7 @@ module.exports = class CatCommand extends Command { const { body } = await snekfetch.get('http://random.cat/meow'); return msg.say({ files: [body.file] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/random-res/chuck-norris.js b/commands/random-res/chuck-norris.js index 1be17592..5b1eec98 100644 --- a/commands/random-res/chuck-norris.js +++ b/commands/random-res/chuck-norris.js @@ -30,7 +30,7 @@ module.exports = class ChuckNorrisCommand extends Command { }); return msg.say(body.value.joke); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/random-res/dog.js b/commands/random-res/dog.js index be6aca83..0c2901aa 100644 --- a/commands/random-res/dog.js +++ b/commands/random-res/dog.js @@ -18,7 +18,7 @@ module.exports = class DogCommand extends Command { const { body } = await snekfetch.get('https://dog.ceo/api/breeds/image/random'); return msg.say({ files: [body.message] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/random-res/guess-my-looks.js b/commands/random-res/guess-my-looks.js index d9880b80..e37a2c4d 100644 --- a/commands/random-res/guess-my-looks.js +++ b/commands/random-res/guess-my-looks.js @@ -36,10 +36,9 @@ module.exports = class GuessMyLooksCommand extends Command { const inches = Math.floor(Math.random() * 12); const weight = Math.floor(Math.random() * (300 - 50 + 1)) + 50; const extra = extras[Math.floor(Math.random() * extras.length)]; - const prefix = user.id === msg.author.id ? 'You' : 'They'; - return msg.reply(oneLine` - ${prefix} are, I think, a ${age} year old ${gender} with ${eyeColor} eyes and ${hairStyle} ${hairColor} hair. - ${prefix} are ${feet}'${inches}" and weigh ${weight} pounds. Don't forget the ${extra}! + return msg.say(oneLine` + I think ${user.username} is a ${age} year old ${gender} with ${eyeColor} eyes and ${hairStyle} ${hairColor} + hair. They are ${feet}'${inches}" and weigh ${weight} pounds. Don't forget the ${extra}! `); } }; diff --git a/commands/random-res/history.js b/commands/random-res/history.js index a1152a1d..460646c1 100644 --- a/commands/random-res/history.js +++ b/commands/random-res/history.js @@ -39,7 +39,7 @@ module.exports = class HistoryCommand extends Command { return msg.embed(embed); } catch (err) { if (err.status === 404 || err.status === 500) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/random-res/name.js b/commands/random-res/name.js index 66811117..398083f5 100644 --- a/commands/random-res/name.js +++ b/commands/random-res/name.js @@ -37,7 +37,7 @@ module.exports = class NameCommand extends Command { }); return msg.say(body[0]); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/random-res/number-fact.js b/commands/random-res/number-fact.js index 933ca1fc..3a0f1a66 100644 --- a/commands/random-res/number-fact.js +++ b/commands/random-res/number-fact.js @@ -24,7 +24,7 @@ module.exports = class NumberFactCommand extends Command { return msg.say(text); } catch (err) { if (err.status === 404) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/random-res/quantum-coin.js b/commands/random-res/quantum-coin.js index 85a6d4ce..7b3c9535 100644 --- a/commands/random-res/quantum-coin.js +++ b/commands/random-res/quantum-coin.js @@ -1,5 +1,5 @@ const { Command } = require('discord.js-commando'); -const sides = ['on nothing', 'on NaN', 'on 0', 'in the air', 'on null']; +const sides = ['on NaN', 'on 0', 'in the air', 'on null', 'on undefined', 'on \'\'']; module.exports = class QuantumCoinCommand extends Command { constructor(client) { diff --git a/commands/random-res/quote.js b/commands/random-res/quote.js index 17984bc4..13c757bb 100644 --- a/commands/random-res/quote.js +++ b/commands/random-res/quote.js @@ -16,7 +16,7 @@ module.exports = class QuoteCommand extends Command { const { body } = await snekfetch.get('https://talaikis.com/api/quotes/random/'); return msg.say(`${body.quote} - _${body.author}_`); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/random-res/shower-thought.js b/commands/random-res/shower-thought.js index b2e4c1ff..4a492be8 100644 --- a/commands/random-res/shower-thought.js +++ b/commands/random-res/shower-thought.js @@ -21,7 +21,7 @@ module.exports = class ShowerThoughtCommand extends Command { if (!allowed.length) return msg.say('Hmm... It seems the thoughts are all gone right now. Try again later!'); return msg.say(allowed[Math.floor(Math.random() * allowed.length)].data.title); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/roleplay/break-up.js b/commands/roleplay/break-up.js index eaecafed..204f77f7 100644 --- a/commands/roleplay/break-up.js +++ b/commands/roleplay/break-up.js @@ -28,7 +28,7 @@ module.exports = class BreakUpCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *breaks up with* **${user.username}** + _**${msg.author.username}** breaks up with **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/cuddle.js b/commands/roleplay/cuddle.js index 457cd6d4..14d20685 100644 --- a/commands/roleplay/cuddle.js +++ b/commands/roleplay/cuddle.js @@ -27,7 +27,7 @@ module.exports = class CuddleCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *cuddles* **${user.username}** + _**${msg.author.username}** cuddles with **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/eat.js b/commands/roleplay/eat.js index 60e61fec..a250142b 100644 --- a/commands/roleplay/eat.js +++ b/commands/roleplay/eat.js @@ -27,7 +27,7 @@ module.exports = class EatCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *eats* **${user.username}** + _**${msg.author.username}** eats **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/evolve.js b/commands/roleplay/evolve.js index bff89964..434cf80e 100644 --- a/commands/roleplay/evolve.js +++ b/commands/roleplay/evolve.js @@ -27,7 +27,7 @@ module.exports = class EvolveCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${user.username}** *is evolving!* + _**${user.username}** is evolving!_ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/falcon-punch.js b/commands/roleplay/falcon-punch.js index 769914c6..edcb908f 100644 --- a/commands/roleplay/falcon-punch.js +++ b/commands/roleplay/falcon-punch.js @@ -27,7 +27,7 @@ module.exports = class FalconPunchCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *falcon punches* **${user.username}** + _**${msg.author.username}** falcon punches **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/fist-bump.js b/commands/roleplay/fist-bump.js index 8381c99b..9f85346d 100644 --- a/commands/roleplay/fist-bump.js +++ b/commands/roleplay/fist-bump.js @@ -27,7 +27,7 @@ module.exports = class FistBumpCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *fist-bumps* **${user.username}** + _**${msg.author.username}** fist-bumps **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/high-five.js b/commands/roleplay/high-five.js index 2dd17eaa..c30959d3 100644 --- a/commands/roleplay/high-five.js +++ b/commands/roleplay/high-five.js @@ -27,7 +27,7 @@ module.exports = class HighFiveCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *high-fives* **${user.username}** + _**${msg.author.username}** high-fives **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/hit-with-shovel.js b/commands/roleplay/hit-with-shovel.js index 4057ceaa..be5c28b9 100644 --- a/commands/roleplay/hit-with-shovel.js +++ b/commands/roleplay/hit-with-shovel.js @@ -20,7 +20,7 @@ module.exports = class HitWithShovelCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *hits* **${user.username}** *with a shovel* + _**${msg.author.username}** hits **${user.username}** with a shovel._ https://i.imgur.com/XDIUq02.gif `); } diff --git a/commands/roleplay/hug.js b/commands/roleplay/hug.js index 4bfef5a1..8ba8d23d 100644 --- a/commands/roleplay/hug.js +++ b/commands/roleplay/hug.js @@ -27,7 +27,7 @@ module.exports = class HugCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *hugs* **${user.username}** + _**${msg.author.username}** hugs **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/inhale.js b/commands/roleplay/inhale.js index 708258cf..c903119a 100644 --- a/commands/roleplay/inhale.js +++ b/commands/roleplay/inhale.js @@ -27,7 +27,7 @@ module.exports = class InhaleCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *inhales* **${user.username}** *but gained no ability...* + _**${msg.author.username}** inhales **${user.username}** but gained no ability..._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/kill.js b/commands/roleplay/kill.js index 1bd4f55f..4371644d 100644 --- a/commands/roleplay/kill.js +++ b/commands/roleplay/kill.js @@ -20,7 +20,7 @@ module.exports = class KillCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *kills* **${user.username}** + _**${msg.author.username}** kills **${user.username}**._ https://i.imgur.com/KqWkaTf.gif `); } diff --git a/commands/roleplay/kiss.js b/commands/roleplay/kiss.js index 5afc382c..05f5e8e6 100644 --- a/commands/roleplay/kiss.js +++ b/commands/roleplay/kiss.js @@ -27,7 +27,7 @@ module.exports = class KissCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *kisses* **${user.username}** + _**${msg.author.username}** kisses **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/marry.js b/commands/roleplay/marry.js index 9521a36b..5610a0ef 100644 --- a/commands/roleplay/marry.js +++ b/commands/roleplay/marry.js @@ -26,7 +26,7 @@ module.exports = class MarryCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *marries* **${user.username}** + _**${msg.author.username}** marries **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/pat.js b/commands/roleplay/pat.js index addab15a..8bd692ec 100644 --- a/commands/roleplay/pat.js +++ b/commands/roleplay/pat.js @@ -27,7 +27,7 @@ module.exports = class PatCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *pats* **${user.username}** + _**${msg.author.username}** pats **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/poke.js b/commands/roleplay/poke.js index 7b14e0ae..93114d15 100644 --- a/commands/roleplay/poke.js +++ b/commands/roleplay/poke.js @@ -27,7 +27,7 @@ module.exports = class PokeCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *pokes* **${user.username}** + _**${msg.author.username}** pokes **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/punch.js b/commands/roleplay/punch.js index f9b714d7..e5880bb6 100644 --- a/commands/roleplay/punch.js +++ b/commands/roleplay/punch.js @@ -27,7 +27,7 @@ module.exports = class PunchCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *punches* **${user.username}** + _**${msg.author.username}** punches **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/slap.js b/commands/roleplay/slap.js index 687aa39b..505432ad 100644 --- a/commands/roleplay/slap.js +++ b/commands/roleplay/slap.js @@ -27,7 +27,7 @@ module.exports = class SlapCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *slaps* **${user.username}** + _**${msg.author.username}** slaps **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/roleplay/tackle.js b/commands/roleplay/tackle.js index 503932cb..db237baf 100644 --- a/commands/roleplay/tackle.js +++ b/commands/roleplay/tackle.js @@ -28,7 +28,7 @@ module.exports = class TackleCommand extends Command { run(msg, { user }) { return msg.say(stripIndents` - **${msg.author.username}** *tackles* **${user.username}** + _**${msg.author.username}** tackles **${user.username}**._ ${gifs[Math.floor(Math.random() * gifs.length)]} `); } diff --git a/commands/search/anime.js b/commands/search/anime.js index 8cc0f8c1..6b99d7e3 100644 --- a/commands/search/anime.js +++ b/commands/search/anime.js @@ -40,14 +40,14 @@ module.exports = class AnimeCommand extends Command { .addField('❯ Type', `${data.showType} - ${data.status}`, true) .addField('❯ Episodes', - data.episodeCount || 'N/A', true) + data.episodeCount || '???', true) .addField('❯ Start Date', - data.startDate ? new Date(data.startDate).toDateString() : 'N/A', true) + data.startDate ? new Date(data.startDate).toDateString() : '???', true) .addField('❯ End Date', - data.endDate ? new Date(data.endDate).toDateString() : 'N/A', true); + data.endDate ? new Date(data.endDate).toDateString() : '???', true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/bot-info.js b/commands/search/bot-info.js index c3bfc5bc..bbcf93cf 100644 --- a/commands/search/bot-info.js +++ b/commands/search/bot-info.js @@ -42,7 +42,7 @@ module.exports = class BotInfoCommand extends Command { return msg.embed(embed); } catch (err) { if (err.status === 404) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/bulbapedia.js b/commands/search/bulbapedia.js index 5d8d3098..c743f950 100644 --- a/commands/search/bulbapedia.js +++ b/commands/search/bulbapedia.js @@ -48,7 +48,7 @@ module.exports = class BulbapediaCommand extends Command { .setDescription(shorten(data.extract.replace(/\n/g, '\n\n'))); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/danbooru.js b/commands/search/danbooru.js index 178c8645..624634aa 100644 --- a/commands/search/danbooru.js +++ b/commands/search/danbooru.js @@ -24,7 +24,7 @@ module.exports = class DanbooruCommand extends Command { } async run(msg, { query }) { - if (!msg.channel.nsfw) return msg.say('This command can only be used in NSFW channels.'); + if (!msg.channel.nsfw) return msg.reply('This command can only be used in NSFW channels.'); try { const { body } = await snekfetch .get('https://danbooru.donmai.us/posts.json') @@ -35,7 +35,7 @@ module.exports = class DanbooruCommand extends Command { if (!body.length || !body[0].file_url) return msg.say('Could not find any results.'); return msg.say(`https://danbooru.donmai.us${body[0].file_url}`); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/derpibooru.js b/commands/search/derpibooru.js index ac98917d..aab7b046 100644 --- a/commands/search/derpibooru.js +++ b/commands/search/derpibooru.js @@ -31,7 +31,7 @@ module.exports = class DerpibooruCommand extends Command { const { body } = await snekfetch.get(`https://derpibooru.org/images/${search.body.id}.json`); return msg.say(`https:${body.representations.medium}`); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/dictionary.js b/commands/search/dictionary.js index d39bb57b..96fdec94 100644 --- a/commands/search/dictionary.js +++ b/commands/search/dictionary.js @@ -35,10 +35,10 @@ module.exports = class DictionaryCommand extends Command { const data = body[0]; return msg.say(stripIndents` **${data.word}** - (${data.partOfSpeech || 'N/A'}) ${data.text} + (${data.partOfSpeech || '???'}) ${data.text} `); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/gelbooru.js b/commands/search/gelbooru.js index 83ed9c64..10a29fea 100644 --- a/commands/search/gelbooru.js +++ b/commands/search/gelbooru.js @@ -21,7 +21,7 @@ module.exports = class GelbooruCommand extends Command { } async run(msg, { query }) { - if (!msg.channel.nsfw) return msg.say('This command can only be used in NSFW channels.'); + if (!msg.channel.nsfw) return msg.reply('This command can only be used in NSFW channels.'); try { const { text } = await snekfetch .get('https://gelbooru.com/index.php') @@ -35,7 +35,7 @@ module.exports = class GelbooruCommand extends Command { if (!parsed.post || !parsed.post.length) return msg.say('Could not find any results.'); return msg.say(parsed.post[Math.floor(Math.random() * parsed.post.length)]._attributes.file_url); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/giphy.js b/commands/search/giphy.js index 991da5de..af3a3155 100644 --- a/commands/search/giphy.js +++ b/commands/search/giphy.js @@ -32,7 +32,7 @@ module.exports = class GiphyCommand extends Command { if (!body.data.length) return msg.say('Could not find any results.'); return msg.say(body.data[Math.floor(Math.random() * body.data.length)].images.original.url); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/github.js b/commands/search/github.js index 5d62f389..784edc80 100644 --- a/commands/search/github.js +++ b/commands/search/github.js @@ -47,7 +47,7 @@ module.exports = class GitHubCommand extends Command { .addField('❯ Issues', body.open_issues, true) .addField('❯ Language', - body.language || 'N/A', true) + body.language || '???', true) .addField('❯ Created', new Date(body.created_at).toDateString(), true) .addField('❯ Modified', @@ -55,7 +55,7 @@ module.exports = class GitHubCommand extends Command { return msg.embed(embed); } catch (err) { if (err.status === 404) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/imgur.js b/commands/search/imgur.js index 664dded6..3f834329 100644 --- a/commands/search/imgur.js +++ b/commands/search/imgur.js @@ -30,7 +30,7 @@ module.exports = class ImgurCommand extends Command { if (!images.length) return msg.say('Could not find any results.'); return msg.say(images[Math.floor(Math.random() * images.length)].images[0].link); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/itunes.js b/commands/search/itunes.js index 3625be10..597b59a7 100644 --- a/commands/search/itunes.js +++ b/commands/search/itunes.js @@ -64,7 +64,7 @@ module.exports = class ITunesCommand extends Command { data.primaryGenreName, true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/jisho.js b/commands/search/jisho.js index 40aaba83..92c1cf10 100644 --- a/commands/search/jisho.js +++ b/commands/search/jisho.js @@ -32,7 +32,7 @@ module.exports = class JishoCommand extends Command { ${data.senses[0].english_definitions.join(', ')} `); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/kickstarter.js b/commands/search/kickstarter.js index 31aaef8a..c0be3e14 100644 --- a/commands/search/kickstarter.js +++ b/commands/search/kickstarter.js @@ -49,7 +49,7 @@ module.exports = class KickstarterCommand extends Command { data.creator.name, true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/konachan.js b/commands/search/konachan.js index aa26901b..35678c9b 100644 --- a/commands/search/konachan.js +++ b/commands/search/konachan.js @@ -20,7 +20,7 @@ module.exports = class KonachanCommand extends Command { } async run(msg, { query }) { - if (!msg.channel.nsfw) return msg.say('This command can only be used in NSFW channels.'); + if (!msg.channel.nsfw) return msg.reply('This command can only be used in NSFW channels.'); try { const { body } = await snekfetch .get('https://konachan.net/post.json') @@ -31,7 +31,7 @@ module.exports = class KonachanCommand extends Command { if (!body.length || !body[0].file_url) return msg.say('Could not find any results.'); return msg.say(`https:${body[0].file_url}`); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/league-of-legends-champion.js b/commands/search/league-of-legends-champion.js index 88814a41..70ea895e 100644 --- a/commands/search/league-of-legends-champion.js +++ b/commands/search/league-of-legends-champion.js @@ -24,13 +24,13 @@ module.exports = class LeagueOfLegendsChampionCommand extends Command { }); this.version = null; - this.client.setInterval(() => (this.version = null), 3600000); // eslint-disable-line no-extra-parens + this.client.setInterval(() => { this.version = null }, 3600000); } async run(msg, { champion }) { if (champion === 'satan') champion = 'teemo'; try { - if (!this.version) await this.fetchVersion(); + if (!this.version) this.version = await this.fetchVersion(); const search = await snekfetch .get(`https://ddragon.leagueoflegends.com/cdn/${this.version}/data/en_US/champion.json`); const name = Object.keys(search.body.data).find(key => key.toLowerCase() === champion); @@ -84,7 +84,7 @@ module.exports = class LeagueOfLegendsChampionCommand extends Command { data.spells.map((spell, i) => `${spell.name} (${buttons[i]})`).join('\n')); return msg.say(`Tip: ${tips[Math.floor(Math.random() * tips.length)]}`, { embed }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } @@ -92,7 +92,6 @@ module.exports = class LeagueOfLegendsChampionCommand extends Command { const { body } = await snekfetch .get('https://na1.api.riotgames.com/lol/static-data/v3/versions') .query({ api_key: RIOT_KEY }); - [this.version] = body; - return this.version; + return body[0]; } }; diff --git a/commands/search/manga.js b/commands/search/manga.js index 7669fd04..5ed81861 100644 --- a/commands/search/manga.js +++ b/commands/search/manga.js @@ -40,14 +40,14 @@ module.exports = class MangaCommand extends Command { .addField('❯ Type', `${data.subtype} - ${data.status}`, true) .addField('❯ Volumes / Chapters', - `${data.volumeCount || 'N/A'} / ${data.chapterCount || 'N/A'}`, true) + `${data.volumeCount || '???'} / ${data.chapterCount || '???'}`, true) .addField('❯ Start Date', - data.startDate ? new Date(data.startDate).toDateString() : 'N/A', true) + data.startDate ? new Date(data.startDate).toDateString() : '???', true) .addField('❯ End Date', - data.endDate ? new Date(data.endDate).toDateString() : 'N/A', true); + data.endDate ? new Date(data.endDate).toDateString() : '???', true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/map.js b/commands/search/map.js index 2ab7950a..b3342538 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -44,7 +44,7 @@ module.exports = class MapCommand extends Command { const url = `https://www.google.com/maps/search/${encodeURIComponent(query)}`; return msg.say(`<${url}>`, { files: [{ attachment: body, name: 'map.png' }] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/mdn.js b/commands/search/mdn.js index bcb70e27..d7dc8d3f 100644 --- a/commands/search/mdn.js +++ b/commands/search/mdn.js @@ -37,7 +37,7 @@ module.exports = class MDNCommand extends Command { .setDescription(shorten(data.excerpt)); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/movie.js b/commands/search/movie.js index fc77c26d..cb4a4b7d 100644 --- a/commands/search/movie.js +++ b/commands/search/movie.js @@ -44,16 +44,16 @@ module.exports = class MovieCommand extends Command { .setDescription(body.overview ? shorten(body.overview) : 'No description available.') .setThumbnail(body.poster_path ? `https://image.tmdb.org/t/p/w500${body.poster_path}` : null) .addField('❯ Runtime', - body.runtime ? `${body.runtime} mins.` : 'N/A', true) + body.runtime ? `${body.runtime} mins.` : '???', true) .addField('❯ Release Date', - body.release_date || 'N/A', true) + body.release_date || '???', true) .addField('❯ Genres', - body.genres.length ? body.genres.map(genre => genre.name).join(', ') : 'N/A') + body.genres.length ? body.genres.map(genre => genre.name).join(', ') : '???') .addField('❯ Production Companies', - body.production_companies.length ? body.production_companies.map(c => c.name).join(', ') : 'N/A'); + body.production_companies.length ? body.production_companies.map(c => c.name).join(', ') : '???'); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/nasa.js b/commands/search/nasa.js index 3ffe79e1..6213532c 100644 --- a/commands/search/nasa.js +++ b/commands/search/nasa.js @@ -31,7 +31,7 @@ module.exports = class NASACommand extends Command { const data = filtered[Math.floor(Math.random() * filtered.length)]; return msg.say(shorten(data.data[0].description), { files: [data.links[0].href] }); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/neopet.js b/commands/search/neopet.js index a291cb47..1178d48a 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -32,7 +32,7 @@ module.exports = class NeopetCommand extends Command { if (!link) return msg.say('Could not find any results.'); return msg.say(link[0]); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/new-york-times.js b/commands/search/new-york-times.js index 90dd4350..909b20eb 100644 --- a/commands/search/new-york-times.js +++ b/commands/search/new-york-times.js @@ -44,7 +44,7 @@ module.exports = class NewYorkTimesCommand extends Command { new Date(data.pub_date).toDateString(), true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/npm.js b/commands/search/npm.js index 5c9069c4..0d324ba9 100644 --- a/commands/search/npm.js +++ b/commands/search/npm.js @@ -51,7 +51,7 @@ module.exports = class NPMCommand extends Command { return msg.embed(embed); } catch (err) { if (err.status === 404) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/osu.js b/commands/search/osu.js index 6871f0fd..281122a6 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -42,28 +42,28 @@ module.exports = class OsuCommand extends Command { .addField('❯ ID', data.user_id, true) .addField('❯ Level', - data.level || 'N/A', true) + data.level || '???', true) .addField('❯ Accuracy', - data.accuracy || 'N/A', true) + data.accuracy || '???', true) .addField('❯ Rank', - data.pp_rank || 'N/A', true) + data.pp_rank || '???', true) .addField('❯ Play Count', - data.playcount || 'N/A', true) + data.playcount || '???', true) .addField('❯ Country', - data.country || 'N/A', true) + data.country || '???', true) .addField('❯ Ranked Score', - data.ranked_score || 'N/A', true) + data.ranked_score || '???', true) .addField('❯ Total Score', - data.total_score || 'N/A', true) + data.total_score || '???', true) .addField('❯ SS', - data.count_rank_ss || 'N/A', true) + data.count_rank_ss || '???', true) .addField('❯ S', - data.count_rank_s || 'N/A', true) + data.count_rank_s || '???', true) .addField('❯ A', - data.count_rank_a || 'N/A', true); + data.count_rank_a || '???', true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/pokedex.js b/commands/search/pokedex.js index d409599e..9ad1340a 100644 --- a/commands/search/pokedex.js +++ b/commands/search/pokedex.js @@ -40,7 +40,7 @@ module.exports = class PokedexCommand extends Command { return msg.embed(embed); } catch (err) { if (err.status === 404) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/recipe.js b/commands/search/recipe.js index 9d76f232..c1724324 100644 --- a/commands/search/recipe.js +++ b/commands/search/recipe.js @@ -39,7 +39,7 @@ module.exports = class RecipeCommand extends Command { return msg.embed(embed); } catch (err) { if (err.status === 500) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/reddit.js b/commands/search/reddit.js index 42af636b..a340c745 100644 --- a/commands/search/reddit.js +++ b/commands/search/reddit.js @@ -27,7 +27,6 @@ module.exports = class RedditCommand extends Command { const { body } = await snekfetch .get(`https://www.reddit.com/r/${subreddit}/new.json`) .query({ sort: 'new' }); - if (!body.data.children.length) return msg.say('Could not find any results.'); const allowed = msg.channel.nsfw ? body.data.children : body.data.children.filter(post => !post.data.over_18); if (!allowed.length) return msg.say('Could not find any results.'); const post = allowed[Math.floor(Math.random() * allowed.length)].data; @@ -46,7 +45,7 @@ module.exports = class RedditCommand extends Command { } catch (err) { if (err.status === 403) return msg.say('This subreddit is private.'); if (err.status === 404) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/rotten-tomatoes.js b/commands/search/rotten-tomatoes.js index 2d6c85e0..1819e767 100644 --- a/commands/search/rotten-tomatoes.js +++ b/commands/search/rotten-tomatoes.js @@ -43,12 +43,12 @@ module.exports = class RottenTomatoesCommand extends Command { .setDescription(shorten(body.ratingSummary.consensus)) .setThumbnail(body.posters.original) .addField('❯ Critic Score', - body.ratings.critics_score !== -1 ? `${body.ratings.critics_score}%` : 'N/A', true) + body.ratings.critics_score !== -1 ? `${body.ratings.critics_score}%` : '???', true) .addField('❯ Audience Score', - body.ratings.audience_score !== -1 ? `${body.ratings.audience_score}%` : 'N/A', true); + body.ratings.audience_score !== -1 ? `${body.ratings.audience_score}%` : '???', true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/safebooru.js b/commands/search/safebooru.js index e1bd4e43..5561e2bb 100644 --- a/commands/search/safebooru.js +++ b/commands/search/safebooru.js @@ -34,7 +34,7 @@ module.exports = class SafebooruCommand extends Command { if (!parsed.post || !parsed.post.length) return msg.say('Could not find any results.'); return msg.say(`https:${parsed.post[Math.floor(Math.random() * parsed.post.length)]._attributes.file_url}`); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/steam.js b/commands/search/steam.js index 2e8c5812..7e4785ad 100644 --- a/commands/search/steam.js +++ b/commands/search/steam.js @@ -54,22 +54,22 @@ module.exports = class SteamCommand extends Command { .addField('❯ Price', price, true) .addField('❯ Metascore', - data.metacritic ? data.metacritic.score : 'N/A', true) + data.metacritic ? data.metacritic.score : '???', true) .addField('❯ Recommendations', - data.recommendations ? data.recommendations.total : 'N/A', true) + data.recommendations ? data.recommendations.total : '???', true) .addField('❯ Platforms', platforms.join(', ') || 'None', true) .addField('❯ Release Data', - data.release_date ? data.release_date.date : 'N/A', true) + data.release_date ? data.release_date.date : '???', true) .addField('❯ DLC Count', data.dlc ? data.dlc.length : 0, true) .addField('❯ Developers', - data.developers.join(', ') || 'N/A') + data.developers.join(', ') || '???') .addField('❯ Publishers', - data.publishers.join(', ') || 'N/A'); + data.publishers.join(', ') || '???'); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/stocks.js b/commands/search/stocks.js index a927437e..95370ae6 100644 --- a/commands/search/stocks.js +++ b/commands/search/stocks.js @@ -51,7 +51,7 @@ module.exports = class StocksCommand extends Command { new Date(body['Meta Data']['3. Last Refreshed']).toDateString(), true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/thesaurus.js b/commands/search/thesaurus.js index 903dedb9..2ab5441c 100644 --- a/commands/search/thesaurus.js +++ b/commands/search/thesaurus.js @@ -36,11 +36,11 @@ module.exports = class ThesaurusCommand extends Command { const antonyms = body.find(words => words.relationshipType === 'antonym'); return msg.say(stripIndents` **${query}** - __Synonyms:__ ${synonyms ? synonyms.words.join(', ') : 'N/A'} - __Antonyms:__ ${antonyms ? antonyms.words.join(', ') : 'N/A'} + __Synonyms:__ ${synonyms ? synonyms.words.join(', ') : '???'} + __Antonyms:__ ${antonyms ? antonyms.words.join(', ') : '???'} `); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/tumblr.js b/commands/search/tumblr.js index 794f6e0b..36564752 100644 --- a/commands/search/tumblr.js +++ b/commands/search/tumblr.js @@ -42,7 +42,7 @@ module.exports = class TumblrCommand extends Command { return msg.embed(embed); } catch (err) { if (err.status === 404) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/tv-show.js b/commands/search/tv-show.js index 684c94f0..a53107ed 100644 --- a/commands/search/tv-show.js +++ b/commands/search/tv-show.js @@ -44,20 +44,20 @@ module.exports = class TVShowCommand extends Command { .setDescription(body.overview ? shorten(body.overview) : 'No description available.') .setThumbnail(body.poster_path ? `https://image.tmdb.org/t/p/w500${body.poster_path}` : null) .addField('❯ First Air Date', - body.first_air_date || 'N/A', true) + body.first_air_date || '???', true) .addField('❯ Last Air Date', - body.last_air_date || 'N/A', true) + body.last_air_date || '???', true) .addField('❯ Seasons', - body.number_of_seasons || 'N/A', true) + body.number_of_seasons || '???', true) .addField('❯ Episodes', - body.number_of_episodes || 'N/A', true) + body.number_of_episodes || '???', true) .addField('❯ Genres', - body.genres.length ? body.genres.map(genre => genre.name).join(', ') : 'N/A') + body.genres.length ? body.genres.map(genre => genre.name).join(', ') : '???') .addField('❯ Production Companies', - body.production_companies.length ? body.production_companies.map(c => c.name).join(', ') : 'N/A'); + body.production_companies.length ? body.production_companies.map(c => c.name).join(', ') : '???'); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/urban.js b/commands/search/urban.js index 03c19f75..2f2f2dda 100644 --- a/commands/search/urban.js +++ b/commands/search/urban.js @@ -39,7 +39,7 @@ module.exports = class UrbanCommand extends Command { data.example ? shorten(data.example, 1000) : 'None'); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/vocaloid.js b/commands/search/vocaloid.js index d7e2d300..131a80e4 100644 --- a/commands/search/vocaloid.js +++ b/commands/search/vocaloid.js @@ -52,7 +52,7 @@ module.exports = class VocaloidCommand extends Command { `${minutes}:${seconds}`, true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/wattpad.js b/commands/search/wattpad.js index 1f4fae4d..3d7b9ce2 100644 --- a/commands/search/wattpad.js +++ b/commands/search/wattpad.js @@ -55,7 +55,7 @@ module.exports = class WattpadCommand extends Command { data.commentCount, true); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/weather.js b/commands/search/weather.js index 060d5b2c..d8a07536 100644 --- a/commands/search/weather.js +++ b/commands/search/weather.js @@ -44,23 +44,23 @@ module.exports = class WeatherCommand extends Command { .addField('❯ Condition', body.weather.map(cond => `${cond.main} (${cond.description})`).join('\n'), true) .addField('❯ Temperature', - body.main.temp ? `${body.main.temp}°C` : 'N/A', true) + body.main.temp ? `${body.main.temp}°C` : '???', true) .addField('❯ Humidity', - body.main.humidity ? `${body.main.humidity}%` : 'N/A', true) + body.main.humidity ? `${body.main.humidity}%` : '???', true) .addField('❯ Pressure', - body.main.pressure ? `${body.main.pressure} hPa` : 'N/A', true) + body.main.pressure ? `${body.main.pressure} hPa` : '???', true) .addField('❯ Visibility', - body.visibility ? `${body.visibility}m` : 'N/A', true) + body.visibility ? `${body.visibility}m` : '???', true) .addField('❯ Cloudiness', - body.clouds && body.clouds.all ? `${body.clouds.all}%` : 'N/A', true) + body.clouds && body.clouds.all ? `${body.clouds.all}%` : '???', true) .addField('❯ Wind Direction', - body.wind && body.wind.deg ? `${body.wind.deg}°` : 'N/A', true) + body.wind && body.wind.deg ? `${body.wind.deg}°` : '???', true) .addField('❯ Wind Speed', - body.wind && body.wind.speed ? `${body.wind.speed}m/s` : 'N/A', true); + body.wind && body.wind.speed ? `${body.wind.speed}m/s` : '???', true); return msg.embed(embed); } catch (err) { if (err.status === 404) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index 25ff1493..ba00ee23 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -48,7 +48,7 @@ module.exports = class WikipediaCommand extends Command { .setDescription(shorten(data.extract.replace(/\n/g, '\n\n'))); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/youtube.js b/commands/search/youtube.js index ca7678a3..7d99b5ce 100644 --- a/commands/search/youtube.js +++ b/commands/search/youtube.js @@ -44,7 +44,7 @@ module.exports = class YouTubeCommand extends Command { .setThumbnail(data.snippet.thumbnails.default.url); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/search/yu-gi-oh.js b/commands/search/yu-gi-oh.js index 496c6474..379a7296 100644 --- a/commands/search/yu-gi-oh.js +++ b/commands/search/yu-gi-oh.js @@ -52,7 +52,7 @@ module.exports = class YuGiOhCommand extends Command { } return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/text-edit/anagram.js b/commands/text-edit/anagram.js index 02596663..47d3751f 100644 --- a/commands/text-edit/anagram.js +++ b/commands/text-edit/anagram.js @@ -28,15 +28,13 @@ module.exports = class AnagramCommand extends Command { async run(msg, { word, strict }) { try { const { body } = await snekfetch.get(`http://www.anagramica.com/best/${word}`); - if (!body.best.length) return msg.say('Could not find any results.'); const all = body.best.filter(anagram => anagram.toLowerCase() !== word); - if (!all.length) return msg.say('Could not find any results.'); const words = strict ? all.filter(anagram => anagram.length === word.length) : all; if (!words.length) return msg.say('Could not find any results.'); return msg.say(words[Math.floor(Math.random() * words.length)]); } catch (err) { if (err.status === 500) return msg.say('Could not find any results.'); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/text-edit/cow-say.js b/commands/text-edit/cow-say.js index 9f52f4b2..80ea9dd8 100644 --- a/commands/text-edit/cow-say.js +++ b/commands/text-edit/cow-say.js @@ -32,7 +32,7 @@ module.exports = class CowSayCommand extends Command { }); return msg.code(null, body.cow); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/text-edit/dec-talk.js b/commands/text-edit/dec-talk.js index bee3a329..3bc2d028 100644 --- a/commands/text-edit/dec-talk.js +++ b/commands/text-edit/dec-talk.js @@ -52,7 +52,7 @@ module.exports = class DECTalkCommand extends Command { return null; } catch (err) { await this.finish(file, channel); - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } diff --git a/commands/text-edit/portal-send.js b/commands/text-edit/portal-send.js index d5b7c407..452bd7a9 100644 --- a/commands/text-edit/portal-send.js +++ b/commands/text-edit/portal-send.js @@ -33,7 +33,7 @@ module.exports = class PortalSendCommand extends Command { await channel.send(`**${msg.author.tag} (${msg.guild.name})**: ${text}`); return msg.say(`Message sent to **${channel.name}** in **${channel.guild.name}**!`); } catch (err) { - return msg.say('Failed to send the message. Try again later!'); + return msg.reply('Failed to send the message. Try again later!'); } } }; diff --git a/commands/text-edit/ship-name.js b/commands/text-edit/ship-name.js index a59faa44..bf436217 100644 --- a/commands/text-edit/ship-name.js +++ b/commands/text-edit/ship-name.js @@ -10,6 +10,7 @@ module.exports = class ShipNameCommand extends Command { args: [ { key: 'start', + label: 'start name', prompt: 'What name should be at the start of the ship name?', type: 'string', validate: start => { @@ -20,6 +21,7 @@ module.exports = class ShipNameCommand extends Command { }, { key: 'end', + label: 'end name', prompt: 'What name should be at the end of the ship name?', type: 'string', validate: end => { diff --git a/commands/text-edit/translate.js b/commands/text-edit/translate.js index 96bd3417..69251505 100644 --- a/commands/text-edit/translate.js +++ b/commands/text-edit/translate.js @@ -79,7 +79,7 @@ module.exports = class TranslateCommand extends Command { body.text[0]); return msg.embed(embed); } catch (err) { - return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } }; diff --git a/commands/text-edit/yoda.js b/commands/text-edit/yoda.js index 7208c002..90215a77 100644 --- a/commands/text-edit/yoda.js +++ b/commands/text-edit/yoda.js @@ -30,10 +30,10 @@ module.exports = class YodaCommand extends Command { .get('https://yoda.p.mashape.com/yoda') .query({ sentence }) .set({ 'X-Mashape-Key': MASHAPE_KEY }); - if (!text) return msg.say('Empty, this message is. Try again later, you must.'); + if (!text) return msg.reply('Empty, this message is. Try again later, you must.'); return msg.say(text); } catch (err) { - return msg.say(`Being a jerk again, Yoda is: \`${err.message}\`. Try again later, you must.`); + return msg.reply(`Being a jerk again, Yoda is: \`${err.message}\`. Try again later, you must.`); } } }; diff --git a/commands/util/help.js b/commands/util/help.js index 2dad8056..f8d06a49 100644 --- a/commands/util/help.js +++ b/commands/util/help.js @@ -51,7 +51,7 @@ module.exports = class HelpCommand extends Command { await msg.direct({ embed }); return msg.say('📬 Sent you a DM with information.'); } catch (err) { - return msg.say('Failed to send DM. You probably have DMs disabled.'); + return msg.reply('Failed to send DM. You probably have DMs disabled.'); } } } diff --git a/package.json b/package.json index 859e542b..d2d71bd4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "49.3.2", + "version": "49.3.3", "description": "Your personal server companion.", "main": "XiaoBot.js", "scripts": {