GithubHelp home page GithubHelp logo

nessshon / gtranslator-bot Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 16 KB

Telegram bot translator, based on Google Translate.

Dockerfile 1.27% Python 98.73%
aiogram bot python telegram-bot translator

gtranslator-bot's Introduction

๐Ÿค– Google Translator Bot

Telegram bot translator, based on Google Translate.

Bot example: @nGTranslatorBot

Requirements

  • Python 3.10 and above.
  • Systemd or Docker.

Usage

Clone this repo via link

git clone https://github.com/nessshon/google-translator-bot

Go to the project folder

cd google-translator-bot

Create environment variables file

cp .env.example .env

Edit environment variables in .env

nano .env

Launch using Docker

  1. Install docker and docker compose

  2. Build and run your container

    docker-compose up -d

Launch using systemd

  1. Create a virtual environment

    python3.10 -m venv env
  2. Activate virtual environment

    source env/bin/activate
  3. Install required packages

    pip install -r requirements.txt
  4. Check if the bot is running

    python -m app
  5. Set WorkingDirectory to the path to the project folder.

    nano telegram-bot.service
  6. Copy telegram-bot.service to /lib/systemd/system/

    sudo cp telegram-bot.service /lib/systemd/system/google-translator-bot.service
  7. Enable autostart on boot

    sudo systemctl enable google-translator-bot.service
  8. Launch Bot

    sudo systemctl start google-translator-bot.service

Environment variables reference

Variable Type Description
BOT_TOKEN str Token, get it from @BotFather
USE_REDIS bool Set to True if you are using Redis
REDIS_HOST str Set "redis" if you will be using docker

gtranslator-bot's People

Contributors

nessshon avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.