[ws] Accessing list of unavailable guilds when shard turns ready

In @discordjs/ws, how am i supposed to access the list of unavailable guilds after a shard becomes ready? The ready event on WebSocketShard is hidden away and the ready even on WebSocketManager doesnt supply me with the data i want. The reason i want the list of unavailable guilds is so that i can use these when receiving GUILD_CREATEs to know whether something is a new guild or simply a guild becoming available
3 Replies
d.js docs
d.js docs3y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Sammy
SammyOP3y ago
(@discordjs/ws 0.3.0) Oh i see now that there was a patch to fix exactly this issue yesterday, ill try that out! Well, reopening this because the package is broken CATTHUMBSUP installing any of the latest 5 or so dev releases gives me this
node:fs:585
handleErrorFromBinding(ctx);
^

Error: ENOENT: no such file or directory, open 'C:\project\node_modules\@discordjs\package.json'
at Object.openSync (node:fs:585:3)
at readFileSync (node:fs:453:35)
at file:///C:/project/node_modules/@discordjs/ws/dist/index.mjs:283:19
at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
at async loadESM (node:internal/process/esm_loader:88:5)
at async handleMainPromise (node:internal/modules/run_main:65:12) {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'C:\\project\\node_modules\\@discordjs\\package.json'
}
node:fs:585
handleErrorFromBinding(ctx);
^

Error: ENOENT: no such file or directory, open 'C:\project\node_modules\@discordjs\package.json'
at Object.openSync (node:fs:585:3)
at readFileSync (node:fs:453:35)
at file:///C:/project/node_modules/@discordjs/ws/dist/index.mjs:283:19
at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
at async loadESM (node:internal/process/esm_loader:88:5)
at async handleMainPromise (node:internal/modules/run_main:65:12) {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'C:\\project\\node_modules\\@discordjs\\package.json'
}
Sammy
SammyOP3y ago
GitHub
Error loading @discordjs/ws package on latest dev version · Issue #...
Which package is this bug report for? ws Issue description install @discordjs/[email protected] Import the package Observe crash Code sample const ws = require("@discordjs/...
Want results from more Discord servers?
Add your server