mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 09:50:07 +00:00
fix: fmt
This commit is contained in:
@@ -24,7 +24,7 @@ export async function handleMessage(shard: Shard, message: MessageEvent<any>): P
|
||||
if (typeof message !== "string") return;
|
||||
|
||||
const messageData = JSON.parse(message) as DiscordGatewayPayload;
|
||||
|
||||
|
||||
// Edge case start: https://github.com/discordeno/discordeno/issues/2311
|
||||
shard.heart.acknowledged = true;
|
||||
shard.heart.lastAck = Date.now();
|
||||
|
||||
@@ -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)!;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user