ElJay
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/23/2024 in #djs-questions
How to run recommended ("auto") shard count all in one thread?
ah I guess I'm blind, thanks
8 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/23/2024 in #djs-questions
How to run recommended ("auto") shard count all in one thread?
How do I do that? I wasn't able to spot a client option
8 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/23/2024 in #djs-questions
How to run recommended ("auto") shard count all in one thread?
To explain why I want to do this, I have a small shard count that doesn't require multiple threads. And I would like to avoid the overhead and restrictions that come with multiple threads.
8 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
would it be worth opening an issue about adding support for this to discord.js? I'm kinda surprised the library has nothing for this.
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
and the first few retries will be fairly fast, so in the cases where it's a one-time error you aren't losing a relevant amount of time
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
but with back-off you avoid making unnecessary requests and are able to resume much more smoothly when the outage ends
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
To give a more tailored answer, during discord outages you are going to get 5xx errors and timeouts when you immediately retry, hit the retry limit, and the request will fail.
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
I'm surprised you haven't heard of this kind of strategy before. It's standard practice and prevents several issues with immediate retries. A quick google gave me these explanations on what back-offs are and why they are important:
https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter
https://medium.com/bobble-engineering/how-does-exponential-backoff-work-90ef02401c65
https://medium.com/@roopa.kushtagi/decoding-exponential-backoff-a-blueprint-for-robust-communication-de21459aa98f
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
instead of immediately retrying
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
implementing back off
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
Is there any kind of setting where I could pass a custom function or something to implement this behavior? Or do I have to implement it at the top-level? For example:I really don't want to have to do this if there's a better way.
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
So if I wanted to implement back off in the retries I would need to set that REST option to 0 and then implement retries myself? Or is there some easier way to do it?
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
Also for 5xx codes and timeouts does it just immediately retry or is there some kind of back off? Is there a way to configure/add back off?
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/21/2024 in #djs-questions
Does the REST handler retry failed requests?
So it handles rate limit errors completely?
26 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/19/2024 in #djs-questions
How to check whether a user can be DMed?
yep. thanks
8 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/19/2024 in #djs-questions
How to check whether a user can be DMed?
but sounds like that requires sending a dm and there's not anything I can do about that
8 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/19/2024 in #djs-questions
How to check whether a user can be DMed?
I would like to confirm that the bot can DM the user when the command is run, because when it's time to send the reminder I can't do anything if it fails.
8 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/19/2024 in #djs-questions
How to check whether a user can be DMed?
Here's the relevant use case:
1. User runs /remind command.
2. At the specified time user is DMed with the reminder.
8 replies
DIAdiscord.js - Imagine an app
•Created by ElJay on 10/11/2024 in #djs-questions
Strange session error when logging in.
okay so definitely a restart issue then, thanks
6 replies