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

(Partial)Guild(Id)::audit_logs takes in raw action type IDs instead of the Action enum #2488

Closed
pluiedev opened this issue Jul 9, 2023 · 0 comments · Fixed by #2623
Closed
Labels
feature-request A new requested functionality. model Related to the `model` module.

Comments

@pluiedev
Copy link

pluiedev commented Jul 9, 2023

Currently, serenity::model::Guild::audit_logs (as well as the equivalent methods in GuildId and PartialGuildId) take an Option<u8> for the optional action type field. This is incredibly bad for multiple reasons, such as allowing the user to easily and mistakenly specify incorrect type IDs, and requiring a comment explaining the magic number in many cases.

Since Serenity already has an Action enum that models this action type very clearly, we should definitely refactor the audit_log methods to use this enum in 0.12.x.

@arqunis arqunis added feature-request A new requested functionality. model Related to the `model` module. labels Jul 15, 2023
arqunis pushed a commit that referenced this issue Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A new requested functionality. model Related to the `model` module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants