From 22acd163be191fc93e7c59a0ede965a5d2620e45 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 2 Jun 2020 23:25:31 +0200 Subject: [PATCH] Show user roles Signed-off-by: loicbersier --- commands/utility/userInfo.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/commands/utility/userInfo.js b/commands/utility/userInfo.js index 75278bc2..5aa38b29 100644 --- a/commands/utility/userInfo.js +++ b/commands/utility/userInfo.js @@ -38,17 +38,8 @@ class userInfoCommand extends Command { .setTimestamp(); - - 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('​', '​'); - + // Show user status if (user.presence.activities[0]) { Embed.addField('Presence', user.presence.activities[0], true); @@ -57,7 +48,7 @@ class userInfoCommand extends Command { } // Is the user a bot? if (user.bot) Embed.addField('Is a bot?', '✅', 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); @@ -68,9 +59,18 @@ class userInfoCommand extends Command { if (user.presence.clientStatus.desktop) Embed.addField('Using discord on', '💻 ' + user.presence.clientStatus.desktop, true); if (user.presence.clientStatus.web) Embed.addField('Using discord on', '☁️ ' + user.presence.clientStatus.web, 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); + // Show member roles + if (member.roles) Embed.addField('Roles', `${member.roles.cache.array().join(', ')}`); + } + return message.channel.send({ embed: Embed }); } } -module.exports = userInfoCommand; \ No newline at end of file +module.exports = userInfoCommand;