-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(member): implement new voice states endpoints #1217
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, thanks c:
Updating the cache is definitely a cool idea, though it conflicts with the part you mentioned -
Also in
Member.fetch_voice_state
i'm currently propagating theNotFound
error, maybe we could catch it and returnNone
?
Propagating the NotFound
error is the right move, but it does mean voice states added to the cache this way would never get removed again (assuming no voice state intent, since the fetch method is pointless if enabled).
Co-authored-by: shiftinv <[email protected]> Signed-off-by: Snipy7374 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also thought implementing /voice-states/@me
would be unnecessary considering /voice-states/{bot.user.id}
would be identical, but there actually appears to be one difference - if the bot gets moved to a channel it normally wouldn't have connect perms for, the former endpoint still works, while the latter doesn't.
Special-casing the bot's user ID and using the @me
endpoint in fetch_voice_state
should be a pretty straightforward fix for this.
Co-authored-by: shiftinv <[email protected]> Signed-off-by: Snipy7374 <[email protected]>
At this point I think we should keep this separated. The best thing is to implement a method on the |
On |
What do we do with the method implemented on the |
I removed it |
Co-authored-by: vi <[email protected]> Signed-off-by: Snipy7374 <[email protected]>
Co-authored-by: vi <[email protected]> Signed-off-by: Snipy7374 <[email protected]>
Co-authored-by: vi <[email protected]> Signed-off-by: Snipy7374 <[email protected]>
Summary
I did not implement
Get Current User Voice State % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/@me
because you can get the bot's voice state by doingGuild.me.fetch_voice_state
using the common endpoint, let me know if i should implement the other too. Also inMember.fetch_voice_state
i'm currently propagating theNotFound
error, maybe we could catch it and returnNone
?Checklist
pdm lint
pdm pyright