Fix gateway not listening for new channels events

This commit is contained in:
AlTech98
2021-09-18 10:44:25 +02:00
parent 5d6fa7697a
commit 97e0c8709b
3 changed files with 9 additions and 18 deletions
+3 -8
View File
@@ -116,7 +116,7 @@ async function consume(this: WebSocket, opts: EventOpts) {
.has("VIEW_CHANNEL")
)
return;
break;
//No break needed here, we need to call the listenEvent function below
case "GUILD_CREATE":
this.events[id] = await listenEvent(id, consumer, listenOpts);
break;
@@ -193,16 +193,11 @@ async function consume(this: WebSocket, opts: EventOpts) {
break;
}
let aa = {
Send(this, {
op: OPCODES.Dispatch,
t: event,
d: data,
s: this.sequence++,
}
//TODO remove before PR merge
console.log(aa)
Send(this, aa);
});
opts.acknowledge?.();
}