Search + K

Command Palette

Search for a command to run...

Sign In

get_auto_moderation_rule

GET /guilds/{guild_id}/auto-moderation/rules/{rule_id}
Copy endpoint
https://discord.com/api/v10

Parameters

path Path Parameters

Name Type
guild_id required
type SnowflakeType = string
rule_id required
type SnowflakeType = string

Responses

200 application/json

200 response for get_auto_moderation_rule

interface DefaultKeywordRuleResponse {
id: SnowflakeType
type SnowflakeType = string
;
guild_id: SnowflakeType
type SnowflakeType = string
;
creator_id: SnowflakeType
type SnowflakeType = string
;
name: string;
event_type: AutomodEventType
type AutomodEventType = 1 | 2
;
actions: (BlockMessageActionResponse
interface BlockMessageActionResponse {
type: 1 & AutomodActionType;
metadata: BlockMessageActionMetadataResponse;
}
| FlagToChannelActionResponse
interface FlagToChannelActionResponse {
type: 2 & AutomodActionType;
metadata: FlagToChannelActionMetadataResponse;
}
| QuarantineUserActionResponse
interface QuarantineUserActionResponse {
type: 4 & AutomodActionType;
metadata: QuarantineUserActionMetadataResponse;
}
| UserCommunicationDisabledActionResponse
interface UserCommunicationDisabledActionResponse {
type: 3 & AutomodActionType;
metadata: UserCommunicationDisabledActionMetadataResponse;
}
)[]
;
trigger_type: 4 & AutomodTriggerType
type AutomodTriggerType = 1 | 2 | 3 | 4 | 5
;
enabled: boolean;
exempt_roles: SnowflakeType
type SnowflakeType = string
[]
;
exempt_channels: SnowflakeType
type SnowflakeType = string
[]
;
trigger_metadata: DefaultKeywordListTriggerMetadataResponse
interface DefaultKeywordListTriggerMetadataResponse {
allow_list: string[];
presets: AutomodKeywordPresetType[];
}
;
}
| interface KeywordRuleResponse {
id: SnowflakeType
type SnowflakeType = string
;
guild_id: SnowflakeType
type SnowflakeType = string
;
creator_id: SnowflakeType
type SnowflakeType = string
;
name: string;
event_type: AutomodEventType
type AutomodEventType = 1 | 2
;
actions: (BlockMessageActionResponse
interface BlockMessageActionResponse {
type: 1 & AutomodActionType;
metadata: BlockMessageActionMetadataResponse;
}
| FlagToChannelActionResponse
interface FlagToChannelActionResponse {
type: 2 & AutomodActionType;
metadata: FlagToChannelActionMetadataResponse;
}
| QuarantineUserActionResponse
interface QuarantineUserActionResponse {
type: 4 & AutomodActionType;
metadata: QuarantineUserActionMetadataResponse;
}
| UserCommunicationDisabledActionResponse
interface UserCommunicationDisabledActionResponse {
type: 3 & AutomodActionType;
metadata: UserCommunicationDisabledActionMetadataResponse;
}
)[]
;
trigger_type: 1 & AutomodTriggerType
type AutomodTriggerType = 1 | 2 | 3 | 4 | 5
;
enabled: boolean;
exempt_roles: SnowflakeType
type SnowflakeType = string
[]
;
exempt_channels: SnowflakeType
type SnowflakeType = string
[]
;
trigger_metadata: KeywordTriggerMetadataResponse
interface KeywordTriggerMetadataResponse {
keyword_filter: string[];
regex_patterns: string[];
allow_list: string[];
}
;
}
| interface MLSpamRuleResponse {
id: SnowflakeType
type SnowflakeType = string
;
guild_id: SnowflakeType
type SnowflakeType = string
;
creator_id: SnowflakeType
type SnowflakeType = string
;
name: string;
event_type: AutomodEventType
type AutomodEventType = 1 | 2
;
actions: (BlockMessageActionResponse
interface BlockMessageActionResponse {
type: 1 & AutomodActionType;
metadata: BlockMessageActionMetadataResponse;
}
| FlagToChannelActionResponse
interface FlagToChannelActionResponse {
type: 2 & AutomodActionType;
metadata: FlagToChannelActionMetadataResponse;
}
| QuarantineUserActionResponse
interface QuarantineUserActionResponse {
type: 4 & AutomodActionType;
metadata: QuarantineUserActionMetadataResponse;
}
| UserCommunicationDisabledActionResponse
interface UserCommunicationDisabledActionResponse {
type: 3 & AutomodActionType;
metadata: UserCommunicationDisabledActionMetadataResponse;
}
)[]
;
trigger_type: 3 & AutomodTriggerType
type AutomodTriggerType = 1 | 2 | 3 | 4 | 5
;
enabled: boolean;
exempt_roles: SnowflakeType
type SnowflakeType = string
[]
;
exempt_channels: SnowflakeType
type SnowflakeType = string
[]
;
trigger_metadata: MLSpamTriggerMetadataResponse
interface MLSpamTriggerMetadataResponse {}
;
}
| interface MentionSpamRuleResponse {
id: SnowflakeType
type SnowflakeType = string
;
guild_id: SnowflakeType
type SnowflakeType = string
;
creator_id: SnowflakeType
type SnowflakeType = string
;
name: string;
event_type: AutomodEventType
type AutomodEventType = 1 | 2
;
actions: (BlockMessageActionResponse
interface BlockMessageActionResponse {
type: 1 & AutomodActionType;
metadata: BlockMessageActionMetadataResponse;
}
| FlagToChannelActionResponse
interface FlagToChannelActionResponse {
type: 2 & AutomodActionType;
metadata: FlagToChannelActionMetadataResponse;
}
| QuarantineUserActionResponse
interface QuarantineUserActionResponse {
type: 4 & AutomodActionType;
metadata: QuarantineUserActionMetadataResponse;
}
| UserCommunicationDisabledActionResponse
interface UserCommunicationDisabledActionResponse {
type: 3 & AutomodActionType;
metadata: UserCommunicationDisabledActionMetadataResponse;
}
)[]
;
trigger_type: 5 & AutomodTriggerType
type AutomodTriggerType = 1 | 2 | 3 | 4 | 5
;
enabled: boolean;
exempt_roles: SnowflakeType
type SnowflakeType = string
[]
;
exempt_channels: SnowflakeType
type SnowflakeType = string
[]
;
trigger_metadata: MentionSpamTriggerMetadataResponse
interface MentionSpamTriggerMetadataResponse {
mention_total_limit: number;
mention_raid_protection_enabled: boolean;
}
;
}
| interface SpamLinkRuleResponse {
id: SnowflakeType
type SnowflakeType = string
;
guild_id: SnowflakeType
type SnowflakeType = string
;
creator_id: SnowflakeType
type SnowflakeType = string
;
name: string;
event_type: AutomodEventType
type AutomodEventType = 1 | 2
;
actions: (BlockMessageActionResponse
interface BlockMessageActionResponse {
type: 1 & AutomodActionType;
metadata: BlockMessageActionMetadataResponse;
}
| FlagToChannelActionResponse
interface FlagToChannelActionResponse {
type: 2 & AutomodActionType;
metadata: FlagToChannelActionMetadataResponse;
}
| QuarantineUserActionResponse
interface QuarantineUserActionResponse {
type: 4 & AutomodActionType;
metadata: QuarantineUserActionMetadataResponse;
}
| UserCommunicationDisabledActionResponse
interface UserCommunicationDisabledActionResponse {
type: 3 & AutomodActionType;
metadata: UserCommunicationDisabledActionMetadataResponse;
}
)[]
;
trigger_type: 2 & AutomodTriggerType
type AutomodTriggerType = 1 | 2 | 3 | 4 | 5
;
enabled: boolean;
exempt_roles: SnowflakeType
type SnowflakeType = string
[]
;
exempt_channels: SnowflakeType
type SnowflakeType = string
[]
;
trigger_metadata: SpamLinkTriggerMetadataResponse
interface SpamLinkTriggerMetadataResponse {}
;
}

Client Errors

429 application/json

Client ratelimited response

type RatelimitedResponse = never
4XX application/json

Client error response

type ErrorResponse = never