Commit f0ee490
authored
fix(automod): improve validation for invalid
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/1093894067135463475actions (#1030)1 parent 473bafb commit f0ee490
3 files changed
+26
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
547 | 550 | | |
548 | 551 | | |
549 | 552 | | |
| |||
598 | 601 | | |
599 | 602 | | |
600 | 603 | | |
| 604 | + | |
| 605 | + | |
601 | 606 | | |
602 | 607 | | |
603 | 608 | | |
| |||
619 | 624 | | |
620 | 625 | | |
621 | 626 | | |
622 | | - | |
| 627 | + | |
623 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
624 | 634 | | |
625 | 635 | | |
626 | 636 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
4565 | 4565 | | |
4566 | 4566 | | |
4567 | 4567 | | |
| 4568 | + | |
| 4569 | + | |
| 4570 | + | |
4568 | 4571 | | |
4569 | 4572 | | |
4570 | 4573 | | |
| |||
4594 | 4597 | | |
4595 | 4598 | | |
4596 | 4599 | | |
4597 | | - | |
| 4600 | + | |
4598 | 4601 | | |
| 4602 | + | |
| 4603 | + | |
4599 | 4604 | | |
4600 | 4605 | | |
4601 | 4606 | | |
| |||
4614 | 4619 | | |
4615 | 4620 | | |
4616 | 4621 | | |
4617 | | - | |
| 4622 | + | |
4618 | 4623 | | |
| 4624 | + | |
| 4625 | + | |
| 4626 | + | |
| 4627 | + | |
| 4628 | + | |
4619 | 4629 | | |
4620 | 4630 | | |
4621 | 4631 | | |
| |||
0 commit comments