Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions changelog/986.deprecate.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:attr:`AutoModTriggerType.harmful_link` is obsolete, it is now enabled Discord-wide.
3 changes: 2 additions & 1 deletion disnake/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,8 @@ class AutoModEventType(Enum):

class AutoModTriggerType(Enum):
keyword = 1
harmful_link = 2
if not TYPE_CHECKING:
harmful_link = 2 # obsolete/deprecated
spam = 3
keyword_preset = 4
mention_spam = 5
Expand Down
7 changes: 3 additions & 4 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3836,16 +3836,15 @@ of :class:`enum.Enum`.

.. versionadded:: 2.6

.. versionchanged:: 2.9
Removed obsolete ``harmful_link`` type.

.. attribute:: keyword

The rule will filter messages based on a custom keyword list.

This trigger type requires additional :class:`metadata <AutoModTriggerMetadata>`.

.. attribute:: harmful_link

The rule will filter messages containing malicious links.

.. attribute:: spam

The rule will filter messages suspected of being spam.
Expand Down