OctonalXX
OctonalXX

Reputation: 67

Discord.js set bot role to highest

I want my bot's role to be higher than any roles to mod people. Is there any way to do that?
My Source Code: Repository

Upvotes: 1

Views: 1827

Answers (2)

wolfie00
wolfie00

Reputation: 565

Try reading the docs.


// Set the position of the role
role.setPosition(1)
  .then(updated => console.log(`Role position: ${updated.position}`))
  .catch(console.error);

Upvotes: 1

Polygon
Polygon

Reputation: 38

https://discord.js.org/#/docs/main/stable/class/Role?scrollTo=setPosition

Read the docs. As Tyler2P said, "Your bot can only hoist roles 1 above it's highest role position"

Upvotes: 1

Related Questions