DiscordPHP icon indicating copy to clipboard operation
DiscordPHP copied to clipboard

Unavailable servers prevent setupChunking()

Open valzargaming opened this issue 4 years ago • 2 comments

https://github.com/discord-php/DiscordPHP/blob/cf79ca6ada74102b50ade8f84d99db028d585505/src/Discord/Discord.php#L459

setupChunking never gets called if something goes wrong and a server that is expected to load never loads. Removing this if statement or calling setupChunking() after a set amount of time has passed resolves the issue and allows start-up functions such as with loadAllMembers to process correctly. This issue occurs if an empty guild is sent by Discord but neither a guild create or guild delete event is called for that guild by Discord.

https://discord.com/developers/docs/topics/gateway#guild-availability https://discord.com/developers/docs/topics/gateway#guild-create

Before

image

After

image

valzargaming avatar Nov 09 '21 05:11 valzargaming

This issue has resurfaced when using the new cache interface if the external cache is not available. https://user-images.githubusercontent.com/7202504/189182350-a595fee1-90a8-4b29-9192-7c066b3ef5f0.mp4

valzargaming avatar Sep 08 '22 16:09 valzargaming

This issue has resurfaced when using the new cache interface if the external cache is not available.

The cache is never read on the Guild Members Chunk I don't believe that was the issue.

SQKo avatar Sep 08 '22 16:09 SQKo