@@ -673,6 +673,74 @@ def application_command_permissions_update(attributes = {}, &block)
673673 register_event ( ApplicationCommandPermissionsUpdateEvent , attributes , block )
674674 end
675675
676+ # This **event** is raised whenever an automod rule is deleted.
677+ # @param attributes [Hash] The event's attributes.
678+ # @option attributes [String, Integer, Server] :server A server to match against.
679+ # @option attributes [String, Regexp] :name A name to match against.
680+ # @option attributes [String, Integer, AutoModRule] :automod_rule An automod rule to match against.
681+ # @option attributes [String, Integer, User, Member] :creator A creator to match against.
682+ # @option attributes [Symbol, Integer] :event_type An event type to match against.
683+ # @option attributes [Symbol, Integer] :trigger_type A trigger type to match against.
684+ # @yield The block is executed when the event is raised.
685+ # @yieldparam event [AutoModRuleDeleteEvent] The event that was raised.
686+ # @return [AutoModRuleDeleteEventHandler] The event handler that was registered.
687+ # @note This event requires the `:server_automod` intent in order to be received.
688+ def automod_rule_create ( attributes = { } , &block )
689+ register_event ( AutoModRuleCreateEvent , attributes , block )
690+ end
691+
692+ # This **event** is raised whenever an automod rule is deleted.
693+ # @param attributes [Hash] The event's attributes.
694+ # @option attributes [String, Integer, Server] :server A server to match against.
695+ # @option attributes [String, Regexp] :name A name to match against.
696+ # @option attributes [String, Integer, AutoModRule] :automod_rule An automod rule to match against.
697+ # @option attributes [String, Integer, User, Member] :creator A creator to match against.
698+ # @option attributes [Symbol, Integer] :event_type An event type to match against.
699+ # @option attributes [Symbol, Integer] :trigger_type A trigger type to match against.
700+ # @yield The block is executed when the event is raised.
701+ # @yieldparam event [AutoModRuleDeleteEvent] The event that was raised.
702+ # @return [AutoModRuleDeleteEventHandler] The event handler that was registered.
703+ # @note This event requires the `:server_automod` intent in order to be received.
704+ def automod_rule_update ( attributes = { } , &block )
705+ register_event ( AutoModRuleUpdateEvent , attributes , block )
706+ end
707+
708+ # This **event** is raised whenever an automod rule is deleted.
709+ # @param attributes [Hash] The event's attributes.
710+ # @option attributes [String, Integer, Server] :server A server to match against.
711+ # @option attributes [String, Regexp] :name A name to match against.
712+ # @option attributes [String, Integer, AutoModRule] :automod_rule An automod rule to match against.
713+ # @option attributes [String, Integer, User, Member] :creator A creator to match against.
714+ # @option attributes [Symbol, Integer] :event_type An event type to match against.
715+ # @option attributes [Symbol, Integer] :trigger_type A trigger type to match against.
716+ # @yield The block is executed when the event is raised.
717+ # @yieldparam event [AutoModRuleDeleteEvent] The event that was raised.
718+ # @return [AutoModRuleDeleteEventHandler] The event handler that was registered.
719+ # @note This event requires the `:server_automod` intent in order to be received.
720+ def automod_rule_delete ( attributes = { } , &block )
721+ register_event ( AutoModRuleDeleteEvent , attributes , block )
722+ end
723+
724+ # This **event** is raised whenever an automod rule is triggered and takes an action, e.g. blocking a message.
725+ # @param attributes [Hash] The event's attributes.
726+ # @option attributes [String, Integer, Member] :user The user which generated the content that triggered the rule to match against.
727+ # @option attributes [String, Integer, Server] :server A server to match against.
728+ # @option attributes [String, Integer, Channel] :channel The channel in which user content was posted to match against.
729+ # @option attributes [String, Integer, AutoModRule] :automod_rule An automod rule to match against.
730+ # @option attributes [String, Regexp] :content The user generated content which triggered the rule to match against.
731+ # @option attributes [Symbol, Integer] :trigger_type A trigger type to match against.
732+ # @option attributes [String, Regexp] :matched_content The substring in content that triggered the rule to match against.
733+ # @option attributes [String, Regexp] :matched_keyword The keyword or phrase that triggered the rule to match against.
734+ # @option attributes [Symbol, Integer] :event_type An event type to match against.
735+ # @option attributes [Symbol, Integer] :action_type An action type to match against.
736+ # @yield The block is executed when the event is raised.
737+ # @yieldparam event [AutoModActionEvent] The event that was raised.
738+ # @return [AutoModActionEventHandler] The event handler that was registered.
739+ # @note This event requires the `:server_automod_execution` intent in order to be received.
740+ def automod_rule_action ( attributes = { } , &block )
741+ register_event ( AutoModActionEvent , attributes , block )
742+ end
743+
676744 # This **event** is raised for every dispatch received over the gateway, whether supported by discordrb or not.
677745 # @param attributes [Hash] The event's attributes.
678746 # @option attributes [String, Symbol, Regexp] :type Matches the event type of the dispatch.
0 commit comments