feat: add DiscordDark and DIscordLight to EmbedColors enum

This commit is contained in:
MARCROCK22 2024-03-26 20:27:08 -04:00
parent 32c1df7a07
commit 39b6334f7e
2 changed files with 3 additions and 14 deletions

View File

@ -29,6 +29,8 @@ export enum EmbedColors {
Greyple = 0x99aab5,
DarkButNotBlack = 0x2c2f33,
NotQuiteBlack = 0x23272a,
DiscordDark = 0x313338,
DiscordLight = 0xf9f9f9,
}
export const DiscordEpoch = 1420070400000n;

View File

@ -307,20 +307,7 @@ export class Shard {
if (data instanceof Buffer) {
data = inflateSync(data);
}
/**
* Idk why, but Bun sends this event when websocket connects.
* MessageEvent {
* type: "message",
* data: "Already authenticated."
* }
*/
if ((data as string).startsWith('{')) {
data = JSON.parse(data as string);
}
const packet = data as unknown as GatewayReceivePayload;
return this.onpacket(packet);
return this.onpacket(JSON.parse(data as string));
}
checkOffline(priority: number) {