More plaform fix improvements

Fixes #11
merge-requests/6/merge
Bsian 2020-06-10 16:03:33 +01:00
parent e55dcfc7dd
commit fbf28dbdb2
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 2 additions and 3 deletions

View File

@ -66,9 +66,8 @@ export default class Whois extends Command {
}
}
embed.addField('Status', member.status === 'dnd' ? 'Do Not Disturb' : this.capsFirstLetter(member.status) || 'Unknown', true);
const platform = Object.entries(message.member.clientStatus).filter((a) => a[1] !== 'offline').map((a) => this.capsFirstLetter(a[0]));
if (member.bot) platform.push('API/WebSocket');
if (platform.length) embed.addField('Platform', platform.join(', '), true);
const platform = member.bot && member.status !== 'offline' ? 'API/WebSocket' : Object.entries(message.member.clientStatus).filter((a) => a[1] !== 'offline').map((a) => this.capsFirstLetter(a[0])).join(', ');
if (platform) embed.addField('Platform', platform, true);
embed.addField('Joined At', `${moment(new Date(member.joinedAt)).format('dddd, MMMM Do YYYY, h:mm:ss A')} ET`, true);
embed.addField('Created At', `${moment(new Date(member.user.createdAt)).format('dddd, MMMM Do YYYY, h:mm:ss A')} ET`, true);
if (member.roles.length > 0) {