Connect DotCraft to Telegram
Connect a Telegram bot to DotCraft with a BotFather token. DotCraft receives messages by long polling, so you do not need a public webhook URL.
Quick setup
- Open Telegram and start a chat with
@BotFather. - Send
/newbotand follow BotFather's prompts. - Copy the bot token.
- Open the target workspace in DotCraft Desktop.
- Open Channels, then select Telegram.
- Paste the bot token.
- Save the channel and turn it on.
- Send a message to the Telegram bot.
Desktop should show the Telegram channel as connected after polling starts.
Platform setup details
Telegram setup lives mostly in BotFather:
- Use
/setdescription,/setabouttext, and/setuserpicif you want the bot profile to look finished. - Add the bot to a group if DotCraft should answer there.
- Review BotFather privacy mode for group chats.
With Telegram privacy mode enabled, the bot may only receive commands, replies, and messages that mention it. If you need DotCraft to see every group message, change the bot privacy setting in BotFather.
Test the connection
- Send
helloin a direct chat with the bot. - Confirm DotCraft replies.
- Send
/helpto confirm commands are registered. - Send
/new, then send another message and confirm it starts a fresh conversation. - In a group, mention or reply to the bot if privacy mode is enabled.
What works after setup
- Direct messages and group messages can start DotCraft turns when Telegram delivers them to the bot.
/newstarts a fresh DotCraft conversation./helpshows available commands.- Approval and user-input prompts use Telegram inline buttons when possible.
- File and image delivery are available through channel delivery tools.
- Only one long-polling process can use the same bot token at a time.
Standalone adapter
Run the Telegram adapter yourself only when Desktop is not managing the channel process.
cd sdk/typescript
npm run build --workspace @dotcraft/channel-telegram
npx dotcraft-channel-telegram --workspace /path/to/workspaceRegister the channel as a standalone WebSocket adapter in the shared channel configuration reference.
Reference
See Channel configuration reference for the Telegram JSON example, ExternalChannels registration, and field table.