𝒄𝒐𝒄𝒐𝒌𝒊𝒕𝒕𝒆𝒏
𝒄𝒐𝒄𝒐𝒌𝒊𝒕𝒕𝒆𝒏
DIAdiscord.js - Imagine an app
Created by 𝒄𝒐𝒄𝒐𝒌𝒊𝒕𝒕𝒆𝒏 on 5/30/2024 in #djs-questions
Opening Handshake has timed out (no CF ban)
I mean seriously, this is the second time I get this, both times since updating to the most recent version 14.15.x from before I think 14.14.x and it happened on different apps while both of them were running on the same server on the same network and the other one didn't experience any problems. Of course it now happened on the app that doesn't have the "warn" and "error" eventlisteners registered on Client,... also it only happened those two times,.. within like 2 weeks or since when the last update was released. Anyway, this is the stack trace:
1|kokomi | 05-30 08:00:43 +02:00: Error: Opening handshake has timed out
1|kokomi | 05-30 08:00:43 +02:00: at ClientRequest.<anonymous> (/home/pi4/kokomi/node_modules/ws/lib/websocket.js:872:7)
1|kokomi | 05-30 08:00:43 +02:00: at ClientRequest.emit (node:events:519:28)
1|kokomi | 05-30 08:00:43 +02:00: at TLSSocket.emitRequestTimeout (node:_http_client:845:9)
1|kokomi | 05-30 08:00:43 +02:00: at Object.onceWrapper (node:events:633:28)
1|kokomi | 05-30 08:00:43 +02:00: at TLSSocket.emit (node:events:519:28)
1|kokomi | 05-30 08:00:43 +02:00: at Socket._onTimeout (node:net:589:8)
1|kokomi | 05-30 08:00:43 +02:00: at listOnTimeout (node:internal/timers:573:17)
1|kokomi | 05-30 08:00:43 +02:00: at process.processTimers (node:internal/timers:514:7)
1|kokomi | 05-30 08:00:43 +02:00: Error: Opening handshake has timed out
1|kokomi | 05-30 08:00:43 +02:00: at ClientRequest.<anonymous> (/home/pi4/kokomi/node_modules/ws/lib/websocket.js:872:7)
1|kokomi | 05-30 08:00:43 +02:00: at ClientRequest.emit (node:events:519:28)
1|kokomi | 05-30 08:00:43 +02:00: at TLSSocket.emitRequestTimeout (node:_http_client:845:9)
1|kokomi | 05-30 08:00:43 +02:00: at Object.onceWrapper (node:events:633:28)
1|kokomi | 05-30 08:00:43 +02:00: at TLSSocket.emit (node:events:519:28)
1|kokomi | 05-30 08:00:43 +02:00: at Socket._onTimeout (node:net:589:8)
1|kokomi | 05-30 08:00:43 +02:00: at listOnTimeout (node:internal/timers:573:17)
1|kokomi | 05-30 08:00:43 +02:00: at process.processTimers (node:internal/timers:514:7)
nothing more to go on except that I can hardly think of it being a cf ban, rate limits or even a network error... my other app has 2 more ws connections (to twitch and SE) and even that one didn't show any hickups at that time.
2 replies
DIAdiscord.js - Imagine an app
Created by 𝒄𝒐𝒄𝒐𝒌𝒊𝒕𝒕𝒆𝒏 on 3/29/2024 in #djs-questions
how to avoid api spam when sending "mass dms"
Occasionally (like twice a year maybe) my friend organises a kudoboard for the content creator he mods for and he always painstaking DMS like 50 people with the link to it because he obviously can't post it in the server announcements where the content creator would see it immediately. So I wrote a command for him that accepts a list of user mentions and a message and then sends that message to all specified users. Since the topic came up in #general I wanna ask, are there any features I should implement like a short wait time after every DM?
12 replies
DIAdiscord.js - Imagine an app
Created by 𝒄𝒐𝒄𝒐𝒌𝒊𝒕𝒕𝒆𝒏 on 10/20/2023 in #djs-questions
setDefaultMemberPermission in dm channels
I'm trying to merge my clean and cleanDM commands (one to clean up messages in dms, one for guilds) can I still use .setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages) or would that automatically set DMPermission to false?
9 replies