Modr8 Support
  • 📘Introduction
    • What is Modr8?
    • Feature Overview
    • Pricing & Subscriptions
    • Global & Multi-Chat Features
  • ⭐Getting Started
    • Register A Bot
    • Add Your Chat
    • Recommended Settings
    • Managing Your Bot & Chat
    • Team Access
  • ⚡Features
    • Bot General Behaviour
    • Admin Verification
    • Welcome Message & Human Check
    • Community Driven Moderation
    • Community Reputation
    • Advanced Features
    • Community Referrals
    • User Filters
    • Timeline & Event Log
    • User Management
    • Announcements
      • One-Off & Scheduled
      • Social Announcements
      • Global Bot Announcements
    • Polls & Quizzes
    • Analytics
    • Actions
      • Quick Start
      • Conditions
      • Action Groups
      • Managing, Importing & Exporting Actions
      • Using The Marketplace
      • Bot Actions vs. Chat Actions
    • Commands
      • Built-in Commands
      • Creating & Managing Custom Commands
      • Bot Command vs. Chat Command
    • API Access & Zapier Integration
    • Spam Prevention & Protection
    • Media & Text Filters
  • ❓Popular Questions
    • Affiliates & Partnerships
Powered by GitBook
On this page
  • Condition Groups
  • Condition Options
  • Managing Action Group Conditions

Was this helpful?

  1. Features
  2. Actions

Conditions

PreviousQuick StartNextAction Groups

Last updated 1 year ago

Was this helpful?

Conditions are used to define when your actions will run, they are the rules that need to be passed to continue execution.

Condition Groups

Conditions are contained within a condition group. When adding multiple conditions to a group the overall group needs to be "passed" before running your action.

You are free to add multiple groups and when you do, the outcome is based on "OR MATCH CONDITIONS" convention. This means if you have multiple groups of conditions only one of those groups needs to pass for your action to run.

You will use condition groups to split up complex rules/conditions and make them easier to understand and debug if you face any issues.

Condition Options

Conditions are based on "Properties", the very first item you will select for a condition is the "Property" drop down. From here, dependent on the condition selected the "Match" will adjust as well as the "Match Value". These allow you to be super specific on what you want your rule to run against and what it should be checking for.

The property type groupings Modr8 supports you building rules against are specified in the table below.

Property
Description

Message Properties

Conditions & properties that are related to a message. This could be the text of a message, whether it is a reply to another user or whether it is a forwarded message

Originating User Properties

The originating user is the user who caused the event to happen that Modr8 engine is running its rules against. This could be the person who just sent a message, it could be the user who just joined the chat. You can create matches against the properties of this user such as their username or user id.

Chat Events

These are specific events emitted by the Chat group itself, also known as "Service Messages". These happen typically when a user joins or leaves your chat.

Media Messages

A sub type to the Message Properties, media messages are very varied so we have created a section just for them. If you want to match against "Media" or maybe specific properties of a video or dice roll game you can do so by using this.

By combining multiple types of condition with multiple types of property checks you can see how we can easily build out very broad or very narrow rules and conditions to execute actions.

Managing Action Group Conditions

As discussed in previous sections, an action group can contain many conditions and you are able to have multiple condition groups within your action builder.

When you have multiple condition groups these work with an "OR" condition between them. This means the Modr8 action engine will attempt to match condition group 1 OR condition group 2 OR condition group X. If any of these groups match successfully then your action will run.

But what if you wish your conditions WITHIN a condition group to also match with an "OR" condition? Well, by default you will have noticed when adding multiple conditions to a condition group you see ---- AND --- between them as per the following image.

You will notice in the header of the group it says "Condition Group 1" followed by a drop down stating "Match All Conditions". This is saying all of the conditions within my group 1 must match for this group to be a true match. We can switch that drop down to "Match Any Condition" and we will now have an "---- OR ----" show between the conditions. This means I want any of the following conditions to be true and then if so my overall group is a true match to run my action.

When is the best time to use "Match Any Condition" vs. Creating a new condition group? Honestly, it is a case by case basis and sometimes you just have to review the use-case you are trying to fulfill. For now, it is good to know you have this option available to you!

⚡
Modr8 Conditions & Condition Groups
Some condition properties will require a match type and a match value to be specified
Some condition properties only require a simple yes or no match
Multiple conditions within a condition group, where all of them must match due to the "Match All Conditions"
Condition group set for any condition to be a match giving us the "OR" condition match