Skip to content

ayaka14732/telegram-translate-bot

Repository files navigation

telegram-translate

Telegram translation bot @suginatransbot

Develop

Create a bot by talking to BotFather.

Register for Baidu translate API.

Run

Set the following environment variables in .env:

  • BOT_TOKEN
  • BAIDU_APP_ID
  • BAIDU_APP_KEY

Run:

python main.py

Alternatively, pass the environment variables to Docker in the command:

docker run -d \
  -e BOT_TOKEN=<BOT_TOKEN> \
  -e BAIDU_APP_ID=<BAIDU_APP_ID> \
  -e BAIDU_APP_KEY=<BAIDU_APP_KEY> \
  telegram-translate