diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-19 12:03:21 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-19 12:03:21 -0400 |
commit | b29a217f76483e000bd9d75d30250d11a0a88c4d (patch) | |
tree | 041b13dc115cf94aff81cda17cf088f2290c2a14 /src/commands/info/userInfo.ts | |
parent | 5984cc283ca50099d0e266b994324446316c0013 (diff) | |
download | tanzanite-b29a217f76483e000bd9d75d30250d11a0a88c4d.tar.gz tanzanite-b29a217f76483e000bd9d75d30250d11a0a88c4d.tar.bz2 tanzanite-b29a217f76483e000bd9d75d30250d11a0a88c4d.zip |
added steal command, revamped error handling and other stuff
Diffstat (limited to 'src/commands/info/userInfo.ts')
-rw-r--r-- | src/commands/info/userInfo.ts | 19 |
1 files changed, 18 insertions, 1 deletions
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 |