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 preset whitelist to automod #5116

Merged
merged 3 commits into from
Jul 9, 2022
Merged

Add preset whitelist to automod #5116

merged 3 commits into from
Jul 9, 2022

Conversation

Jupith
Copy link
Contributor

@Jupith Jupith commented Jun 25, 2022

Adds the allow_list metadata which exempts strings from the preset trigger type.

SQKo added a commit to SQKo/DiscordPHP that referenced this pull request Jun 30, 2022
SQKo added a commit to discord-php/DiscordPHP that referenced this pull request Jul 2, 2022
* auto mod constants, no object and event handler yet

* Add Parts, update dependency

* modify auditlog definition for AutoMod rule

* auto moderation rules event

* add Auto Moderation Action Execution

* fix wrong auditlog class

* modify rule attributes handling

* add and build docs for automod

* wrong use of nullable property

* add trigger_metadata allow_list phpdoc discord/discord-api-docs#5116

* fix typo discord/discord-api-docs#5114
@lukellmann lukellmann mentioned this pull request Jul 7, 2022
4 tasks
Copy link
Member

@hellsan631 hellsan631 left a comment

Choose a reason for hiding this comment

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

One note here, currently allow lists don't allow wildcard symbols. they may in the future, but this difference should probably be highlighted. LGTM otherwise

@Jupith
Copy link
Contributor Author

Jupith commented Jul 9, 2022

Added note about wildcards in allow lists and reverted the wording change 👍

@typpo typpo merged commit 181bfa0 into discord:main Jul 9, 2022
ooliver1 added a commit to nextcord/nextcord that referenced this pull request Jul 28, 2022
ooliver1 added a commit to nextcord/nextcord that referenced this pull request Jul 28, 2022
* feat: add AutoModerationEventType

* feat: add AutoModerationTriggerType

* feat: add KeywordPresetType

* feat(types): add automod enums raw types

* feat: add AutoModerationTriggerMetadata

* docs(automod): add versionadded to triggermetadata

* refactor(automod): rename import alias for payload

* fix(enums): add new entries to __all__

* feat: add AutoModerationActionType

* feat(types): add AutoModerationActionType

* feat: add AutoModerationActionMetadata

* refactor(automod): redo *metadata to be usable

* feat: add AutoModerationAction

* feat: add AutoModerationRule

* fix: add relevant classes to __all__

* feat(http): add auto moderation api routes

* feat(guild): add .auto_moderation_rules

* refactor(automod): use dict.get when possible

* feat(enums): add MessageType.auto_moderation_action

* docs: include the guild feature AUTO_MODERATION

* refactor(flags): modify Intents.all for skipped

* feat(flags): add intents for auto moderation

* feat(guild): add Guild.fetch_auto_moderation_rule

* feat:(automod) add AutoModerationRule.delete

* feat(automod): add AutoModerationRule.edit

* docs(automod): document AutoModerationRule.edit

* refactor(automod): allow construction of action

* feat(guild): add Guild.create_auto_moderation_rule

* feat: add on_auto_moderation_rule_create

* feat: add on_auto_moderation_rule_update

* feat: add on_auto_moderation_rule_delete

* docs: fix warnings

* feat(automod): add AutoModerationActionExecution

* feat: add on_auto_moderation_action_execution

* fix(state): import AutoModerationActionExecution

* feat(audit-log): support auto moderation

* fix(automod): allow metadata to be ommitted

* refactor(automod): use a snowflake for metadata

* fix(automod): use correct type for metadata kwarg

* docs: fix typos

* apply suggestions from code review

* docs(guild): document actions in create automod rule

* docs(api): reword who's to whose

Co-authored-by: Jonah Lawrence <jonah@freshidea.com>

* feat(automod): add allow_list metadata

discord/discord-api-docs#5116

* fix(automod): content not provided without intents

* docs(api): replace accidental :members: removal

Co-authored-by: Jonah Lawrence <jonah@freshidea.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants