This commit is contained in:
Daniel Odendahl Jr
2017-04-03 22:37:13 +00:00
parent a0bcfa8b67
commit 946bacf79e
+8 -1
View File
@@ -51,6 +51,13 @@ module.exports = class UserInfoCommand extends commando.Command {
color = 0x808080; color = 0x808080;
break; break;
} }
let userGame;
if (!user.presence.game) {
userGame = 'None';
}
else {
userGame = user.presence.game.name;
}
const embed = new Discord.RichEmbed() const embed = new Discord.RichEmbed()
.setColor(color) .setColor(color)
.setThumbnail(user.displayAvatarURL) .setThumbnail(user.displayAvatarURL)
@@ -65,7 +72,7 @@ module.exports = class UserInfoCommand extends commando.Command {
.addField('**Status:**', .addField('**Status:**',
stat, true) stat, true)
.addField('**Playing:**', .addField('**Playing:**',
user.presence.game.name || 'None', true); userGame, true);
return message.embed(embed); return message.embed(embed);
} }
}; };