#AwesomeBFM

1 messages · Page 1 of 1 (latest)

polar escarp
#

just moving this to a thread

spark wharf
#

what was the error aagin

#

oh right

polar escarp
#

TypeError: Cannot read properties of undefined (reading 'highest')

spark wharf
#

do youthink you could show your full code

placid haven
#

const member = target.member

polar escarp
#

it is a large file that is the only issue

spark wharf
polar escarp
spark wharf
#

and what is member

placid haven
spark wharf
#

?

polar escarp
placid haven
#

Suppose that message.author is interaction.user which is the option

there you would only get the main info for a user

But message.member or interaction.member will get the array of roles.

polar escarp
#

hmmm, I am still not following. How would that look in this senerio:

if(target.roles.highest.position < member.roles.highest.position)
#

oh I get it

placid haven
polar escarp
#

ok thank you

placid haven
placid haven
polar escarp
#

it appears to be working!