I'm trying to add a role to someone who sends a message. I've tried this but it comes up with an error
I've tried:
message.guild.createRole({name:"RoleName", color: "#ff0000"})
var memberRole = message.guild.roles.find(role => role.name === "RoleName");
message.member.addRole(memberRole);
if you have any questions about the topic feel free to ask