With Kwizbot you can create a bot that can listen and / or respond in groups. What is this useful for? Typical cases:

  1. A bot that allows you to execute commands in groups and will respond to commands like /command@mybot
  2. A bot that will recognize calls specified in the form @mybot pay attention for example, to save in notes or transfer data to a human operator
  3. A bot that listens to all messages in the group, transmits them to the operator panel and allows the operator to respond on behalf of the bot

Let's see how to implement them sequentially.

A bot that executes commands in groups

First, configure the bot menu commands in Botfather as described here Setting up bot commands in Telegram

Then you need action Action get_command

Create an action in the script, specify one event for each command

General view of the script for the command processing

General view of the script for the command processing

For each command, you need to create a separate event in action and the corresponding branches of the script.

For example, for the / menu command, you need the menu event

For example, for the / menu command, you need the menu event

A bot that will recognize calls to itself

To do this, you need Action get_user_input to get what the user wrote.

You can use Action if_else to define what the bot will react to and what not. For more complex things you will need Natural speech recognition [WIP 3.3]

An example of a script with if-else logic:

And an example of a dialogue with a bot:

A bot that will listen to all messages in the group

In order for the bot to be able to listen to all messages in the group, you need to configure the bot's privacy Privacy settings in Telegram groups

After that, using Action get_user_input you can receive both the message and the parameters of the user who sent it, namely his display name, username in Telegram and chat_id.