Skip to content

Telegram bot for the lazy translation through the Google Translate API

License

Notifications You must be signed in to change notification settings

nezorflame/lazytranslate-tg-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lazytranslate-tg-bot Build Status Go Report Card FOSSA Status

Telegram bot for the lazy translation through the Google Translate API.

Usage

Either

  1. Create .env file... OR
  2. Export env variables...

...according to the example.env:

Env variable Type Mandatory Default value Description
GOOGLE_APPLICATION_CREDENTIALS string Yes - Google Translate API credentials, see more here
LAZYTRANSLATE_TG_WHITELIST string (comma-separated []int) Yes - List of Telegram user IDs
LAZYTRANSLATE_TG_TOKEN string Yes - Your Telegram bot token
LAZYTRANSLATE_PROXY_ADDR string No - Proxy address URL (skipped if URL is empty)
LAZYTRANSLATE_PROXY_USER string No - Proxy username (required if URL is not empty)
LAZYTRANSLATE_PROXY_PASS string No - Proxy password (required if URL is not empty)
LAZYTRANSLATE_DEFAULT_LANG string No 'en' Default language for translations
LAZYTRANSLATE_UPDATE_TIMEOUT int No 60 Timeout for Telegram updates (in seconds)
LAZYTRANSLATE_RESPONSE_TIMEOUT time.Duration No '1m' Context timeout (for bot operations)

Installation

Bot requires Go 1.11+ as it's using Go modules as a dependency management tool:

export GO111MODULE=on
git clone https://github.com/nezorflame/lazytranslate-tg-bot.git
cd lazytranslate-tg-bot
# create env variables
# or edit .env file:
# cp example.env .env && nano .env
go build
./lazytranslate-tg-bot

License

FOSSA Status

About

Telegram bot for the lazy translation through the Google Translate API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages