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

feat(): replaced the List<String> for GuildFields features by an Enum… #169

Conversation

gmisiurny
Copy link

Description : Discord4J/Discord4J#1196 (comment)

Justification : Discord4J GuildFields interface rely on this repository.

@Doc94
Copy link
Member

Doc94 commented May 12, 2024

Why PermissionSet?

@gmisiurny
Copy link
Author

I can change the name of the enum if you want. PermissionSet is what @Azn9 suggested.
Maybe GuildFeature or GuildPermission is more suitable ?

Copy link
Member

@Azn9 Azn9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

However, there are some changes required on this PR.
In fact, this PR is not needed. The conversion from a List to a EnumSet should be done only on the Discord4J part. The discord-json project aims to represent discord entities as immutables objects in their most basic form.
You can take example on the message data flags field for instance

https://github.com/Discord4J/Discord4J/blob/026c1b8aa424d18679331102043ceab3d8e6fc74/core/src/main/java/discord4j/core/object/entity/Message.java#L427C1-L431C6

For the "PermissionSet", I just said "something like", to replace a EnumSet. Have a look at the file https://github.com/Discord4J/Discord4J/blob/master/rest/src/main/java/discord4j/rest/util/PermissionSet.java

@Doc94
Copy link
Member

Doc94 commented May 12, 2024

Closed in favor of Discord4J/Discord4J#1207
Like Azn9 this project represent the data in the most direct way.

@Doc94 Doc94 closed this May 12, 2024
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.

3 participants