From b29a217f76483e000bd9d75d30250d11a0a88c4d Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 19 Aug 2021 12:03:21 -0400 Subject: added steal command, revamped error handling and other stuff --- src/commands/info/userInfo.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/commands/info/userInfo.ts') diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index 9ec5552..7b8d7d8 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -1,7 +1,6 @@ import { BushCommand, BushMessage, BushSlashMessage, BushUser } from '@lib'; import { MessageEmbed } from 'discord.js'; -// TODO: Re-Implement Status Emojis // TODO: Add bot information export default class UserInfoCommand extends BushCommand { public constructor() { @@ -141,6 +140,24 @@ export default class UserInfoCommand extends BushCommand { presenceInfo.push(`**Activit${activitiesNames.length - 1 ? 'ies' : 'y'}:** ${util.oxford(activitiesNames, 'and', '')}`); if (customStatus && customStatus.length) presenceInfo.push(`**Custom Status:** ${customStatus}`); userEmbed.addField('» Presence', presenceInfo.join('\n')); + + enum statusEmojis { + online = '787550449435803658', + idle = '787550520956551218', + dnd = '787550487633330176', + offline = '787550565382750239', + invisible = '787550565382750239' + } + userEmbed.setFooter(user.tag, client.emojis.cache.get(statusEmojis[member?.presence.status])?.url ?? undefined); + } + + // roles + if (member?.roles.cache.size && member?.roles.cache.size - 1) { + const roles = member?.roles.cache + .filter((role) => role.name !== '@everyone') + .sort((role1, role2) => role2.position - role1.position) + .map((role) => `${role}`); + userEmbed.addField(`» Role${roles.length - 1 ? 's' : ''} [${roles.length}]`, roles.join(', ')); } // Important Perms -- cgit