From a48344f319b0c52e4fdcc8336c2caed68c9cfca9 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 31 Aug 2018 18:53:05 -0400 Subject: [PATCH] Add activity status to user command --- commands/info/user.js | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/commands/info/user.js b/commands/info/user.js index 0bda90dc..341215d7 100644 --- a/commands/info/user.js +++ b/commands/info/user.js @@ -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', diff --git a/package.json b/package.json index d87f1954..31454caa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "88.3.2", + "version": "88.3.3", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {