This commit is contained in:
Skillz4Killz
2022-08-25 18:39:20 +00:00
committed by GitHub
parent de8f5215ca
commit 3100f2cb66
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -337,8 +337,11 @@ 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(bot.transformers.snowflake(`${memberOrId}${guild.id}`)) : memberOrId)
?.roles;
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)!;