No `Ready` event dispatached

I am using @discordjs/ws version 0.6.0, and @discord/rest version 1.5.0. It seems like I am not receiving the ready event. I do receive a bunch of GUILD_CREATE on startup, as well as other events, like messages, guild members, etc.. File: index.js
import {WebSocketManager} from "@discordjs/ws";
import {REST} from "@discordjs/rest";
import {botConfig,} from "#config";

const rest = new REST().setToken(botConfig.token);
const gateway = new WebSocketManager({
token: botConfig.token,
intents: botConfig.intents,
rest,
});
export default gateway;
import {WebSocketManager} from "@discordjs/ws";
import {REST} from "@discordjs/rest";
import {botConfig,} from "#config";

const rest = new REST().setToken(botConfig.token);
const gateway = new WebSocketManager({
token: botConfig.token,
intents: botConfig.intents,
rest,
});
export default gateway;
File: controller.js
import * as handlers from "./handlers.js";
import gateway from "./index.js";
import {GatewayDispatchEvents} from "discord-api-types/v10";

await gateway.connect();
gateway.on("dispatch", ({data}) => {
switch(data.t) {
case GatewayDispatchEvents.Ready:
return console.log(data.d);
}
});
import * as handlers from "./handlers.js";
import gateway from "./index.js";
import {GatewayDispatchEvents} from "discord-api-types/v10";

await gateway.connect();
gateway.on("dispatch", ({data}) => {
switch(data.t) {
case GatewayDispatchEvents.Ready:
return console.log(data.d);
}
});
2 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Virtus
VirtusOP2y ago
Ah yes, that did the trick. Thank you
Want results from more Discord servers?
Add your server