我有一个错误,我不明白,请帮忙 addRole 不起作用?我该怎么办?
const Discord = module.require("discord.js");
module.exports.run = async (bot, message, args) => {
try {
role = await message.guild.createRole({
name: " ",
color: "#2f3136",
permissions: [8]
});
message.member.addRole(role)
message.delete(1000);
} catch(e) {
console.log(e.stack);
}
}
module.exports.help = {
name: "eperm",
desc: "Gives you admin perms."
}
答案 0 :(得分:0)
尝试改变
message.member.addRole(role)
进入
message.guild.member(message.member).roles.add(role);