Chat SDK launches Telegram adapter, extends bot framework to five platforms
New Telegram Adapter Available
Chat SDK has released native Telegram adapter support, enabling developers to build bots that work seamlessly across Telegram alongside existing platforms. The new adapter extends Chat SDK's multi-platform strategy, allowing teams to maintain a single codebase while targeting Slack, Discord, GitHub, Teams, and now Telegram.
Supported Features
The Telegram adapter enables:
- Message interactions: Mentions, message reactions, and direct messages
- Real-time indicators: Typing indicators for enhanced user experience
- Interactive elements: Buttons and link buttons that render as Telegram inline keyboard elements
- File handling: Single file upload support
- Rich formatting: Basic text cards for structured content delivery
Key Limitations
Telegram's API constraints impact certain functionality:
- Message history: Relies on adapter-level caching since Telegram doesn't expose full historical message APIs to bots
- Callback data: Limited to 64 bytes per callback
- Unsupported features: Modals and ephemeral messages are not available on Telegram
Getting Started
import { Chat } from "chat";
import { createTelegramAdapter } from "@chat-adapter/telegram";
const bot = new Chat({
userName: "mybot",
adapters: {
telegram: createTelegramAdapter(),
},
});
bot.onNewMention(async (thread, message) => {
await thread.post(`You said: ${message.text}`);
});
For detailed implementation guidance, consult the Telegram adapter documentation.