Skip to content

Working with Chats

Bots and accounts connected to Hotline can be in Telegram chats of different types: groups, topic groups and channels. This allows organizing communication monitoring, team prompt responses and content posting on behalf of connected bot or account.

Chat Work Features

When activating MONITOR_GROUPS or MONITOR_CHANNELS parameters in connection settings, the following functions become available:

  • Receiving messages from chats to corresponding topic of Hotline backend group
  • Sending messages to chats on behalf of connected bot or account through backend group
  • Joining chats by link and creating new chats with the /new command
  • Managing chat members when the connected bot or account has the required administrative permissions
  • Keyword filtering — automatic broadcast activation when specified words appear in parameters GROUPS_KEYWORDS and CHANNELS_KEYWORDS

Monitoring Large Chats (new)

Hotline now supports reliable monitoring of large groups and channels with high message volumes and thousands of members.

Free Version Features

In the free version of Hotline, when activating each chat topic, a welcome message with Hotline copyright from the WELCOME parameter will be sent to it.

Also, topics are automatically closed after the timeout from the AUTOCLOSE parameter when there is no activity in them.

To configure topic auto-closing and disable the welcome message, purchase the paid version of the system, contact the support service.

Limitations with Content Protection

If a chat has content protection enabled (Content Protection), attachments from such chat will not be forwarded to the backend group, but message text will be transmitted.

Connection Features

Capabilities:

  • Bot can see all messages in chats where it was added by a chat administrator

  • Team can respond on behalf of bot in chats through backend group

  • Chat filtering by keywords
  • Monitoring and duplicating messages from private chats

Important Features:

Adding Bot to Chat

Only a chat administrator can add bot to a chat. Bot cannot independently join groups.

If you need to send messages from bot in chat, make sure the bot has sufficient rights for this.

Disable Privacy Mode in BotFather

If you plan to work in groups through bot, be sure to disable the Privacy Mode parameter for it in @BotFather. By default, the mode is active for bots and they don't see all messages in groups.

How to disable:

  1. Open @BotFather
  2. Send /mybots
  3. Select your bot
  4. Bot SettingsGroup PrivacyTurn off

Capabilities:

  • Can independently join public and private chats, including topic groups (joining chats with /new command by specifying link or chat name)
  • Creating new chats on behalf of connected account
  • Actions API for programmatic chat management

  • Your operator team can respond on behalf of account in chats

  • Chat filtering by keywords
  • Monitoring and duplicating messages from private chats

Adding to Chats

Only a chat administrator can add bot to chat:

  1. Open the needed chat in Telegram
  2. Click on chat name → Add Members
  3. Find your bot by username
  4. Select it and add to chat
  5. Grant administrator rights if needed

Method 1: Standard Way in Telegram

An account can independently join a public chat or be invited to a private group in the usual way through the Telegram app.

Method 2: /new Command Through Backend Group

Use the /new command in the General topic of Hotline backend group:

/new CHAT_USERNAME
or
/new https://t.me/CHAT_USERNAME    
or
/new https://t.me/+INVITE_HASH

Learn more about /new command

Managing Group Chats

From the corresponding group dialog topic in the backend group, you can manage the original chat on behalf of the connected bot or account:

Command Action
/invite USER Add a user to the chat
/kick USER Remove a user from the chat
/members [QUERY] List members or find members matching the query
/leave Make the connected bot or account leave the chat
/title NEW_TITLE Change the title of the chat represented by the backend group topic

The USER parameter can be a username, a phone number in international format, or *USER_ID, for example: /invite example_user, /invite +79991234567, or /invite *123456789.

The QUERY parameter is an optional search string that matches a member's name or username. The /members command without a parameter returns up to 200 members, while /members QUERY returns up to 200 matches.

The commands work for regular group chats and topics in supergroups. The connected bot or account must have the required Telegram permissions for the selected action.

Only operators listed in the EXTENSIONS_ALLOWED parameter can use these commands. If the parameter list is empty, the commands are available to all backend group operators.

Topic Activation and Management

With active MONITOR_GROUPS or MONITOR_CHANNELS, a topic for the chat on the backend group side is created and activated automatically:

  • When mentioning (@mention) the connected account or bot in chat
  • When replying (reply) to a message from the connected account or bot
  • When keywords appear from parameters GROUPS_KEYWORDS or CHANNELS_KEYWORDS
  • On any incoming message with active parameter LEAVE_CLOSED

Broadcast Management

Continuous broadcast of all messages from chat to backend group topic is conducted only when the topic has a status different from closed (yellow 🟨 or purple 🟪, activated by /wait or /hold commands).

If you close the topic with the /close command, message broadcast to it stops.

Learn more about topic statuses


LEAVE_CLOSED Parameter

With active LEAVE_CLOSED parameter, new topics are created in closed state. Only messages with keywords will be forwarded to it, and broadcast is activated only by operator decision.

Stopping Chat Monitoring

Deleting a topic in the backend group does not stop monitoring the chat or prevent the topic from being reactivated when it receives messages that match the rules in the GROUPS_KEYWORDS parameter.

To stop monitoring a chat without leaving it, use the /ignore command in its topic (or /unignore to resume monitoring).

Feature of Broadcasts from Other Topic Groups

When monitoring a topic group, each topic is perceived by the system as a separate chat. Accordingly, each topic must be activated separately (by mention, reply or keyword).

Chat Filtering by Keywords

Topics for chats can be created and activated automatically when messages with specified keywords appear in them.

Keywords and rules for filtering are set in parameters GROUPS_KEYWORDS or CHANNELS_KEYWORDS.

As a unified set of stop-words, the parameter RESTRICTED_KEYWORDS_FRONTEND may be useful.

Working with Activated Topics

When a topic is activated by keywords:

  1. All messages from the chat are broadcast to the topic, starting with the message containing the keyword
  2. Broadcast messages show profile links of authors
  3. Operators can respond in chat on behalf of bot/account
  4. Can write to DM of message author
  5. Or passively follow the conversation without participation

To stop the broadcast, send the /close command in the topic.

Advanced Filter Configuration

If you need more flexible filter settings (regular expressions, exact match, complex conditions), contact the Hotline support service.

Used Parameters

Activating message monitoring from groups or channels:

MONITOR_GROUPS

Create and activate topics when new messages appear in group chats in which the connected account or bot is a member.

Default value: FALSE (groups are not monitored).

Learn more about this parameter

MONITOR_CHANNELS

Create and activate topics when new messages appear in channels to which the connected account is subscribed or in which the bot is a member.

Default value: FALSE (channels are not monitored).

Learn more about this parameter

Disabling greeting:

WELCOME

Welcome message that user receives on first contact and when their request was closed (switched to /close status). Can be completely disabled on paid version. Free version requires Hotline link in welcome message.

Default value: standard welcome message in English.

Learn more about parameter

Disabling automatic topic closing:

AUTOCLOSE

Dialog auto-close period after last operator response, specified in hours. If topic with user was closed, they'll receive welcome message from WELCOME parameter on next contact. Free version has maximum auto-close period of 48 hours.

Default value: 48 hours.

Learn more about parameter

Keywords and rules for filtering are set in parameters:

GROUPS_KEYWORDS

Array of keywords and phrases for filtering messages from group chats. Activates topics only when matching specified words.

Default value: OFF (no filtering).

Learn more about this parameter

CHANNELS_KEYWORDS

Array of keywords and phrases for filtering messages from channels. Activates topics only when matching specified phrases.

Default value: OFF (no filtering).

Learn more about this parameter

Hiding information about chat participants from operators:

HIDE_INFO

Determines what client information is hidden from operators (names, group titles, user links, /info command output).

Before using it, you must set AUTO_INFO to FALSE.

Default value: NONE (all information is available).

Learn more about this parameter

Controlling outgoing messages by keywords:

RESTRICTED_KEYWORDS_FRONTEND

A list of prohibited keywords and combinations for incoming messages. Individual words work as OR conditions, while nested lists work as AND groups. Matching messages are not forwarded to the backend group.

Default value: NONE (no filtering).

Learn more about this parameter

Controlling incoming messages by keywords:

RESTRICTED_KEYWORDS_BACKEND

Array of prohibited keywords for outgoing messages. Triggers an error when attempting to send a message with specified words.

Default value: NONE (no filtering).

Learn more about this parameter

Practical Usage Scenarios

  • Team Chat Support


    24/7 customer chat support by operator team on behalf of bot or account.

  • Lead Search


    Automatic search for potential customers in Telegram chats by keyword queries.

  • Mention Monitoring


    Track mentions of your company, products, or competitors in thematic chats and channels.

  • Regular Posting


    Publish news, announcements, or content to chats on behalf of an account or bot through the backend group.

  • Message Backup


    Save and duplicate messages from closed or important chats in your private backend group.