Benjamin

Results 52 comments of Benjamin

I started this process (in [2f9f152](https://github.com/L0neGamer/discord-haskell/commit/2f9f1520c63b3f7d79adff72e9f3db7eb3e6cac9)), but I was getting burnt out on having to make so many individual data structures and their instances.

@adinapoli Hi, I made the changes as requested, and as a result everything looks much nicer.

@chessai may I ask for a review?

The snippet in that discord.js function is `return this.guild.members.cache.filter(m => this.permissionsFor(m).has(PermissionFlagsBits.ViewChannel, false));` Which indicates that yes, they're doing something weird for current voice channel users.

To do this I think we'd want to cache these events: https://discord.com/developers/docs/topics/gateway-events#voice-state-update

Another method may be to create typeclasses for things like interactions, but this may not work for things like recieving an arbitrary interaction. It would work well with sending interactions,...

I'm not sure how datakinds would apply here. Do you have a minimal example in mind?

This might be similar to what I'm envisaging: https://hackage.haskell.org/package/open-union. Although I guess it doesn't allow for direct pattern matching, it might allow for that function style one.