https://github.com/baitun/node-telegram-translate-bot
🌐 Node.JS Telegram translate bot
https://github.com/baitun/node-telegram-translate-bot
ecosystem nodejs pm2 telegram telegram-bot yandex-translate
Last synced: 3 months ago
JSON representation
🌐 Node.JS Telegram translate bot
- Host: GitHub
- URL: https://github.com/baitun/node-telegram-translate-bot
- Owner: baitun
- Created: 2018-09-30T08:12:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-27T14:14:50.000Z (over 1 year ago)
- Last Synced: 2023-11-27T15:33:01.062Z (over 1 year ago)
- Topics: ecosystem, nodejs, pm2, telegram, telegram-bot, yandex-translate
- Language: TypeScript
- Homepage: https://tele.click/justtranslate_bot
- Size: 284 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-telegram-translate-bot
Simple Telegram translate bot [@justtranslate_bot](https://tele.click/justtranslate_bot)
Just send to the bot a message in English and the bot will translate it into Russian or vice versa.
## How to start
```sh
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](https://tele.click/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:
```sh
NODE_ENV="dev" yarn start
```## Deploy with PM2
To deploy bot on server, edit [ecosystem.config.js](ecosystem.config.js) file and run:
```sh
pm2 deploy production setup
pm2 deploy production update
```
[Learn more about pm2 deploy](https://pm2.io/doc/en/runtime/guide/easy-deploy-with-ssh/)## Dependencies
- [yandex-translate](https://github.com/sidorares/yandex-translate)
- [node-telegram-bot-api](https://github.com/yagop/node-telegram-bot-api)## Contacts
If you have any questions, feel free to contact me via Telegram: [@savinyurii](https://tele.click/savinyurii)