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

Add new permissions #1411

Merged
merged 4 commits into from
Jun 22, 2024
Merged

Add new permissions #1411

merged 4 commits into from
Jun 22, 2024

Conversation

Earlopain
Copy link
Contributor

First commit makes the numbers bitflags which I find easier to parse and follows all the other flags in the repo. I also added docs for them.

Second commit adds missing flags currently documented at https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags

Third commit renames some fields to what they are now called on discords docs page.

Fourth commit adds currently undocumented flags, but there is a pending pr for those at discord/discord-api-docs#6305

@FedorLap2006 FedorLap2006 added refactor improvement Improvement of existing code and features and removed refactor labels Aug 12, 2023
@Earlopain
Copy link
Contributor Author

The 2 permissions I added in the last commit are no longer undocumented, the PR for that has been merged.

@mrbentarikau
Copy link

just a thought, maybe moving all these permissions from structs.go to a new file, like permissions.go?

@FedorLap2006 FedorLap2006 modified the milestone: v0.28.0 Dec 31, 2023
@Earlopain Earlopain mentioned this pull request Feb 13, 2024
structs.go Outdated
Comment on lines 2250 to 2545
// Allows management and editing of the guil.
PermissionManageServer = 1 << 5
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Allows management and editing of the guil.
PermissionManageServer = 1 << 5
// Deprecated: PermissionManageServer has been replaced by PermissionManageGuild.
PermissionManageServer = 1 << 5
// Allows management and editing of the guild.
PermissionManageGuild = 1 << 5

structs.go Show resolved Hide resolved
structs.go Outdated
PermissionSendVoiceMessages = 1 << 46

// Allows sending polls.
PermissionSendPools = 1 << 49
Copy link
Collaborator

Choose a reason for hiding this comment

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

💧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eugh, thanks for catching this

Copy link
Collaborator

Choose a reason for hiding this comment

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

No problem! We all do this sometimes.

@FedorLap2006 FedorLap2006 merged commit 28f8d42 into bwmarrin:master Jun 22, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement of existing code and features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants