Telegram 集成允许 Botpress 聊天机器人和 AI 智能体通过官方的 Telegram Bot API 与 Telegram 用户进行交流。它支持双向实时消息传递,涵盖文本、媒体、按钮和交互式命令,可在私聊或群组中使用。
在底层,这个集成使用了 Telegraf —— 一个强大的 Node.js 框架 —— 来管理来自 Telegram 的消息路由、命令和事件。你的 AI 智能体发送的消息会自动从 Markdown 格式转换为 Telegram 支持的 HTML 语法,确保文本、链接和格式的完美呈现。
凭借内置的消息清理和输入状态指示工具,该集成为终端用户提供了干净、安全且响应迅速的沟通体验。开发者可以用它来自动推送更新、处理工单,或以极简配置将聊天机器人扩展到 Telegram 社区。
<iframe src="https://www.youtube.com/embed/w0-UGm4mu74"></iframe>
The Telegram integration allows your AI-powered chatbot to seamlessly interact with Telegram, a popular messaging platform with a large user base. Connect your chatbot to Telegram and engage with your audience in real-time conversations. With this integration, you can automate customer support, provide personalized recommendations, send notifications, and handle inquiries directly within Telegram. Leverage Telegram's rich features, including text messages, inline buttons, media files, and more, to create dynamic and interactive chatbot experiences. Empower your chatbot to deliver exceptional user experiences on Telegram with the Telegram Integration for Botpress.
## Migrating from version `0.x.x` to `1.x.x`
### Removal of proactive conversations (and proactive users)
- Telegram does not currently support proactive conversations, so any bots using this feature will need to be updated to use the normal conversation flow.
### Removal of dedicated Markdown messages type
- The `markdown` channel message type is being deprecated in favor of integrating this behavior into the base `text` message type.
- This new Markdown behavior (commonmark spec) will allow image Markdown. However, since Telegram does not support mixed message types, it will split the message into multiple messages with images sent in between text messages.
### Addition of message limits
- Telegram has a message length limit of 4096 characters, so that limit has been added to the text parameter in the `text` message payload. Going over this limit will result in the message being rejected.