#What's the easiest way to check a bot's highest role position?

22 messages · Page 1 of 1 (latest)

livid idol
#

I'm using Guild.members.me.roles.highest.position - is there a more straightforward approach? Thanks.

half mulch
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

rain forge
livid idol
#

Just making sure

#

Thank you!

#

Huh

#

That's not working

#
console.log(interaction.guild.members.me.roles.highest.position);

is giving me

TypeError: Cannot read properties of undefined (reading 'roles')
#

@rain forge Any idea what's wrong?

rain forge
merry dirgeBOT
#

The order of function parameters must match between definition and function call.

function execute(client, message, args) { ... };
execute(message, client, args);

• mismatch! you pass a Message where the client is expected
• mismatch! you pass the Client where a Message is expected

livid idol
rain forge
#

The tag tells you

livid idol
#

Hmmm

#

Well that's not the case here

#

Because only the interaction is being passed into the function

#

Nothing else...

acoustic blade
rain forge
#

Oh, good catch

livid idol
#

Thanks