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)