Dicsord.js服务器信息

时间:2020-05-29 20:16:55

标签: javascript discord discord.js

const Command = require('../../Structures/Command');
const Discord = require('discord.js');

module.exports = class extends Command {

    constructor(...args) {
        super(...args, {
            aliases: ['mi']
        });
    }

    async run(message, presence) {
        let embed = new Discord.MessageEmbed()
                embed.setAuthor(`Your Name: ` + message.author.username)
                embed.setDescription("Your Info")
                embed.setColor("#FF00FF")
                embed.addField("Username", `${message.author.username}#${message.author.discriminator}`)
                embed.addField("ID", message.author.id)
                embed.addField("Created At", message.author.createdAt)
                embed.addField("You Joined the server at", message.member.joinedAt)
                embed.setFooter("Zorek | Userinfo")
                message.channel.send(embed);
    }

};

我真的需要知道如何说出用户在玩什么,请有人帮忙!

1 个答案:

答案 0 :(得分:0)

您可以获得第一个activity并显示:

message.author.presence.activities[0].name