The client needed an AI solution that will simulate human conversation by using key pre-calculated phrases based on auditory or text-based signals for communication with group followers.
The solution had to have specific functions, so the simple bot-builder couldn’t be used.
The client requested two functionalities, which should be linked and work together: external communication with predetermined leads and telegram-group moderation.
On the first stage, the bot engaged leads to enter the main telegram group. External communication was implemented by sending pre-described messages to the leads-database, answering leads’ questions, and inviting them to the main group.
On the second stage – group moderation, the user accepted the invite and entered the main group. Here bot monitored group activity: welcomed new followers, answered their questions, and kept order in the group. The bot answered messages in the group and private dialogs. If anyone violated group-rules and spammed, the bot sends a warning message or drops a user from the group in case the violation continues. The bot could send private messages either to all group participants or to several users.
Both stages were developed with the help of the following Python libraries: python-telegram-bot, chatbotAI, Telethon, and chatterbot.