I want to get the highest role in the guild with discord.js
message.guild.roles.highestRole
This doesn't work. Any help would be appreciated. Thanks from now :)
I want to get the highest role in the guild with discord.js
message.guild.roles.highestRole
This doesn't work. Any help would be appreciated. Thanks from now :)
For discord.js v12 / master use message.guild.roles.highest.name
For discord.js v11.4.x / stable use message.guild.roles
.sort((b, a) => a.position - b.position || a.id - b.id)
.first()
.name
, this will sort the roles Collection by their position and then get the highest one, and return the name of it.