Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
A Telegram translation bot built with Bun, Telegraf, and Telegram MTProto. The bot automatically detects message language and translates between Indonesian/Malay and English as the primary translation pair.
# Development with hot reload bun --watch . # Build for production bun build --target bun src/index.ts --outdir dist # Run production build bun run ./dist/index.js # Docker build and run docker build -t translator-bot . docker run --env-file .env translator-bot
The bot uses a dual-translation approach with fallback:
Primary: MTProto client (
src/mtproto.ts) via Telegram's official API
messages.TranslateText RPC methodLanguage Detection: Uses google-translate-api-x with auto-detection
src/index.ts - Main bot logic
detect() functionsrc/mtproto.ts - MTProto client wrapper
translate() functionRequired in
.env (see .env.example):
BOT_TOKEN: Telegram bot token from @BotFatherAPI_HASH: Telegram API hash from my.telegram.orgAPI_ID: Telegram API ID from my.telegram.orgSESSION: Telegram user session string for MTProto"type": "module")