Skip to content

Commit

Permalink
fix: creating automod rules & automod docs (#1822)
Browse files Browse the repository at this point in the history
* fix: use to_dict on action metadata

* fix: exempt_roles and exempt_channels typehints
  • Loading branch information
plun1331 authored Dec 6, 2022
1 parent 622b0ff commit c2c4559
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit c2c4559

Please sign in to comment.