feat(guild): gossip handlers for guild soundboard RPC 57–58
Wire SOUND_UPSERT to guild-sound and SOUND_PLAY to guild-sound-play events, plus simulateGossip paths for Bare smokes. Add gossipSoundUpsert and gossipSoundPlay broadcast helpers mirroring sticker gossip. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -395,6 +395,12 @@ class PearcordGuild extends EventEmitter {
|
||||
if (method === RPC.EMOJI_PACK_DELETE) {
|
||||
this.emit('guild-emoji-pack-delete', payload)
|
||||
}
|
||||
if (method === RPC.SOUND_UPSERT) {
|
||||
this.emit('guild-sound', payload)
|
||||
}
|
||||
if (method === RPC.SOUND_PLAY) {
|
||||
this.emit('guild-sound-play', payload)
|
||||
}
|
||||
}
|
||||
|
||||
/** Deterministic gossip injection for Bare smokes (no live mesh). */
|
||||
@@ -435,6 +441,14 @@ class PearcordGuild extends EventEmitter {
|
||||
this.emit('guild-emoji-pack-delete', payload)
|
||||
return
|
||||
}
|
||||
if (method === RPC.SOUND_UPSERT) {
|
||||
this.emit('guild-sound', payload)
|
||||
return
|
||||
}
|
||||
if (method === RPC.SOUND_PLAY) {
|
||||
this.emit('guild-sound-play', payload)
|
||||
return
|
||||
}
|
||||
if (method === RPC.PROFILE_COSMETIC_UPDATE) {
|
||||
this.emit('profile-cosmetic', payload)
|
||||
return
|
||||
@@ -598,6 +612,14 @@ class PearcordGuild extends EventEmitter {
|
||||
broadcastGossip(this, RPC.EMOJI_PACK_DELETE, payload)
|
||||
}
|
||||
|
||||
gossipSoundUpsert (row) {
|
||||
broadcastGossip(this, RPC.SOUND_UPSERT, row)
|
||||
}
|
||||
|
||||
gossipSoundPlay (payload) {
|
||||
broadcastGossip(this, RPC.SOUND_PLAY, payload)
|
||||
}
|
||||
|
||||
sendScreenMedia (msg) {
|
||||
broadcastScreenMedia(this, msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user