-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Deafen and Undeafen members #1272
Conversation
One interesting though that came to me in this PR: Can we have a context-full resources? We can return another type of |
These two functions just update the member's properties and send them back to Discord to overwrite them. You could get this same effect by calling I know right now it seems like there's a missing feature here, but the reality is some functions like un/deafening members don't actually have API endpoints associated with them. While I agree that we do need a better way to access the functionality from out of this specific context, I don't think adding aliases or unnecessary calls to the PATCH endpoint is the way to go about it. I've been considering adding traits to the classes that specifically handle updating parts to prep them for saving, but nothing is set in stone yet as I'm not sure how we would futureproof it. |
I'm open for any suggestions on how to accomplish this. Looking things through some more I still think it makes more sense to scrap this PR completely. Ideally a helper method should be made that would return a PromiseInterface so it can The current best solution is to leave things as is. Developers will need to manually update the attributes and call |
The docs are surprisingly scarce as to how un/deafening and un/muting should work. For deafening, the only requirements are the bot having the DEAFEN_MEMBERS bitwise permission and for the member to currently be in a voice channel, necessitating the need to call the function within the context of a channel. Muting members is identical except that the bot is allowed to mute itself. The only way we're able to implement this properly at this time is with the original suggestion, else the Member part would need to accept a channel as a parameter, which could cause further confusion as it'd be possible to pass a channel the member isn't already in, and would break the library's patterns. |
This should be production ready now |
Adds
deafenMember
andundeafenMember
functionality to voice channels.