admin管理员组

文章数量:1420166

Problem: I have been trying to add a "Activity" field to my info mand, and its not working.

Expected result: Responds with the other stuff, along with the Activity field, showing what the user is doing.

Actual response: Shows everything else correctly, except the Activity field, which says undefined/null.

Code:

if (mand == "info") {
  const embed = new Discord.MessageEmbed()
  let member = message.mentions.members.first() || message.guild.members.cache.get(args[1]) || message.guild.member(message.author)
    const Roles = new Array()
    message.guild.roles.cache.forEach(role => {
      if (member.roles.cache.find(r => r.id == role.id)) {
        Roles.push(role)
      }
        })
    console.log(member.presence)
  embed.setAuthor(user.tag, member.user.avatarURL())
  embed.setTitle(`

本文标签: javascriptHow do I get the users activity discordjsStack Overflow