Skip to content

Commit

Permalink
Auto Moderation Member Profile Rule
Browse files Browse the repository at this point in the history
  • Loading branch information
valzargaming committed Sep 26, 2024
1 parent b6bbe5e commit 5dd24c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Discord/Parts/Guild/AutoModeration/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Action extends Part
public const TYPE_BLOCK_MESSAGE = 1;
public const TYPE_SEND_ALERT_MESSAGE = 2;
public const TYPE_TIMEOUT = 3;
public const TYPE_BLOCK_MEMBER_INTERACTION = 4;

/**
* Get the Metadata Attributes.
Expand Down
3 changes: 2 additions & 1 deletion src/Discord/Parts/Guild/AutoModeration/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class Rule extends Part
public const TRIGGER_TYPE_SPAM = 3;
public const TRIGGER_TYPE_KEYWORD_PRESET = 4;
public const TRIGGER_TYPE_MENTION_SPAM = 5;
public const TRIGGER_TYPE_PROFILE = 6;

public const KEYWORD_PRESET_TYPE_PROFANITY = 1;
public const KEYWORD_PRESET_TYPE_SEXUAL_CONTENT = 2;
Expand Down Expand Up @@ -180,7 +181,7 @@ public function getCreatableAttributes(): array
'exempt_channels',
]);

if (in_array($this->trigger_type, [self::TRIGGER_TYPE_KEYWORD, self::TRIGGER_TYPE_KEYWORD_PRESET, self::TRIGGER_TYPE_MENTION_SPAM])) {
if (in_array($this->trigger_type, [self::TRIGGER_TYPE_KEYWORD, self::TRIGGER_TYPE_KEYWORD_PRESET, self::TRIGGER_TYPE_MENTION_SPAM, self::TRIGGER_TYPE_PROFILE])) {
$attr['trigger_metadata'] = $this->trigger_metadata;
}

Expand Down

0 comments on commit 5dd24c7

Please sign in to comment.