Add activity status to user command

This commit is contained in:
Dragon Fire
2018-08-31 18:53:05 -04:00
parent 915ccec383
commit a48344f319
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -1,5 +1,10 @@
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const activities = {
PLAYING: 'Playing',
WATCHING: 'Watching',
LISTENING: 'Listening to'
};
module.exports = class UserInfoCommand extends Command {
constructor(client) {
@@ -33,6 +38,9 @@ module.exports = class UserInfoCommand extends Command {
const member = await msg.guild.members.fetch(user.id);
embed
.setColor(member.displayHexColor)
.setDescription(member.presence.activity
? `${activities[member.presence.activity.type]} **${member.presence.activity.name}**`
: '')
.addField(' Server Join Date', member.joinedAt.toDateString(), true)
.addField(' Nickname', member.nickname || 'None', true)
.addField(' Highest Role',
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "88.3.2",
"version": "88.3.3",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {