Skip to content
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

Fix Permissions.all() #795

Merged
merged 3 commits into from
Jan 21, 2022
Merged

Fix Permissions.all() #795

merged 3 commits into from
Jan 21, 2022

Conversation

Sengolda
Copy link
Contributor

@Sengolda Sengolda commented Jan 15, 2022

Summary

Fixes #793 (Kind of)

I saw this issue and tried to reproduce the error and didn't get a 401 but instead a 403, either way it still appears that Permissions.all() will not work. This pr makes it return 0b1111111111111111111111111111111111111111 instead of -1 This very long bit number is what I found sets all permissions to True

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, typehinting, examples, ...)

@VincentRPS VincentRPS added Merge with squash priority: high High Priority status: awaiting review Awaiting review from a maintainer labels Jan 15, 2022
@VincentRPS VincentRPS added this to the v2.0 milestone Jan 15, 2022
@Dorukyum
Copy link
Member

This doesn't include the MODERATE_MEMBERS permission.

@Dorukyum
Copy link
Member

Upon testing I noticed that adding another 1 will add the new permission. We should look for a solution that doesn't require us to change this whenever a new permission is added.

@Lulalaby
Copy link
Member

Upon testing I noticed that adding another 1 will add the new permission. We should look for a solution that doesn't require us to change this whenever a new permission is added.

From testing I saw that every value is accepted except -1.
So just put a few 1 before it.

@Sengolda
Copy link
Contributor Author

@Dorukyum I fixed it.

@Dorukyum Dorukyum enabled auto-merge (squash) January 15, 2022 18:53
@Lulalaby Lulalaby enabled auto-merge (squash) January 21, 2022 18:04
@Dorukyum Dorukyum requested review from krittick and removed request for Dorukyum January 21, 2022 18:09
@Lulalaby Lulalaby merged commit b40a4bc into Pycord-Development:master Jan 21, 2022
VincentRPS pushed a commit to VincentRPS/pycord that referenced this pull request Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high High Priority status: awaiting review Awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

discord.Permissions.all() create/edit = 401 unauthorized
5 participants