#Ports that discordjs is using?

11 messages · Page 1 of 1 (latest)

cerulean sky
#

For now for my bot to work i enabled all ports in egress rules, but I need to know which port(or port range) is discord using?

drifting phoenixBOT
#

• 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.

humble valve
#

Depends. For mainlib it’s only TCP 443 afaik as it‘s a HTTPS connection

#

For /voice you‘d also have UDP ports

cerulean sky
#

Ok, thank you!

#

I just tested it, and its not working. When command is issued bot just crashes

humble valve
#

With an error? If so show it, if not: how?

cerulean sky
#

journalctl logs:

Jun 30 17:38:04 dora node[1341704]: /home/ubuntu/discord-bots/nubz-dj/node_modules/undici/index.js:109
Jun 30 17:38:04 dora node[1341704]:       Error.captureStackTrace(err, this)
Jun 30 17:38:04 dora node[1341704]:             ^
Jun 30 17:38:04 dora node[1341704]: TypeError: fetch failed
Jun 30 17:38:04 dora node[1341704]:     at fetch (/home/ubuntu/discord-bots/nubz-dj/node_modules/undici/index.js:109:13)
Jun 30 17:38:04 dora node[1341704]:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Jun 30 17:38:04 dora node[1341704]:     at async fetchRecommendedShardCount (/home/ubuntu/discord-bots/nubz-dj/node_modules/discord.js/src/util/Util.js:70:20)
Jun 30 17:38:04 dora node[1341704]:     at async ShardingManager.spawn (/home/ubuntu/discord-bots/nubz-dj/node_modules/discord.js/src/sharding/ShardingManager.js:190:16) {
Jun 30 17:38:04 dora node[1341704]:   cause: ConnectTimeoutError: Connect Timeout Error
Jun 30 17:38:04 dora node[1341704]:       at onConnectTimeout (/home/ubuntu/discord-bots/nubz-dj/node_modules/undici/lib/core/connect.js:182:24)
Jun 30 17:38:04 dora node[1341704]:       at /home/ubuntu/discord-bots/nubz-dj/node_modules/undici/lib/core/connect.js:129:46
Jun 30 17:38:04 dora node[1341704]:       at Immediate._onImmediate (/home/ubuntu/discord-bots/nubz-dj/node_modules/undici/lib/core/connect.js:170:9)
Jun 30 17:38:04 dora node[1341704]:       at process.processImmediate (node:internal/timers:476:21) {
Jun 30 17:38:04 dora node[1341704]:     code: 'UND_ERR_CONNECT_TIMEOUT'
Jun 30 17:38:04 dora node[1341704]:   }
Jun 30 17:38:04 dora node[1341704]: }
Jun 30 17:38:04 dora node[1341704]: Node.js v18.16.0
humble valve
#

What djs version are you using exactly? Because that error doesn’t match 14.11.0 nvm

#

You don’t seem to actually allow that as outgoing traffic