From 0c7c82aca9cb32e79d258d6f1e30d72f408745db Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Mon, 13 Jan 2020 20:16:53 -0500 Subject: [PATCH] Await awaitables --- experiments/skin-database/discord-bot/commands/review.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/experiments/skin-database/discord-bot/commands/review.js b/experiments/skin-database/discord-bot/commands/review.js index 8735ec7c..f9903a9d 100644 --- a/experiments/skin-database/discord-bot/commands/review.js +++ b/experiments/skin-database/discord-bot/commands/review.js @@ -17,18 +17,18 @@ async function reviewSkin(message) { async function handler(message, args) { let count = args[0] || 1; if (count > 50) { - message.channel.send(`You can only review up to ${count} skins at a time.`); - message.channel.send(`Going to show ${count} skins to review`); + await message.channel.send(`You can only review up to ${count} skins at a time.`); + await message.channel.send(`Going to show ${count} skins to review`); count = 50; } - message.channel.send(`Going to show ${count} skins to review.`); + await message.channel.send(`Going to show ${count} skins to review.`); let i = Number(count); while (i--) { await reviewSkin(message); } if (count > 1) { const tweetableCount = await Skins.getTweetableSkinCount(); - message.channel.send( + await message.channel.send( `Done reviewing ${count} skins. There are now ${tweetableCount} Tweetable skins. Thanks!` ); }