From 2df323e15021d7ea01fa16dddcf283a1a3810bee Mon Sep 17 00:00:00 2001 From: Sendou Date: Sun, 15 Dec 2019 17:19:49 +0200 Subject: [PATCH] top500 string web hook fix --- utils/webhook.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/utils/webhook.js b/utils/webhook.js index 72c477d13..20f65094b 100644 --- a/utils/webhook.js +++ b/utils/webhook.js @@ -45,10 +45,8 @@ function sendFAPostToDiscord(args) { } if (args.user.country) { - msg.setText( - `:flag_${args.user.country}:${args.user.top500 && - " <:top500:594551830764191763>"}` - ) + const top500string = args.user.top500 ? " <:top500:594551830764191763>" : "" + msg.setText(`:flag_${args.user.country}:${top500string}`) } return Hook.send(msg)