Change how GUILD_DELETE cleans up the listener

Adding `this.events[id]?.()` cleans up the listener. I removed
`opts.cancel()` because with it, the event had issues firing after the
first time.

Resolves: #1242
This commit is contained in:
Zane Helton 2025-06-28 17:01:25 -04:00 committed by Madeline
parent 184433b078
commit f81e5f6afa

View File

@ -190,8 +190,8 @@ async function consume(this: WebSocket, opts: EventOpts) {
case "RELATIONSHIP_REMOVE":
case "CHANNEL_DELETE":
case "GUILD_DELETE":
this.events[id]?.();
delete this.events[id];
opts.cancel();
break;
case "CHANNEL_CREATE":
if (