Skip to content
 
 

Repository files navigation

🤖 DeepL Translator Telegram Bot 🤖

Alt text

Build and Push Docker Image

DeepL Translator Telegram Bot created by @Doberman786.

Idea

The main idea of the project, to create a Telegram bot for easy and fast translation of text into different languages.

MVP Scope

For me as a user, I don't want to have to open a separate app or website every time I want to translate something I've read in Telegram in order to do that. I want to do it without leaving the app.

How it works

The Telegram user starts the bot by entering the /start command. After this command, the user will be saved to the database. Further communication with the bot occurs by means of commands, which can be seen by writing bot /help.

HowItWorksImage

Getting Started

Necessary parameters for running the bot

Generate Telegram API Token

To generate your own telegram token, you can use the BotFather and generate the bot's name and token. Otherwise, follow this instruction.

Generate DeepL API Token

To generate a token, follow this link

Insert tokens into the code

You need to put the tokens into the code by following these steps:

# Put your BOT_TOKEN here
bot.token=<YOUR_BOT_TOKEN>
bot.adminId=<YOUR_ADMIN_ID>
bot.name=<YOUR_BOT_NAME>
  • Replace authKey here
private static final String authKey = YOUR_AUTH_KEY // Put your DEEPL_AUTH_KEY here
  • build docker local image
docker build -t deepl_bot:v0.1 .

If you want to use your personal database, you will also need to change the appropriate fields in all of the above files.

Development

For development use docker-compose.yml file. Required software:

  • docker
  • docker-compose

You should run command:

docker-compose up [-d]

Technology Stack

  • Maven - Project build system.
  • Spring Boot - As a skeleton framework.
  • Hibernate - Communication with the database.
  • PostgreSQL - Database for storing registered users.
  • Docker - Containerization platform for packaging, distributing, and running the application consistently across environments.
  • AWS - Cloud services provider offering scalable infrastructure, storage, and database solutions to deploy and manage the application with high availability and performance.
  • Telegram API - Telegram API to interact directly with the bot. Access to all functions of the bot.
  • DeepL API - The DeepL translator API for implementing the translation function on a third-party service.

License

This project is Apache License 2.0 - see the LICENSE file for details

About

This repository contains source code written in Java using the Spring Boot framework, which is used to create a Telegram Bot that translates messages using the DeepL translator.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages