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
- Clone the repository
git clone https://github.com/sudoskys/i18n_me.git
pnpm install
- Create a
.env
file in the root directory with the following variables:
OAI_BASE_URL=https://api.openai.com/v1
DB_FILE_NAME=file:group.db
OAI_API_KEY=sk-xxxxx
OAI_MODEL=gpt-4o
- Edit
tgsnake.config.js
nano tgsnake.config.js
get your apiHash
and apiId
from my.telegram.org
/** @type {import('tgsnake').Options } */
const config = {
apiHash : 'xxxx',
apiId : 123456,
login : {
botToken : '',
sessionName : 'user',
forceDotSession : true,
},
logLevel : ['error','info'],
clientOptions : {"ipv6":false},
plugins : []
}
module.exports = config
Connect to your Telegram account and start the bot:
pnpm run start
Then, 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 status
Do not share your .env
file or .session
file with others.
/ping
- Test if the bot is active and get current chat ID/local
- Toggle translation feature on/off/use [target_language]
- Set target language for translationstl [text]
- Translate the following text (prefix any message with 'tl' to translate)
- tgsnake - Telegram MTProto framework
- instructor-ai - Translate text with AI
- Bun - For the amazing runtime and tooling
Made with ❤️ by @sudoskys