mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
permissions.ts - fix highest role (#2393)
This commit is contained in:
@@ -337,7 +337,7 @@ export function highestRole(
|
||||
if (!guild) throw new Error(Errors.GUILD_NOT_FOUND);
|
||||
|
||||
// Get the roles from the member
|
||||
const memberRoles = (typeof memberOrId === "bigint" ? bot.members.get(memberOrId) : memberOrId)
|
||||
const memberRoles = (typeof memberOrId === "bigint" ? bot.members.get(bot.transformers.snowflake(`${memberOrId}${guild.id}`)) : memberOrId)
|
||||
?.roles;
|
||||
// This member has no roles so the highest one is the @everyone role
|
||||
if (!memberRoles) return guild.roles.get(guild.id)!;
|
||||
|
||||
Reference in New Issue
Block a user