cronokirby/alchemy

Private_message channel cache is always empty

Closed this issue · 4 comments

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.

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

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).

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

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