cats
DIAdiscord.js - Imagine an app
•Created by cats on 11/16/2024 in #djs-questions
can't set role to user (user.roles.add is not a function)
If I have a code like this
It doesn't work and it shows that
add()
is not a member of roles
And these are all the functions that are listed for roles
And that should be the correct way to set a role to a member according to the discord.js guide
https://discordjs.guide/popular-topics/faq.html#how-do-i-add-a-role-to-a-guild-member
instead I get this error:
discord.js: v14.16.3
deno: v2.0.312 replies