Closed galpt closed 2 years ago
I managed to fix it. Closing this issue now.
@galpt https://xkcd.com/979/ please don't be that guy. Can you explain how you managed to fix it?
@galpt https://xkcd.com/979/ please don't be that guy. Can you explain how you managed to fix it?
There were various things that were causing the issue. In my case, if it's just to send/receive data from/to discord using http3, then it'll simply work since discord depends a lot on cloudflare and cloudflare supports http3.
So I'm just using http3 for known servers that support it and use http2 as the fallback. (Problem solved if you're not using any sharding on your bot)
Also, I was using shards and somehow it caused functions to misbehave while they were working normally without sharding. Either this problem's from discord or from the shards implementation or probably it's just how sharding works and you need to adjust your code to function properly with sharding.
I had to move some code from bottom to top and vice versa until the bot worked as expected. Probably it's still not very clear to you but that's just what happened.
I'm currently testing to combine quic-go with discordgo.
It seems some features work well but some do not. I'm also adding a fallback method so the bot can switch back to normal http2
I found that some of these don't work (or sometimes they just misbehave). Some other functions might not work as expected too with HTTP, but since I only tested these, I'm still not sure about it.
Some can be fixed by switching to http2, but sometimes switching back to http2 doesn't fix the issue. All functions work as expected when using websocket, but sometimes they misbehave when using http.
I know that we're not supposed to use http3 for production yet, but it's interesting to know that http3 transport works with discord too.
I wonder if it's considered as a bug when we use HTTP or did I miss something? Some extra info that might caused the issue to occur