简体   繁体   English

无法使用 discord.js 编辑角色

[英]Cannot edit roles with discord.js

I've tried to find a solution online for this but I couldn't find any, so I'm asking it here, and I know there is probably something really simple that I'm doing wrong.我试图在网上为此找到解决方案,但我找不到任何解决方案,所以我在这里问它,我知道可能有一些非常简单的事情我做错了。 Whenever I am trying to edit a role with discord.js using role.edit() it always tells me that role.edit is not defined (yes I defined "role")每当我尝试使用 role.edit() 使用 discord.js 编辑角色时,它总是告诉我没有定义角色.edit(是的,我定义了“角色”)

    role.edit({
        color: '#8585ff'
    })
var role = message.guild.roles.cache.find(role => role.name === "Lamo"); 
    await role.edit({
        color: '#8585ff'
    })

This should work fine, read the docs please这应该可以正常工作,请阅读文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM