Class: Discorb::Gateway::AutoModerationActionExecutionEvent

Inherits:
GatewayEvent
  • Object
show all
Defined in:
lib/discorb/gateway_events.rb

Overview

Represents a AUTO_MODERATION_ACTION_EXECUTION event.

Instance Attribute Summary collapse

Method Summary

Methods inherited from GatewayEvent

#inspect

Instance Attribute Details

#action -> Discorb::AutoModRule::Action (readonly)

Returns The action that was executed.

Returns:



592
593
594
# File 'lib/discorb/gateway_events.rb', line 592

def action
  @action
end

#alert_system_message_id -> Discorb::Snowflake? (readonly)

Returns:

  • (Discorb::Snowflake)

    The id of the system message that was sent.

  • (nil)

    If the system message channel was not set.



578
579
580
# File 'lib/discorb/gateway_events.rb', line 578

def alert_system_message_id
  @alert_system_message_id
end

#channel -> Object (readonly)



625
626
627
# File 'lib/discorb/gateway_events.rb', line 625

def channel
  @client.channels[@channel_id]
end

#content -> String (readonly)

Returns The content of the message that was sent.

Returns:

  • (String)

    The content of the message that was sent.



581
582
583
# File 'lib/discorb/gateway_events.rb', line 581

def content
  @content
end

#guild -> Object (readonly)



619
620
621
# File 'lib/discorb/gateway_events.rb', line 619

def guild
  @client.guilds[@guild_id]
end

#matched_content -> String? (readonly)

Returns:

  • (String)

    The content that triggered the action.

  • (nil)

    If the action was not triggered by a keyword.



589
590
591
# File 'lib/discorb/gateway_events.rb', line 589

def matched_content
  @matched_content
end

#matched_keyword -> String? (readonly)

Returns:

  • (String)

    The keyword that triggered the action.

  • (nil)

    If the action was not triggered by a keyword.



585
586
587
# File 'lib/discorb/gateway_events.rb', line 585

def matched_keyword
  @matched_keyword
end

#member -> Object (readonly) Also known as: user



631
632
633
# File 'lib/discorb/gateway_events.rb', line 631

def member
  guild.members[@user_id]
end

#message_id -> Discorb::Snowflake? (readonly)

Returns:

  • (Discorb::Snowflake)

    The id of the message that triggered the action.

  • (nil)

    If the message was deleted.



574
575
576
# File 'lib/discorb/gateway_events.rb', line 574

def message_id
  @message_id
end

#rule_id -> Discorb::Snowflake (readonly)

Returns The id of the rule.

Returns:



567
568
569
# File 'lib/discorb/gateway_events.rb', line 567

def rule_id
  @rule_id
end

#rule_trigger_type -> Symbol (readonly)

Returns The type of action that was executed.

Returns:

  • (Symbol)

    The type of action that was executed.



570
571
572
# File 'lib/discorb/gateway_events.rb', line 570

def rule_trigger_type
  @rule_trigger_type
end