Simple Telegram translate bot @justtranslate_bot
Just send to the bot a message in English and the bot will translate it into Russian or vice versa.
npm -g i pm2 yarn
git clone https://github.com/baitun/node-telegram-translate-bot.git
cd node-telegram-translate-bot
yarn install
Then you need to get tokens:
- You can get Yandex translate token here: https://translate.yandex.ru/developers/keys
- To get Telegram bot token, message to @BotFather
And then add this tokens to .env
file (this file is not tracking, so you need to create it). File should look like this:
YANDEX_TRANSLATE_TOKEN=""
TELEGRAM_BOT_TOKEN=""
Then you can start bot with yarn start
If Telegram is blocked in your country and you don't have VPN, open the Tor Browser and use following command:
NODE_ENV="dev" yarn start
To deploy bot on server, edit ecosystem.config.js file and run:
pm2 deploy production setup
pm2 deploy production update
If you have any questions, feel free to contact me via Telegram: @savinyurii