Beau de l'aire
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
It works perfectly both in local and on the host
I don't know how to thanks you, you really helped me a lot, have a nice sunday !
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
With the docker command I succeeded locally
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
Start and run the proxy
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
Thanks ! I'm searching for example on the guide and the documentation but I can't find anything... I'm trying to play with "proxyRequests" but I don't think it's the way that works
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
Hi, and sorry for coming back after so long. It seems that Docker isn't compatible with my host T_T
Do you know if it's possible to install the proxy without it ?
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
That's true, thanks
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
And it should work
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
So, while doing this, I will have a rest instance running in local, something like this ?
Discord API <-> Cloudflare <-> My local rest <-> Shards 0, 1, 2 etc.
Discord API <- Cloudflare <- My local rest <- Shards 0, 1, 2 etc.
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
I'm gonna learn to use Docker, I think the time has come
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
Yep, they are all on the same host
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
Hello again, after a bit of investigation and your messages I think I've understood the problem. My bot is divided into shards, and the shards independently manage the queue system to avoid ratelimits. So some people send requests when I'm already limited, which leads to a cloudflare ban.
So to avoid this I'd have to "group" the shards (queues) using a rest proxy.
All I know about proxies is that they are intermediaries for communicating between a client and a server, for example.
I've done some research but I can't see how to implement this "grouping". I guess the code in the documentation isn't enough:
but I have no idea what I should add / start developing.
I don't want to take up too much of your time, but maybe you've got a hint or example handy?
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
Hmmm, good to know, I'm going to find out all about it, thanks again!
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
Thanks a lot, I will look at this, I have a last question, shouldn't I have received error messages telling me that I was rate-limited?
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
To be honest, I don't know much about it, does Discord JS implement this? Or would there be documentation?
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
I saw I should have 22 shards for 22k guilds, could add shards solve the problem ?
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
Hmmm, so it's to much invalid requests ?
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
I'm not sure what a 429s is.
I have a dozen shards, running on the same server and the same PM2 process.
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
Ouch
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
After seeing the problem again, I get the "Preparing to connect to the gateway..." log, even when the bot doesn't start up. However, the shard does not spawn and does not receive its guilds and I have no additional log
32 replies
DIAdiscord.js - Imagine an app
•Created by Beau de l'aire on 12/28/2023 in #djs-questions
but receiving commands but not responding and not restarting
Ok, thanks, I will see
32 replies