-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Implement auto moderation #1220
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄
This closes #1189 |
class PartialAutoModTrigger: | ||
"""Base class representing the content a rule triggers on.""" | ||
|
||
type: AutoModTriggerType = attr.field(eq=False, hash=False, repr=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add defaults for this or just have it be static per-sub-class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we never actually get this class in the real world, this could be made abstract and then specify in each subclass
presets: undefined.UndefinedOr[ | ||
typing.Sequence[typing.Union[int, auto_mod.AutoModKeywordPresetType]] | ||
] = undefined.UNDEFINED, | ||
enabled: undefined.UndefinedOr[bool] = True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better UX to take subclasses of PartialAutoModTrigger
here instead of their config fields but that'd add complexity impl wise and idk if you want to keep these functions as flat as possible or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this didn't really get any comment i'ma just switch to that approach
24c7e0c
to
9d6ece6
Compare
9d6ece6
to
871f593
Compare
AUTO_MODERATION_RULE_CREATE = 140 | ||
AUTO_MODERATION_RULE_UPDATE = 141 | ||
AUTO_MODERATION_RULE_DELETE = 142 | ||
AUTO_MODERATION_BLOCK_MESSAGE = 143 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AUTO_MODERATION_FLAG_TO_CHANNEL = 144 | |
AUTO_MODERATION_USER_COMMUNICATION_DISABLED = 145 |
Apart from a rebase and failing tests, what still needs to be done on this pr? |
Summary
Checklist
nox
and all the pipelines have passed.Related issues
Closes #1189