Skip to content

A Telegram bot that automatically translates all messages to or from a target language using Google Translate

License

Notifications You must be signed in to change notification settings

v1nsai/the_interpreter_bot

Repository files navigation

License: GPL v3 Python Docker Telegram dependabot auto-merging

The Interpreter: A Telegram Bot

Prerequisites

Create a Telegram bot

  • Create a telegram bot by following the instructions here.
  • Disable privacy on the bot to allow it to see the contents of your chat using /setprivacy disable
  • Create a file called bot_token in the project root and add your telegram bot's API token to it.

Create a Google project and service account

  • Create a Google project that uses the Translate API, the starting point can be found here..
  • Create a service account with permission to use the Translate API, and create an API key. Download the JSON file to the project root and call it google_key.json.

Create group chats to use your bot (groups must be whitelisted before use)

  • Create a Telegram group chat that you want to invite your bot to. Invite @getidsbot to the chat, and it will immediately give you lots of info, including the group chat ID. Add that ID and any others you want to talk to your bot in to a file called allowed_ids at the project root. One ID per line.

Installation

Once you've set up the bot_token, google_key.json and allowed_ids files, run docker compose up -d --build to bring it all online

About

A Telegram bot that automatically translates all messages to or from a target language using Google Translate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published