Skip to content

hikari.events.auto_mod_events#

Events that fire for auto-moderation related changes.

AutoModActionExecutionEvent #

Bases: AutoModEvent

Event that's fired when an auto-mod action is executed.

action class-attribute instance-attribute #

action: PartialAutoModAction = field(repr=False)

Object of the action which was executed.

alert_system_message_id class-attribute instance-attribute #

alert_system_message_id: Snowflake | None = field(
    repr=False
)

ID of any system auto-moderation messages posted as a result of this action.

This will only be provided for SEND_ALERT_MESSAGE actions.

app class-attribute instance-attribute #

app: RESTAware = field(metadata={SKIP_DEEP_COPY: True})

App instance for this application.

channel_id class-attribute instance-attribute #

channel_id: Snowflake | None = field(repr=False)

ID of the channel the matching context was sent to.

This will be None if the message was blocked by auto-moderation of the matched content wasn't in a channel.

content class-attribute instance-attribute #

content: str | None = field(repr=False)

The user generated content which matched this rule.

This will only be provided if the MESSAGE_CONTENT intent has been declared.

guild_id class-attribute instance-attribute #

guild_id: Snowflake = field(repr=True)

ID of the guild this action was executed in.

matched_content class-attribute instance-attribute #

matched_content: str | None = field(repr=False)

The substring in content which triggered the rule.

This will only be provided if the MESSAGE_CONTENT intent has been declared and this is a keyword or keyword preset trigger.

matched_keyword class-attribute instance-attribute #

matched_keyword: str | None = field(repr=False)

The word or phrase configured in the rule which was triggered, if it's a keyword trigger.

message_id class-attribute instance-attribute #

message_id: Snowflake | None = field(repr=False)

ID of the message the matching context was sent in.

This will be None if the message was blocked by auto-moderation or the matched content wasn't in a message.

rule_id class-attribute instance-attribute #

rule_id: Snowflake = field()

ID of the rule which was triggered.

rule_trigger_type class-attribute instance-attribute #

rule_trigger_type: int | AutoModTriggerType | None = field(
    repr=False
)

Type of the rule which was triggered.

shard class-attribute instance-attribute #

shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})

Shard that received this event.

user_id class-attribute instance-attribute #

user_id: Snowflake = field(repr=False)

ID of the user who generated the context which triggered this.

AutoModEvent #

Bases: ShardEvent, ABC

Base class for auto-moderation gateway events.

AutoModRuleCreateEvent #

Bases: AutoModEvent

Event that's fired when an auto-moderation rule is created.

app property #

app: RESTAware

App instance for this application.

rule class-attribute instance-attribute #

rule: AutoModRule = field()

Object of the auto-moderation rule which was created.

shard class-attribute instance-attribute #

shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})

Shard that received this event.

AutoModRuleDeleteEvent #

Bases: AutoModEvent

Event that's fired when an auto-moderation rule is deleted.

app property #

app: RESTAware

App instance for this application.

rule class-attribute instance-attribute #

rule: AutoModRule = field()

Object of the auto-moderation rule which was deleted.

shard class-attribute instance-attribute #

shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})

Shard that received this event.

AutoModRuleUpdateEvent #

Bases: AutoModEvent

Event that's fired when an auto-moderation rule is updated.

app property #

app: RESTAware

App instance for this application.

rule class-attribute instance-attribute #

rule: AutoModRule = field()

Object of the auto-moderation rule which was updated.

shard class-attribute instance-attribute #

shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})

Shard that received this event.