@@ -121,7 +121,6 @@ class HarmfulLinkFilter(BaseTrigger):
121
121
repr = True ,
122
122
metadata = docs ("The type of trigger" ),
123
123
)
124
- ...
125
124
126
125
127
126
@attrs .define (eq = False , order = False , hash = False , kw_only = True )
@@ -151,12 +150,24 @@ class MentionSpamTrigger(BaseTrigger):
151
150
)
152
151
153
152
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
+
154
166
@attrs .define (eq = False , order = False , hash = False , kw_only = True )
155
167
class BlockMessage (BaseAction ):
156
168
"""blocks the content of a message according to the rule"""
157
169
158
170
type : AutoModAction = attrs .field (repr = False , default = AutoModAction .BLOCK_MESSAGE , converter = AutoModAction )
159
- ...
160
171
161
172
162
173
@attrs .define (eq = False , order = False , hash = False , kw_only = True )
@@ -175,6 +186,13 @@ class TimeoutUser(BaseAction):
175
186
type : AutoModAction = attrs .field (repr = False , default = AutoModAction .TIMEOUT_USER , converter = AutoModAction )
176
187
177
188
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
+
178
196
@attrs .define (eq = False , order = False , hash = False , kw_only = True )
179
197
class AutoModRule (DiscordObject ):
180
198
"""A representation of an auto mod rule"""
@@ -345,11 +363,13 @@ def member(self) -> "Optional[Member]":
345
363
AutoModAction .BLOCK_MESSAGE : BlockMessage ,
346
364
AutoModAction .ALERT_MESSAGE : AlertMessage ,
347
365
AutoModAction .TIMEOUT_USER : TimeoutUser ,
366
+ AutoModAction .BLOCK_MEMBER_INTERACTION : BlockMemberInteraction ,
348
367
}
349
368
350
369
TRIGGER_MAPPING = {
351
370
AutoModTriggerType .KEYWORD : KeywordTrigger ,
352
371
AutoModTriggerType .HARMFUL_LINK : HarmfulLinkFilter ,
353
372
AutoModTriggerType .KEYWORD_PRESET : KeywordPresetTrigger ,
354
373
AutoModTriggerType .MENTION_SPAM : MentionSpamTrigger ,
374
+ AutoModTriggerType .MEMBER_PROFILE : MemberProfileTrigger ,
355
375
}
0 commit comments