Skip to main content

Module of group triggers

What are triggers

Triggers are special keywords. If the bot see this keyword in the group, he can react on this by sending the predefined message to the group.


b7def3287e230f4fa9cb4.jpg


To customize triggers, select "Triggers" from the group edit menu.
🔐Admin | 🧫Channels and Groups | My Groups
Triggers and trigger's parameters are configured for each group separately.


Trigger parameters

Trigger's parameters are configurable for all triggers in the group. It is impossible to set parameters for an individual trigger.


IMG_20211205_152959.jpg


Admin only

Determines how the bot will react on triggers that sent to the group.
Modes:
Off ⏹️ - the function is disabled (admins and users BOTH can use triggers).
On ▶️ - the function is enabled (only admins can use triggers).


Delete

Determines whether messages containing triggers will be deleted after the bot replies to them.
Modes:
Off ⏹️ - the function is disabled (the message with the trigger will remain in the chat).
On ▶️ - the function is enabled (the message with the trigger will be deleted).


Reply

Determines whether the reply to the trigger will be sent as a "Reply".
Modes:
Off ⏹️ - the function is disabled (will be sent as a regular message).
On ▶️ - the function is enabled (will be sent as a "Reply").

The setting will be ignored if the "Delete" mode is enabled, because this implies the deletion of the message containing the trigger.

Reply on Reply

If the trigger was sent as a Reply to some message, then the bot will also send a response to this message as Reply.
Modes:
Выкл ⏹️ - the function is disabled (send as a regular message).
Вкл ▶️ - the function is enabled (send as Reply).


How to add triggers

At the moment there are 2 types of triggers in the bot.

Triggers of Buttons - are bind to the bot's buttons. To define such a trigger, you must create a button, add a message to it (or select an existing button with an existing message) and associate preferred trigger's text with it.

Trigger of Messages - such a trigger can be assigned directly by adding a message to the bot in the trigger's settings menu, or using commands, to any message, of any user, right in the group (where the bot is working).

For a Trigger of Buttons, it doesn't matter if the button is accessible from the menu, locked or hidden: the trigger will always work for it.

Inline buttons with commands neither working nor shown in groups.

Messages that are shown in a group by triggers can contain their own inline buttons. Out of all the inline buttons in this post, inline buttons containing commands will not be shown in the group. However, if the same message is shown in the bot itself, for example, if a trigger is used by admin in response to a user's message received from the QnA chat form (and, accordingly, a trigger's message has to be sent to the user in the bot), then all buttons will be shown in full and the user will be able to use such a "button with command" like a regular inline button in a bot. This can create interesting mechanics.

For buttons specially created for triggers, it is a good practice to create a special sub-menu (or several sub-menus), hide the entrance to it using the "Admin only" button mode, and create buttons and messages for triggers within it. Well, at least that's what we do. :)


New Trigger of Button

1. Select "➕ Button Trigger"


IMG_20211205_154733.jpg


You will see all the buttons of your menu as a tree.


6fef5c2a0cd82efc47daf.jpg


2. Select the button

Select the button to which you want to bind with the trigger, by clicking its command in the menu tree:


855a3efdbffe2c668fefc.jpg


3. Enter the trigger's text

Enter the trigger's text (when the bot sees a message with this text, it will reply to it with a messages from the button):


7f099493622d149a9f8f2.jpg


b9b53a276f6284588670d.jpg


If you want to have the trigger text that matches the name of the button, click the button below:


dd5f70bd790456c262ccc.jpg


This button will always have the same name with the button selected in the menu.

That is all.

You have now set up a trigger with the text "Trigger 1", which will send the message(s) to the group from the "Trigger's Button" of your menu.


d26606eecc6a9b6812f30.jpg


Multiple triggers can be associated with one button.


New Trigger of Message (in settings)

1. Select "➕ Message Trigger"


IMG_20211205_154655.jpg


2. Add or forward a message to the bot.

3. Send the trigger itself to the bot.

Done - trigger added!


New Trigger of Message (in group)

Triggers of Messages can be added using any message you find in your group.

Convenient if IN GROUP you find any useful answer of yours (or a group member's) and you may use it later to answer the similar question.

In response (reply) to the desired message, send command:
!tadd trigger_name

Where: trigger_name is the name of the trigger you want to create.

Desired trigger will be added to the bot and ready to use right at this moment.


All triggers are case-INsensitive: they are always stored in small letters and will work in whatever case they are entered, for example "Test trigger" or "TeSt TrIgGer".

When triggers in the form of commands (/trigger) are used in groups, some Telegram clients, perceiving the trigger as a command and passing the trigger's name to the bot with addition of the bot's name itself. When creating triggers in the form of commands for the use in groups, you do not need to duplicate the trigger with the addition of the name of the bot itself.
The bot's name, which is automatically added when used in a group, will be cut off during processing.
For example trigger:
/trigger@bot_name
will be processed as
/trigger.


Triggers deletion

Method 1: To remove a Trigger from the list of triggers, click on the Delete Trigger command in trigger settings:


246a62a73ee51e6114bb1.jpg

Method 2: Triggers can be deleted directly in the group, for this it is not necessary to go to the bot itself. Send the command to the group where the bot is working:

!tdel trigger_name

Where: trigger_name is the name of the trigger you want to delete.


How to import triggers

If you want to use the same triggers (or part of them) in several groups, you can import triggers from one group into another group.


1. Select a group

Go to edit mode of the group where you want to import triggers. (For this example we will choose "Test Group 2").


4234087c77687e74ced2b.jpg


Go to "Triggers".


2. Select "Import"


8c2fbc809a5332677375f.jpg


3. Select the source group

Select the source group by clicking on the Group Selection command:


151bfc7b609489c8dc4e5.jpg


4. Select triggers for import

Select the triggers to import by entering their numbers, separated by commas:


35eef9cb2b85127448aab.jpg


If you want to import all triggers, use the "All" button.


90fcd8c6cba5d21b9ad9e.jpg


Now the same triggers are configured in the new group.


343b39a78d60d05e68e22.jpg


During the import process, triggers with new text in name will be added. Triggers with the same text will be replaced.


Special features of triggers

Inline buttons of trigger's messages

Messages displayed by triggers can have inline buttons of URL and Popup Window types.

On-entry triggers (by presence)

On-entry (by presence) triggers. If a trigger starts with "!" (exclamation mark), for example, " !bonus", then it will be searched for by presence and triggered on phrases like: "how to get a bonus ". In this case, the message on which the trigger was triggered is not deleted, regardless of the setting.


Service triggers

The system provides special trigger commands for service needs.

t or T (one letter "t"): will send all available triggers in the group. The message will be automatically deleted after sending any trigger from its list.

Other service commands can be added later.


How to get more triggers

The number of triggers can be increased.

More Triggers.
To connect, go in your bot:
🔐Admin | 🧩Extensions | 📂Channels and Groups

Additional triggers are purchased for a bot forever and can be added to any group of this bot.

For example, if you added 10 triggers, you can use 5 of them in group 1 (15 triggers: 10 basic + 5 additional), 3 of them in group 2 (13 triggers: 10 basic + 3 additional) and 2 of them in group 3 (12 triggers: 10 basic + 2 additional).

Once acquired, additional triggers will never disappear. If you remove an additional trigger from a group or delete the entire group at all, the additional triggers are released and can be used again in another group.


Errors when working with triggers

Bot does not respond to triggers in a group

Option 1: The trigger was sent by the user of the group, and the bot is configured to work only with admins - see the settings and set the one you need.
Option 2: You have just added an Admin to the group and the bot has not yet updated the lists of admins - send the !admins command to the chat, in order to force the lists to be updated.