mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
feat: implement gateway queue (#844)
* feat: implement gateway queue * process queues when adding to queue * fix: tests fixed ready for review * handle shard closed Co-authored-by: Skillz4Killz <Skillz4Killz@users.noreply.github.com>
This commit is contained in:
@@ -9,15 +9,15 @@ export function editBotStatus(data: Omit<StatusUpdate, "afk" | "since">) {
|
||||
"loop",
|
||||
`Running forEach loop in editBotStatus function.`,
|
||||
);
|
||||
shard.ws.send(
|
||||
JSON.stringify({
|
||||
op: DiscordGatewayOpcodes.StatusUpdate,
|
||||
d: {
|
||||
since: null,
|
||||
afk: false,
|
||||
...data,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
shard.queue.push({
|
||||
op: DiscordGatewayOpcodes.StatusUpdate,
|
||||
d: {
|
||||
since: null,
|
||||
afk: false,
|
||||
...data,
|
||||
},
|
||||
});
|
||||
ws.processQueue(shard.id);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user