JDA
JDA copied to clipboard
Make VoiceChannel#getMembers use Member#getVoiceState as single source of truth
Pull Request Etiquette
- [x] I have checked the PRs for upcoming features/bug fixes.
- [x] I have read the contributing guidelines.
Changes
- [x] Internal code
- [ ] Library interface (affecting end-user code)
- [ ] Documentation
- [ ] Other: _____
Closes Issue: NaN
Description
~~By tracking the connected channel independently from the member, we can persist the information regardless of the member cache policy. VoiceChannels track the connected members internally, for optimization purposes and bypasses the cache policy in that regard. This means GuildVoiceState#getChannel is now depending on the voice state cache, rather than being atomic. We could in theory try to optimize this by using some kinda lazy caching system, but that isn't really worth it I presume.~~
This removes the complexity of having two cache points track the connections of members. The runtime gain from having such an additional tracking seems like unnecessary micro-optimization that makes the cache management unnecessarily complex.
Bump. Why is this in the freezer? Is this effected by the weirdness introduced by Public Instances of StageChannels?
I put this on freezer because of stage channels and need to re-evaluate the impact of lurking members. Potentially, its unaffected by that but at the time, and currently still, the stage channel voice states are not documented well.
this might need to be reopened