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
版权声明:本文标题:javascript - How do I get the users activity discord.js - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人,
转载请联系作者并注明出处:http://www.betaflare.com/web/1745318622a2653271.html,
本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论