I18 With AI...
A Telegram UserBot that provides real-time message translation capabilities, allowing users to seamlessly communicate across language barriers.
- 🔄 Real-time message translation(but only for yourself)
- 🎯 Custom target language settings per chat
- 🤖 Easy-to-use commands
- Node.js 20 or newer
- pnpm
- DeepSeek API key or another OpenAI-compatible API key for the translation service
Use pnpm for dependency installation. Do not run bun install or npm install in this repository.
- Clone the repository
git clone https://github.com/sudoskys/i18n_me.git
pnpm install- Create a
.envfile in the root directory with the following variables:
TELEGRAM_API_ID=123456
TELEGRAM_API_HASH=0123456789abcdef0123456789abcdef
TELEGRAM_SESSION_FILE=mtcute.session
OAI_BASE_URL=https://api.deepseek.com
DB_FILE_NAME=file:group.db
OAI_API_KEY=sk-xxxxx
OAI_MODEL=deepseek-v4-flashGet your TELEGRAM_API_ID and TELEGRAM_API_HASH from my.telegram.org.
The default translation provider is DeepSeek's OpenAI-compatible API. Override OAI_BASE_URL and OAI_MODEL when using another compatible provider.
Connect to your Telegram account and start the bot:
pnpm run startThen, Ctrl+C to stop the bot and run the following command to start the bot in production mode:
Build for production:
apt install npm
npm install -g pm2
# In the repo root directory
pm2 start pm2.json
pm2 statusDo not share your .env file or .session file with others.
/ping- Test if the bot is active and get current chat ID/on- Enable translation for the current chat/off- Disable translation for the current chat/use [target_language]- Set target language and enable translation/show- Show current translation settingstl [text]- Translate the following text (prefix any message with 'tl' to translate)
Command status edits the original command message. Short status commands such as /ping, /on, and /off delete that edited message after a short delay.
- mtcute - Telegram MTProto framework
- OpenAI SDK - OpenAI-compatible translation calls
- pnpm - Package management
Made with ❤️ by @sudoskys