mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-13 17:29:50 +00:00
parent
b68568f375
commit
9d9d96fce1
@ -419,7 +419,7 @@ class AutoModAction:
|
|||||||
The matched keyword from the triggering message.
|
The matched keyword from the triggering message.
|
||||||
matched_content: Optional[:class:`str`]
|
matched_content: Optional[:class:`str`]
|
||||||
The matched content from the triggering message.
|
The matched content from the triggering message.
|
||||||
Requires the :attr:`Intents.message_content` or it will always return an empty string.
|
Requires the :attr:`Intents.message_content` or it will always return ``None``.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = (
|
__slots__ = (
|
||||||
@ -447,9 +447,9 @@ class AutoModAction:
|
|||||||
self.channel_id: Optional[int] = utils._get_as_snowflake(data, 'channel_id')
|
self.channel_id: Optional[int] = utils._get_as_snowflake(data, 'channel_id')
|
||||||
self.user_id: int = int(data['user_id'])
|
self.user_id: int = int(data['user_id'])
|
||||||
self.alert_system_message_id: Optional[int] = utils._get_as_snowflake(data, 'alert_system_message_id')
|
self.alert_system_message_id: Optional[int] = utils._get_as_snowflake(data, 'alert_system_message_id')
|
||||||
self.content: str = data['content']
|
self.content: str = data.get('content', '')
|
||||||
self.matched_keyword: Optional[str] = data['matched_keyword']
|
self.matched_keyword: Optional[str] = data['matched_keyword']
|
||||||
self.matched_content: Optional[str] = data['matched_content']
|
self.matched_content: Optional[str] = data.get('matched_content')
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return f'<AutoModRuleExecution rule_id={self.rule_id} action={self.action!r}>'
|
return f'<AutoModRuleExecution rule_id={self.rule_id} action={self.action!r}>'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user