Not getting hello @discordjs/ws

identify payload: https://hastebin.abelpurnwasy.com/hejobegana.js dispatch event: https://hastebin.abelpurnwasy.com/yaxivupali.coffeescript manager:
const rest = new REST().setToken(token);

const manager = new WebSocketManager({
token,
intents,
rest,
...DefaultWebSocketManagerOptions,
});
const rest = new REST().setToken(token);

const manager = new WebSocketManager({
token,
intents,
rest,
...DefaultWebSocketManagerOptions,
});
12 Replies
d.js toolkit
d.js toolkit2mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
Abel P.
Abel P.OP2mo ago
full code with comments: https://hastebin.abelpurnwasy.com/aceporerib.js
"dependencies": {
"@discordjs/rest": "^2.4.0",
"@discordjs/ws": "^2.0.0",
"discord-api-types": "^0.37.103",
"ws": "^8.18.0"
}
"dependencies": {
"@discordjs/rest": "^2.4.0",
"@discordjs/ws": "^2.0.0",
"discord-api-types": "^0.37.103",
"ws": "^8.18.0"
}
DD
DD2mo ago
i have no clue what you think you're doing, none of this is valid you are not at all supposed to be manually sending identify/resumes/heartbeats the library does all of that for you
Abel P.
Abel P.OP2mo ago
So @discordjs/ws does all that automatically?
DD
DD2mo ago
yes...? im so confused what made you think otherwise did you look at the readme
Abel P.
Abel P.OP2mo ago
I’m trying to achieve zero downtime deploys so my gateway stays online and my client can go off and come back on after few mins to continue I’ll be honest I was not using the package before that’s why all of that there and no I didn’t look at the readme I just read the readme I’ll do some changes
DD
DD2mo ago
literally set up a basic manager, and provide updateSessionInfo and retrieveSessionInfo to point to an external store that's all you need
Abel P.
Abel P.OP2mo ago
ohh still dont get the heartbeat logs
[01-11-2024 09:31:20]: [READY] Cluster 0 is ready
[01-11-2024 09:32:17]: [DEBUG] [WS => Shard 0] Destroying shard
Reason: Something timed out or went wrong while waiting for an event
Code: 1000
Recover: Reconnect
[01-11-2024 09:32:17]: [DEBUG] [WS => Shard 0] Connection status during destroy
Needs closing: true
Ready state: 1
[01-11-2024 09:32:17]: [DEBUG] [WS => Shard 0] Connecting to ws://localhost:8080?v=10&encoding=json
[01-11-2024 09:32:17]: [DEBUG] [WS => Shard 0] Waiting for event hello for 60000ms
[01-11-2024 09:32:18]: [DEBUG] [WS => Shard 0] Shard received all its guilds. Marking as fully ready.
[01-11-2024 09:32:18]: [DEBUG] [WS => Shard 0] Resumed and replayed 0 events
[01-11-2024 09:31:20]: [READY] Cluster 0 is ready
[01-11-2024 09:32:17]: [DEBUG] [WS => Shard 0] Destroying shard
Reason: Something timed out or went wrong while waiting for an event
Code: 1000
Recover: Reconnect
[01-11-2024 09:32:17]: [DEBUG] [WS => Shard 0] Connection status during destroy
Needs closing: true
Ready state: 1
[01-11-2024 09:32:17]: [DEBUG] [WS => Shard 0] Connecting to ws://localhost:8080?v=10&encoding=json
[01-11-2024 09:32:17]: [DEBUG] [WS => Shard 0] Waiting for event hello for 60000ms
[01-11-2024 09:32:18]: [DEBUG] [WS => Shard 0] Shard received all its guilds. Marking as fully ready.
[01-11-2024 09:32:18]: [DEBUG] [WS => Shard 0] Resumed and replayed 0 events
DD
DD2mo ago
those aren't debug logs there's a HeartbeatComplete event https://discord.js.org/docs/packages/ws/main/WebSocketShardEvents:Enum
Abel P.
Abel P.OP2mo ago
those logs from my client
import BotClient from "../../structures/Client";
import { Logger } from "../../utils/logger";

export = {
name: "debug",
run: async (client: BotClient, data: string) => {
Logger.log(data, "debug");
},
};
import BotClient from "../../structures/Client";
import { Logger } from "../../utils/logger";

export = {
name: "debug",
run: async (client: BotClient, data: string) => {
Logger.log(data, "debug");
},
};
my proxy heartbeat completes though { ackAt: 1730468366446, heartbeatAt: 1730468366384, latency: 62 } 0
DD
DD2mo ago
no, I just meant heartbeats dont go to debug :jynEHEH:
Abel P.
Abel P.OP5w ago
oh my client destroys the websocket since it thinks hello not received the thing is i need to send events to my client (discord.js) that is connected to the proxy or itll end up doing: https://hastebin.blackforthosting.com/alutakamec.yaml Is it possible to do this in discord.js client options? Ohhh
Want results from more Discord servers?
Add your server