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

View File

@@ -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();

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)!;