cronokirby / alchemy

A discord library for Elixir
MIT License
151 stars 34 forks source link

Member cache is not always populating #56

Open OvermindDL1 opened 6 years ago

OvermindDL1 commented 6 years ago

The member cache, randomly it seems when the system is brought up, will refuse to populate itself and calls like Alchemy.Cache.member(guild_id, id) never return anything until restarted and tested again. When it is not working it returns nothing but {:error, "Failed to find an entry for <whateverID> in section members"}.

cronokirby commented 6 years ago

This seems to be an issue on discord's part with not sending the information, and not necessarily a problem with the code itself.

OvermindDL1 commented 6 years ago

This seems to be an issue on discord's part with not sending the information, and not necessarily a problem with the code itself.

Any way to 'bump' it though a few times to try to re-acquire the information? Getting nothing until later reboots is rather empty.

cronokirby commented 4 years ago

79 addressed this. See if you encounter the same problem running https://hex.pm/packages/discord_alchemy/0.6.4. If the problem doesn't seem to occurr anymore, we can close this :P

OvermindDL1 commented 4 years ago

I'll update soon! The bot stays online for extended periods and the cache not working was pretty random, but the commit of the fix looks reliable. I'd say if you don't hear back from me in a few weeks then it's good. I'm going to remove a few of my checks that force it to restart when it detects a dead cache so it should be a bit crashy if it happens at that point. :-)

Thanks much!

OvermindDL1 commented 4 years ago

Just as an update, it came up without issue twice so far (I decided to update everything while I was at it, so far I've been lucky...).