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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user