From 410b41b168bbe6f1956c7cfcd29820611f614d74 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 5 Apr 2017 18:35:06 +0000 Subject: [PATCH] Different Way of Calculating User Game --- commands/userinfo/userinfo.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/commands/userinfo/userinfo.js b/commands/userinfo/userinfo.js index 969a7005..d15adc3f 100644 --- a/commands/userinfo/userinfo.js +++ b/commands/userinfo/userinfo.js @@ -51,13 +51,7 @@ module.exports = class UserInfoCommand extends commando.Command { color = 0x808080; break; } - let userGame; - if (!user.presence.game) { - userGame = 'None'; - } - else { - userGame = user.presence.game.name; - } + const userGame = user.presence.game ? user.presence.game.name : 'None'; const embed = new Discord.RichEmbed() .setColor(color) .setThumbnail(user.displayAvatarURL)