-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Rename edit_permission_overwrites
to edit_permission_overwrite
#1195
Conversation
edit_permission_overwrites
edit_permission_overwrites
to fix incorrect plurality
Pretty sure "overwrites" is correct here. The phrase "edit permission overwrite" makes no sense. |
The discord API docs also refers to it as "permission overwrites" |
Hmm I thought and agreed with davfsa that "overwrite" made more sense because it edits a specific entry if I understand the method correctly. |
This form is used throughout hikari as well but it's this specific method that edits only a single entry I believe for an overwrite? |
I'll add the fragment later by the way. |
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.
This would need deprecation of the old method instead of removal to not turn it into a breaking change. Fragment file should update to reflect that too
There is currently an inconsistency in the lib with this name, with one method calling it overwrites and another one overwrite. Since you are editing a specific permission overwrite, I think the singular is more fitting. This was fact a todo of mine that seems to have been snipped, lol |
Heh it was, I just thought I could do it anyway haha. |
@davfsa Should the tests should use the old name or new name? |
Nvm about review, this is failing CI, let me fix. Made some silly mistakes lol |
The old deprecated method and the new method should both be tested up until the deprecated method is removed. |
What about methods that use that method? They can just be updated with the new name and the test changed right? |
Don't you have the ability to edit multiple overwrites with the same method though? |
Hmm, now I'm a bit conflicted here. It makes sense as singular when you look at it from an "overwrite entry" but if you're editing multiple permissions, you can use the bitwise |
I'm also looking at how discord.js and discord.py named this and utterly confused 😕 |
A permission overwrite is the singular object that consists of a target, what permissions are allowed and which ones are denied. Since this endpoint only edits a specific one, then I currently can't check and I don't know it of the top of my head, but the method to bulk ediy them is a different one @parafoxia |
Right yeah, I'm seeing what you mean. I'd always taken a "permission overwrite" to be an overwrite of a specific permission, rather than all permissions for a given entity. |
@GoogleGenius I've spotted a typo which might as well be fixed in this PR. The docs (existing and updated) say "vale" instead of "value" in the allowed and denied fields. |
Thanks, will fix. |
edit_permission_overwrites
to fix incorrect pluralityedit_permission_overwrites
to edit_permission_overwrite
Co-authored-by: davfsa <davfsa@gmail.com>
Summary
Deprecation. Renames
edit_permission_overwrites
toedit_permission_overwrite
.Checklist
nox
and all the pipelines have passed.Related issues
https://discord.com/channels/574921006817476608/700378161526997003/979493994092449802