mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Add activity status to user command
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
const Command = require('../../structures/Command');
|
const Command = require('../../structures/Command');
|
||||||
const { MessageEmbed } = require('discord.js');
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
const activities = {
|
||||||
|
PLAYING: 'Playing',
|
||||||
|
WATCHING: 'Watching',
|
||||||
|
LISTENING: 'Listening to'
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = class UserInfoCommand extends Command {
|
module.exports = class UserInfoCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -33,6 +38,9 @@ module.exports = class UserInfoCommand extends Command {
|
|||||||
const member = await msg.guild.members.fetch(user.id);
|
const member = await msg.guild.members.fetch(user.id);
|
||||||
embed
|
embed
|
||||||
.setColor(member.displayHexColor)
|
.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('❯ Server Join Date', member.joinedAt.toDateString(), true)
|
||||||
.addField('❯ Nickname', member.nickname || 'None', true)
|
.addField('❯ Nickname', member.nickname || 'None', true)
|
||||||
.addField('❯ Highest Role',
|
.addField('❯ Highest Role',
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "88.3.2",
|
"version": "88.3.3",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user