Skip to content

Conversation

@shiftinv
Copy link
Member

@shiftinv shiftinv commented May 7, 2023

Summary

This improves validation in Guild.create_automod_rule and AutoModRule.edit, now raising a proper TypeError for invalid action types in the most common error cases.

ref: https://canary.discord.com/channels/808030843078836254/1093894067135463475

Checklist

  • If code changes were made, then they have been tested
    • I have updated the documentation to reflect the changes
    • I have formatted the code properly by running pdm lint
    • I have type-checked the code by running pdm pyright
  • 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, ...)

@shiftinv shiftinv added s: needs review Issue/PR is awaiting reviews t: bugfix labels May 7, 2023
@shiftinv shiftinv added this to the disnake v2.9 milestone May 7, 2023
@shiftinv shiftinv changed the title fix(automod): improve error for invalid actions fix(automod): improve validation for invalid actions May 7, 2023
@shiftinv shiftinv enabled auto-merge (squash) May 21, 2023 17:08
@shiftinv shiftinv merged commit f0ee490 into master May 21, 2023
@shiftinv shiftinv deleted the fix/improve-automod-actions-error branch May 21, 2023 17:12
@onerandomusername onerandomusername removed the s: needs review Issue/PR is awaiting reviews label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants