How to set up bots for working in groups in @MenuBuilderBot

How to set up bots for working in groups in @MenuBuilderBot

MegaHubTelegram

Bots created on the @MenuBuilderBot constructor can work in groups. This guide is about the existing features and how to configure the bot to work in your group or channel. The basic functions of a bot in a group are moderation, anti-spam and support for triggers, but if you need to organize feedback through the bot with your admins to be able to respond from the group, then read the manual on QnA chat. You can create Feedback Forms in bot and respond to those Forms from the group.


📜 The translation of this materials into your native language can be automatically done using the Google translator. Follow the link and select the desired language in the title:
https://translate.googleusercontent.com/translate_c?depth=1&sl=en&tl=es&u=https://telegra.ph/How-to-set-up-bots-for-working-in-groups-in-MenuBuilderBot-EN-07-23

⬛ Table of Content

Groups Tokens

Groups functionality

How to add the group

How to set up the group

Moderation Module

Moderator Commands

Anti-Spam Module

Triggers for groups

How to delete the group



⬛ Groups Tokens


Enabled groups consumes small fee. It was added to avoid bots being placed into thousands of useless groups that nobody needs and forgotten long ago.

For the group fee we add special "Group Tokens". Group tokens are purchased for the whole owner's account and can be spend in all its bots.

1 group in 1 bot per 1 day consumes One Group Token. Tokens are charged daily: for example, if any group was enabled only for 3 days - it will consume only 3 tokens. No overpay for month or like this.

To get Group Tokens go to:

☞ 🔐Admin | 🧩Extensions | 📂 Channels and Groups | Group Tokens (TG)


⬛ Groups functionality


Every group includes the following functions:

● Greeting new users with a greeting message

● Use of triggers (10 triggers you get for free)

● Anti-spam

● Basic moderation

● Moderator Commands


⬛ How to add the group


1. Go to group management menu

🔐 Admin | 🧫 Channels & Groups | My Groups


2. Add new group

2.1 Press "+ Add Group/Channel"


2.2 Send the group requisites (one of the following):

● name of open channel/group (@name)

● forward a message open from the channel

● ID of the private group (see below how to get ID)

To get the private group ID use the @RawDataBot. Add it to the group with full rights. As soon as it will be added, it will post a full dump of data:

You can also use @myidbot, after adding it to the group as admin, send the /getgroupid command to the group. The bot will also send you a group ID.


Get the ID from the section "chat" and use it to add group to the bot. The ID number starts with a "-" (minus) sign. Copy the ID with this sign. After that remove @RawDataBot from the group.


If everything is successful, you'll see the added group:


Forced ID setup

IMPORTANT: Sometimes the your bot cannot recognize the Private Group by its ID. However, if you are sure that the private group's ID you received is correct, you can forcibly add it using this ID. To do this, enable "Forced ID Setup" by clicking on the button below. Please note that in this case the group will be added with any ID you send, even if it is not correct. Obviously, a group added with an incorrect ID will not work. If a group that was added forcibly still does not work, we recommend that you temporarily make the group Public, add it as public, and then change its status back to private again.
The button of forced ID setup


IMPORTANT: The group ID may change when the group status changes from regular to Supergroup. In this regard, the bot functions related to its actions in the group (subscription, triggers, moderation, etc.) will stop working. In this case, the group will need to be added again with a new ID.


The title of the group will be "Unknown" if the bot yet do not know the group. Later title will be updated automatically.


After that you can add the bot to the group: bot will not leave it.


⬛ How to set up the group


To set up the group find the group in the list of groups and click group edit command:


You'll get the group editing menu:

The current settings of the group are indicated in the message, the setting are made by pressing the buttons in the lower menu. In the group settings, in addition to the settings themselves, there are modules for group protection, moderation, as well as triggers settings.


Group settings itself

➗ Name - allows to set an alternative name for your group or add the comment (optional). This is the admin's only information and will be visible only to admins. It will be shown in Admin menu when operating the group.


Enabled (▶️On/⏹Off) - activates or deactivates the group. Current state of the setting is displayed on the button. When the group is disabled, bot does not work in the group, but stays in it and all group settings are preserved. You still can set up group options etc. Only one group at the time can be disabled, this to avoid the storage of unused groups.
Enabling the group will immediately charge 1 "Group Token" for the current day!


➗ Greeting - allows to set the greeting message for new users in group. If the message is set - greeting for new users is enabled. If the message is set, the greeting of new users is enabled. To disable greetings delete the greeting message.
Greeting message can include the macros. %firstname% for all bots.


Macros %lastname%, %username%, %userid% are available only for accounts where "User Macros" is enabled. To enable go in your bot:
☞ 🔐Admin | 🧩Extensions | 📂 Macros


In the greeting message you can now use inline buttons. Buttons of types "URL" and "PopUp" are supported. "Command" buttons will not be shown.


⬛ Moderation Module


Moderator - The button contains basic moderation settings:

● Delete Events (▶️On / Off) - when turned on, the bot will delete all system messages (User joined the group, User left the Group, etc.)


⬛ Moderator Commands


This functionality has no settings and therefore is not presented as button.

The bot can restrict users in Super-groups (only in super-groups) - in regular groups Telegram does not provide the ability to restrict users.


IMPORTANT: Moderator commands start with "!" (exclamation mark) and are sent in response (reply) to the message of the user who needs to be restricted.


Letting you to find out the ID of the user with a hidden account in a group - if send this command in reply to his message.


Mute

The command allows you to restrict the user's right to write in the group.

Mute - RO - read only.

Will FOREVER prohibit this user from writing in your group. Use carefully.


To temporarily restrict the user in the right to write to the group, use an additional numeric parameter:

Will TEMPORARILY (for XX days) restrict the user's right to write in your group.
For example:

!mute 10

Will mute the user for 10 days.


You can add modifiers to a numeric parameter
d - day
w - week
m - month
y - year

Will TEMPORARILY (for the specified period z) restrict the user's right to write in your group.
For example:

!mute 2w

Will mute for 2 weeks (14 days)

Please note that if the limitation period is more than 365 days (1 year), then the user will be limited forever - in accordance with the Telegram API settings.


IMPORTANT: Mute (PO - read only) DOES NOT remove the user from the group and does NOT prohibit him from reading messages. The user just will not be able to write to the group chat.


Command !mute supports comments. After the mute time, you can specify additional text.
For example:

!mute 7d flood and spam

In this case, in response to the message indicated by the mute, the following message will be displayed:

"Read only 7 days (up to xx.xx.xxx) flood and spam"

The language of the message will depend on the menu language set in your bot.


If the mute failed for some reason (wrong command, error or something else) - the bot will display a "fail" message in the chat.

Works ONLY for group admins regardless of bot settings and triggers.


Removes the mute from the user, if it was there. It doesn't matter if it was set with the !mute command or manually.


Ban

Deletes user from the group.


Kicks the user from the group with blocking, can set the specified period of returning (format - like the command !mute). And deletes the message to which !ban was replied to.


Unblocks the user letting him back to group. It doesn't matter if he was kicked by the !ban command or manually.




⬛ Anti-Spam Module


Your bot can protect your groups from spam.

To set up Anti-spam click "Anti-Spam" in the group edit menu. Anti-spam options are configured for every group individually.

Anti-spam will never react on group admins' messages! If you want to test anti-spam - use non-admin account. :)


Anti-spam settings

The condition of settings are displayed on the buttons.


Anti-Arab (▶️On/⏹Off)

Defines, whether your bot will identify the messages with Arabic text as a spam.


Anti-Ethiop (▶️On/⏹Off)

Defines, whether your bot will identify the messages with Ethiopic text as a spam.


Links (⏹Off/1+/2+/3+)

Defines, whether your bot will identify the messages with the given number of links. Off - Module is Off - any number of links allowed.

Pressing the buttons will change the parameters from 1+ to 3+. prohibiting the appropriate number of links.

1+ one or more links are prohibited (all links are prohibited)

2+ two or more links are prohibited (one link is allowed)

3+ three or more links are prohibited (two links are allowed)


Hashtags (⏹Off/1+/2+/3+)

Defines, whether your bot will identify the messages with the given number of hashtags. Off - Module is Off - any number of hashtags are allowed.

Pressing the buttons will change the parameters from 1+ to 3+. prohibiting the appropriate number of hashtags.

1+ one or more hashtags are prohibited (all hashtags are prohibited)

2+ two or more hashtags are prohibited (one hashtags is allowed)

3+ three or more hashtags are prohibited (two hashtags are allowed)


Start links (▶️On/⏹Off)

Defines, whether the bot will identify as spam messages with bot start links (referral links etc.


Punishment (⏹Off/⛔️Ban/📛Kick)

Defines, what to do with spamers: nothing (just delete messages), Ban (read-only) or Kick (remove from group).


⬛ Triggers for groups


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.

To set up triggers click "Triggers" in the group edit menu. Triggers are set for every group individually together with trigger's options.


Trigger's options

Trigger's options are set for all triggers in the group. Setting option for a single trigger is not possible.


Admin Only (▶️On/⏹Off)

Defines, whether bot react only on triggers posted by group admin (▶️On) or by any user (Off).


Delete (▶️On/⏹Off)

Defines, whether the message with the trigger will be deleted after the bot answers (▶️On) or stay in chat (Off).


Reply (▶️On/⏹Off)

Defines, whether the answer to trigger will be sent as a reply (▶️On) or will be posted as a regular message (Off). Will be ignored if "Delete" is enabled.


Reply on reply (▶️On/⏹Off)

If the trigger was sent as reply to some message, the bot will also send a reply to that message (▶️On) or post regular message (Off).


How to add triggers

Triggers are bind to the bot's buttons. To define a trigger you should create a button, add a message to that button (or select existing button with existing message) and bind some trigger text with it.


It does not matter if this button is available from menu, locked or hidden: trigger will always work for it.


IMPORTANT: Button messages created to work with triggers can contain their own inline buttons. If such a message with inline buttons, by a trigger, send into a group, then an inline button with a command (unlike the others) will not be shown in the group. However, if the trigger is used in response to the user's message from the QnA chat form (and, accordingly, the trigger message will be sent to the bot instead of the gropup), then in such a message the inline button with the command WILL be shown and the user will be able to use it like a regular inline button in the bot. This can create interesting mechanics.


For buttons created specially for triggers it's a good practice to create special sub-menu (or several sub-menus), hide the entrance with "Admin only" and inside it create buttons with messages for triggers. We do things like this. :)


To add the trigger:

1. Click "➕ Add Trigger"


You'll get all your buttons as a menu tree:


2. Select the button
Select the button you want to bind to a trigger using one of the commands in the menu tree:


3. Enter trigger's text
Enter the text of the trigger (when bot see message with this text he will reply with button message):



If you want a trigger to be the same as the button text you can use the down button:

This button will always have the name like the button you selected from the menu.


All triggers are case insensitive: they are always saved in low-case and will work if they are called in any case for example "Test trigger" or "TeSt TrIgGer".


When using triggers in the form of commands (/trigger) in groups, some Telegram clients perceive the trigger as a command and send the bot the name of the trigger with the name of the bot itself added to it. When creating triggers in the form of commands for use in groups, you do not need to duplicate the trigger with the addition of the name of the bot itself.
▪️ The name of the bot, which is automatically added when used in a group, will be truncated during processing.
▫️ For example trigger:
/trigger @ bot_name
will be processed as
/trigger


That's all. Now you set up the trigger with text "trigger 1" that will send to this group the message(s) from the button "Trigger's Button" of your menu.

One button can be bind to multiple triggers.


Trigger's deletion

To delete the trigger in the trigger list click the trigger delete command:


How to import triggers

If you want to use the same set of triggers (or part of ti) in several groups you can import trigger to the group from another group.


1. Select group

Enter into the edit mode of the group, where you want to import your triggers to. (For this example we have chosen "Test Group 2")

Go to "Triggers"


2. Click "Import"


3. Select the group

Select the source group by clicking the group select command:


4. Select triggers to import

Select triggers to import by entering their numbers separated with commas:


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


Now the same triggers exist in a new group.

During import triggers with new text will be added. Triggers with the same text will be replaced.


Special trigger features

● In the messages that are shown by triggers inline button types: URL, PopUp Window are supported.

● 'Trigger by presence". If the trigger starts with "!" (exclamation mark), for example, "!bonus", it will be searched "by presence" and will work on phrases like "how to get bonus". Messages, triggered by "!" triggers will not be deleted despite the state of "Delete" option.


Service triggers

There are set of special trigger commands for service needs.

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

More special commands may be added later.


How to get more triggers

To get additional triggers go in your bot:

🔐 Admin | 🧩 Extensions | 📂 Channels and Groups | More triggers


Additional triggers belong to the bot forever and can be added to any group of this bot.

I.e. if you add 10 triggers, you can use 5 of them in group 1 (15 triggers: 10 base + 5 additional), 3 of them in group 2 (13 triggers: 10 base + 3 additional) and 2 of them in group 3 (12 triggers: 10 base + 2 additional).

Once additional triggers are purchased, they will never disappear. If you delete additional trigger from the group or if you delete the whole group - additional triggers become available again and can be used in another group.


⬛ How to delete the group


Go to "My groups". To delete the group find the group in the list of groups and click group delete command:


https://telegra.ph/Menu-Builder---All-Help-Materials-02-22

Report Page