cronokirby / alchemy

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

Private_message channel cache is always empty #86

Closed OvermindDL1 closed 4 years ago

OvermindDL1 commented 4 years ago

Attempting to run Alchemy.Cache.private_channel/1 with a private channel ID or a user: "..." ID returns nothing. Running Alchemy.Cache.search(:private_channels, fn _ -> true end) also always returns [] even though there are multiple private conversations open with the bot.

OvermindDL1 commented 4 years ago

Also, not able to use Alchemy.Cache.member to get member information from a private message and member ID.

curz46 commented 4 years ago

From what I remember, the private channel cache is not properly updated (read: used at all). I don't think it is updated when the guild is initially added via GUILD_CREATE, and event handlers depend on a property of name is_private being true to consider it a private channel, which does not exist in the spec (private channels will never be treated as private).

curz46 commented 4 years ago

This may now be resolved as per the recent commit #99

OvermindDL1 commented 4 years ago

Oh nice, thank's for the update, I'll try it out. :-)