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

Update permission type #544

Merged
merged 4 commits into from
Feb 26, 2022
Merged

Conversation

lukellmann
Copy link
Member

@lukellmann lukellmann commented Feb 23, 2022

I recommend a commit-wise review.

@lukellmann
Copy link
Member Author

Why is Permission no enum class like other flags? Should we change this?

@HopeBaron
Copy link
Member

Because of the Unknown class; in case Discord provided a permission that the user know but we don't

@lukellmann
Copy link
Member Author

Because of the Unknown class; in case Discord provided a permission that the user know but we don't

There is no Unknown class here, it would also be more difficult to use then an Unknown class for some sort of type.

@HopeBaron
Copy link
Member

It should have an unknown class; in case we encounter a permission we don't know

@HopeBaron
Copy link
Member

I think we had a compiler bug with enums so we decided to use this approach

@lukellmann
Copy link
Member Author

Should I add a Unknown class then? This would mean we also have to change Permissions.values, it currently works by filtering the known values.

@HopeBaron
Copy link
Member

the unknown class won't be in the set anyways; it's unknown but it may provide the user with insight given that we hold the full permission set so they can interact with them.

@lukellmann
Copy link
Member Author

the unknown class won't be in the set anyways;

I don't mean Permission.values, I mean Permissions.values (the values of the combined flags).

@lukellmann
Copy link
Member Author

lukellmann commented Feb 26, 2022

I added a Unknown class.
Also no longer a draft, discord/discord-api-docs#4555 got merged.

@lukellmann lukellmann marked this pull request as ready for review February 26, 2022 01:38
@HopeBaron HopeBaron merged commit bc0e76b into kordlib:0.8.x Feb 26, 2022
@lukellmann lukellmann deleted the changes/update-permission branch February 26, 2022 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants