#Hi what is this error ?

1 messages · Page 1 of 1 (latest)

violet saddle
clear heron
#

Hi bro

violet saddle
#

When you get errors, the easiest way to solve them is to read them. As example, it tells you that .get doesn't exists on .roles

clear heron
#

Okay

#

So what can i set )

violet saddle
#

I recommend roles.fetch(id)

clear heron
#

member.roles.fetch(id)

violet saddle
#

Oh, wait, you're trying to access it from member

clear heron
#

yes

violet saddle
#

Why don't you try to fetch the role from the guild? It makes more sense this way

clear heron
#

yes its true

violet saddle
#

The member might not have that role, which will break things

#

guild.roles.fetch(id) works

clear heron
#

@violet saddle

violet saddle
clear heron
#

i set await ?

violet saddle
#

(await guild.roles.fetch(id)).members...

clear heron
violet saddle
#

Because the syntax is broken. Count ( and )

clear heron
#

id is not defined

violet saddle
#

It is a placeholder. You have to put something there

clear heron
#

what must i set here ?

violet saddle
#

Whatever you want

tribal peak
clear heron
tribal peak
#

the id of the role...

clear heron
#

????

#

if i set id of the role this commande is not good...

#

i dont understand

tribal peak
clear heron
#

i have learned js

#

but idk what set in id

tribal peak
#

This whole conversation suggests otherwise

violet saddle
#

I recommend to just delete the whole code involving the id

#

Then the bot should work

clear heron
#

k