From 0f89f5af28a27976efe526bba90dbc85a2a34dd4 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 15 Apr 2020 04:49:58 +0200 Subject: [PATCH] Moved thing that needed member in if --- commands/utility/userInfo.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/commands/utility/userInfo.js b/commands/utility/userInfo.js index e79a7996..75278bc2 100644 --- a/commands/utility/userInfo.js +++ b/commands/utility/userInfo.js @@ -38,8 +38,14 @@ class userInfoCommand extends Command { .setTimestamp(); - // Show since when this user have been boosting the current guild - if (member.premiumSince) Embed.addField('Boosting this guild since', member.premiumSince, true); + + if (member) { + // Show since when this user have been boosting the current guild + if (member.premiumSince) Embed.addField('Boosting this guild since', member.premiumSince, true); + // Show guild nickname + if (member.nickname) Embed.addField('Nickname', member.nickname, true); + + } Embed.addField('​', '​'); @@ -52,8 +58,6 @@ class userInfoCommand extends Command { // Is the user a bot? if (user.bot) Embed.addField('Is a bot?', '✅', true); - // Show guild nickname - if (member.nickname) Embed.addField('Nickname', member.nickname, true); // Show user locale ( i have no idea what it is ) https://discord.js.org/#/docs/main/master/class/User?scrollTo=locale if (user.locale) Embed.addField('Locale settings', user.locale, true);