get_auto_moderation_rule
GET
/guilds/{guild_id}/auto-moderation/rules/{rule_id} 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 ;
guild_id:SnowflakeType ;
creator_id:SnowflakeType ;
name: string;
event_type:AutomodEventType ;
actions: (BlockMessageActionResponse | FlagToChannelActionResponse | QuarantineUserActionResponse | UserCommunicationDisabledActionResponse )[];
trigger_type: 4 &AutomodTriggerType ;
enabled: boolean;
exempt_roles:SnowflakeType [];
exempt_channels:SnowflakeType [];
trigger_metadata:DefaultKeywordListTriggerMetadataResponse ;
} | interface KeywordRuleResponse {
id:SnowflakeType ;
guild_id:SnowflakeType ;
creator_id:SnowflakeType ;
name: string;
event_type:AutomodEventType ;
actions: (BlockMessageActionResponse | FlagToChannelActionResponse | QuarantineUserActionResponse | UserCommunicationDisabledActionResponse )[];
trigger_type: 1 &AutomodTriggerType ;
enabled: boolean;
exempt_roles:SnowflakeType [];
exempt_channels:SnowflakeType [];
trigger_metadata:KeywordTriggerMetadataResponse ;
} | interface MLSpamRuleResponse {
id:SnowflakeType ;
guild_id:SnowflakeType ;
creator_id:SnowflakeType ;
name: string;
event_type:AutomodEventType ;
actions: (BlockMessageActionResponse | FlagToChannelActionResponse | QuarantineUserActionResponse | UserCommunicationDisabledActionResponse )[];
trigger_type: 3 &AutomodTriggerType ;
enabled: boolean;
exempt_roles:SnowflakeType [];
exempt_channels:SnowflakeType [];
trigger_metadata:MLSpamTriggerMetadataResponse ;
} | interface MentionSpamRuleResponse {
id:SnowflakeType ;
guild_id:SnowflakeType ;
creator_id:SnowflakeType ;
name: string;
event_type:AutomodEventType ;
actions: (BlockMessageActionResponse | FlagToChannelActionResponse | QuarantineUserActionResponse | UserCommunicationDisabledActionResponse )[];
trigger_type: 5 &AutomodTriggerType ;
enabled: boolean;
exempt_roles:SnowflakeType [];
exempt_channels:SnowflakeType [];
trigger_metadata:MentionSpamTriggerMetadataResponse ;
} | interface SpamLinkRuleResponse {
id:SnowflakeType ;
guild_id:SnowflakeType ;
creator_id:SnowflakeType ;
name: string;
event_type:AutomodEventType ;
actions: (BlockMessageActionResponse | FlagToChannelActionResponse | QuarantineUserActionResponse | UserCommunicationDisabledActionResponse )[];
trigger_type: 2 &AutomodTriggerType ;
enabled: boolean;
exempt_roles:SnowflakeType [];
exempt_channels:SnowflakeType [];
trigger_metadata:SpamLinkTriggerMetadataResponse ;
}
id:
guild_id:
creator_id:
name: string;
event_type:
actions: (
trigger_type: 4 &
enabled: boolean;
exempt_roles:
exempt_channels:
trigger_metadata:
} | interface KeywordRuleResponse {
id:
guild_id:
creator_id:
name: string;
event_type:
actions: (
trigger_type: 1 &
enabled: boolean;
exempt_roles:
exempt_channels:
trigger_metadata:
} | interface MLSpamRuleResponse {
id:
guild_id:
creator_id:
name: string;
event_type:
actions: (
trigger_type: 3 &
enabled: boolean;
exempt_roles:
exempt_channels:
trigger_metadata:
} | interface MentionSpamRuleResponse {
id:
guild_id:
creator_id:
name: string;
event_type:
actions: (
trigger_type: 5 &
enabled: boolean;
exempt_roles:
exempt_channels:
trigger_metadata:
} | interface SpamLinkRuleResponse {
id:
guild_id:
creator_id:
name: string;
event_type:
actions: (
trigger_type: 2 &
enabled: boolean;
exempt_roles:
exempt_channels:
trigger_metadata:
}
Client Errors
429 application/json
Client ratelimited response
type RatelimitedResponse = never
4XX application/json
Client error response
type ErrorResponse = never