Zac Nowicki
Zac Nowicki
We can add those fields, yes. But not `member_count`.
Hm, I think I'd rather still stick with our own solution (even if we want to change this mechanically to behave more like webmock, patching `HTTP::Client#exec_internal` instead of running a...
@MineBartekSA You should able to run `crystal tool format` which will take care of any formatting issues for you.
The index caches are pointless and force you to use an array :disappointed: I'm not sure how to fix this right now.
This works now: ```cr require "./discordcr" client = Discord::CachedClient.new ENV["TOKEN"] client.configure_caches do guild_cache Discord::MemoryCache channel_cache Discord::MemoryCache role_cache Discord::MemoryCache user_cache Discord::MemoryCache end ``` The macros will place the correct generics on...
`delegate each` in `MemoryCache` currently crashes the compiler if used :disappointed: ```cr require "./discordcr" foo = Discord::CachedClient.new "token" foo.configure_caches do all_caches Discord::MemoryCache end foo.guild_cache.each do |id, guild| p guild end...
no, there are already open issues for it with no discussion of workarounds
I've rebased this for 0.25 and tidied up the commit history a little bit. --- Unfortunately `each` from my last example above still does not work. ``` Error in test/test.cr:23:...
Alright, I've rebased this for `Snowflake` compatibility (fdb5884) and "fixed" the `Enumerable` on `MemoryCache` (3dee944). I'll bump that issue. For now the workaround `.as` has to be used for `each`,...
Compiler bug fixed / worked around :smile: