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

fix: creating automod rules & automod docs #1822

Merged
merged 3 commits into from
Dec 6, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions discord/automod.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def __init__(self, action_type: AutoModActionType, metadata: AutoModActionMetada
def to_dict(self) -> dict:
return {
"type": self.type.value,
"metadata": self.metadata,
"metadata": self.metadata.to_dict(),
}

@classmethod
Expand Down Expand Up @@ -424,9 +424,9 @@ async def edit(
The new actions to perform when the rule is triggered.
enabled: :class:`bool`
Whether this rule is enabled.
exempt_roles: List[:class:`Snowflake`]
exempt_roles: List[:class:`abc.Snowflake`]
The roles that will be exempt from this rule.
exempt_channels: List[:class:`Snowflake`]
exempt_channels: List[:class:`abc.Snowflake`]
The channels that will be exempt from this rule.
reason: Optional[:class:`str`]
The reason for editing this rule. Shows up in the audit log.
Expand Down