@@ -121,7 +121,6 @@ class HarmfulLinkFilter(BaseTrigger):
121121 repr = True ,
122122 metadata = docs ("The type of trigger" ),
123123 )
124- ...
125124
126125
127126@attrs .define (eq = False , order = False , hash = False , kw_only = True )
@@ -151,12 +150,24 @@ class MentionSpamTrigger(BaseTrigger):
151150 )
152151
153152
153+ @attrs .define (eq = False , order = False , hash = False , kw_only = True )
154+ class MemberProfileTrigger (BaseTrigger ):
155+ regex_patterns : list [str ] = attrs .field (
156+ factory = list , repr = True , metadata = docs ("The regex patterns to check against" )
157+ )
158+ keyword_filter : str | list [str ] = attrs .field (
159+ factory = list , repr = True , metadata = docs ("The keywords to check against" )
160+ )
161+ allow_list : list ["Snowflake_Type" ] = attrs .field (
162+ factory = list , repr = True , metadata = docs ("The roles exempt from this rule" )
163+ )
164+
165+
154166@attrs .define (eq = False , order = False , hash = False , kw_only = True )
155167class BlockMessage (BaseAction ):
156168 """blocks the content of a message according to the rule"""
157169
158170 type : AutoModAction = attrs .field (repr = False , default = AutoModAction .BLOCK_MESSAGE , converter = AutoModAction )
159- ...
160171
161172
162173@attrs .define (eq = False , order = False , hash = False , kw_only = True )
@@ -175,6 +186,13 @@ class TimeoutUser(BaseAction):
175186 type : AutoModAction = attrs .field (repr = False , default = AutoModAction .TIMEOUT_USER , converter = AutoModAction )
176187
177188
189+ @attrs .define (eq = False , order = False , hash = False , kw_only = False )
190+ class BlockMemberInteraction (BaseAction ):
191+ """Block a member from using text, voice, or other interactions"""
192+
193+ # this action has no metadata
194+
195+
178196@attrs .define (eq = False , order = False , hash = False , kw_only = True )
179197class AutoModRule (DiscordObject ):
180198 """A representation of an auto mod rule"""
@@ -345,11 +363,13 @@ def member(self) -> "Optional[Member]":
345363 AutoModAction .BLOCK_MESSAGE : BlockMessage ,
346364 AutoModAction .ALERT_MESSAGE : AlertMessage ,
347365 AutoModAction .TIMEOUT_USER : TimeoutUser ,
366+ AutoModAction .BLOCK_MEMBER_INTERACTION : BlockMemberInteraction ,
348367}
349368
350369TRIGGER_MAPPING = {
351370 AutoModTriggerType .KEYWORD : KeywordTrigger ,
352371 AutoModTriggerType .HARMFUL_LINK : HarmfulLinkFilter ,
353372 AutoModTriggerType .KEYWORD_PRESET : KeywordPresetTrigger ,
354373 AutoModTriggerType .MENTION_SPAM : MentionSpamTrigger ,
374+ AutoModTriggerType .MEMBER_PROFILE : MemberProfileTrigger ,
355375}
0 commit comments