Action Groups
Last updated
Last updated
When your conditions and condition groups have met their rules to provide a true value and execution can continue, we move on to the "Action Groups" and the actions that will then run.
The most simple outcome is that a single action will execute, such as being able to send a message and some configuration for how this message will be handled i.e. deleted after a delay or pinned when it is sent.
Modr8 supports an array of actions that can be executed, from sending simple messages to being able to execute admin and moderation commands. The table below outlines the current set of options along with a short description of their usage and what they do.
Send Message
Issue a message to the chat inc. personalisation options and being able to delay its deletion
Send Image
Send a photo to the chat based on a file ID or web url. Option to also add a caption to the image.
Send Video
Send a video to the chat based on a file ID or web url. Option to also add a caption to the video.
Send Animation
Send an animation to the chat based on a file ID or web url. Option to also add a caption to the animation.
Send File
Send a file to the chat based on a file ID or web url. Option to also add a caption to the file.
Send Audio
Send an audio file to the chat baed
Pin Matched Message
Pin the message that has been matched by the conditions groups. This works mainly for media and text messages.
Roll Dice
Issue a dice to the chat which can be rolled by users to specify a value.
Delete Message
Delete the message that has been matched by your conditions.
Warn User
Issue a warning to the user who has been matched by your conditions.
Remove User Warn
Remove a warning based on the matched conditions and when a user is targeted.
Kick User
Kick the user who has matched the conditions in your groups.
Mute User
Mute the user who has matched you conditions including specifying a duration for the mute.
Un-mute User
Remove a mute restriction based on the user matching your conditions.
Ban User
Ban a user with a specified ban duration when matching your conditions
Global Ban User
Globally ban a user from your bot chats including a duration
Remove User Ban
Remove a ban restriction based on the user matching your conditions.
Trust User
Add a user to your trusted whitelist if they match your conditions.
Un-trust User
Remove a user from the trusted whitelist if they match your conditions.
Global Trust User
Globally trust a user across all of your bot managed chats
As with our conditions, you are able to add another action within this group. By adding another action, you are creating a series of actions which will execute in the order that you have specified. For example, here we will delete a message (the one sent to cause the conditions to run) and then we will send an action to kick the user who sent the message.
Again, as with our condition group, you will notice in the header next to the "Action Group 1"
we have the "Run All Actions In Group"
drop-down and between the two actions that are set to run you will see the "----- AND ----"
notation.
This is telling us that the more actions we add to this group, the bot is going to run each of them in turn until completed.
As with our condition groups, we also have the option to add new Action Groups. By doing this, we offer a random rotation of which action group set will be executed when our condition rules are matched.
The benefit of having this functionality is that you can randomise the action outcomes, maybe you want to give out random reputation or change an image based on random chance. This is precisely how the Russian roulette game works in our Action Marketplace.
You may notice, in our condition rules we are to set the following parameters:
Replies To A User
Mentions A User
When adding these conditions to a condition group you unlock the ability for your actions to "target" a specific user for action types which involve "moderation"
Since we have conditions which are concerned with "replied to" and "mentions a" we now have the option to specify the target, which includes:
The originating user - As per the standard action option when special conditions do not exist
The replied to user - The condition has identified a user has been replied to and we want to target that person
The mentioned user - The condition has identified a user has been mentioned in the message and we want to target that person
Either the replied or mentioned user - Combination of both of the above
Why is this useful? It means we can produce actions that target users other than the person who sent the message and therefore build out commands that mimick our own moderation commands. Maybe you want to ban a user if they are mentioned, maybe you want to make reputation rain down with a special !rain @user type of command. All are now possible with these options.