feat(gossip): WORKER_RELEASE_ANNOUNCE handler and gossip helper

Broadcast and simulateGossip support for RPC 68 worker release
announcements alongside existing hook failure alert gossip.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-22 04:17:49 -04:00
co-authored by Cursor
parent d32d50ec9f
commit 9a009c53ef
+15
View File
@@ -359,6 +359,9 @@ class PearcordGuild extends EventEmitter {
if (method === RPC.HOOK_FAILURE_ALERT) {
this.emit('hook-failure', payload)
}
if (method === RPC.WORKER_RELEASE_ANNOUNCE) {
this.emit('worker-release-hint', payload)
}
if (method === RPC.BOT_INSTALL_UPSERT) {
this.emit('bot-install', payload)
}
@@ -483,6 +486,14 @@ class PearcordGuild extends EventEmitter {
this.emit('guild-sync', payload)
return
}
if (method === RPC.WORKER_RELEASE_ANNOUNCE) {
this.emit('worker-release-hint', payload)
return
}
if (method === RPC.HOOK_FAILURE_ALERT) {
this.emit('hook-failure', payload)
return
}
if (method === RPC.ROLE_UPSERT) {
this.emit('guild-role', payload)
return
@@ -638,6 +649,10 @@ class PearcordGuild extends EventEmitter {
broadcastGossip(this, RPC.HOOK_FAILURE_ALERT, alert)
}
gossipWorkerReleaseAnnounce (payload) {
broadcastGossip(this, RPC.WORKER_RELEASE_ANNOUNCE, payload)
}
gossipBotInstall (bot) {
broadcastGossip(this, RPC.BOT_INSTALL_UPSERT, bot)
}