This repository golang wrapper for Telegram Database Library. Contains docker build, web server and REST api interface for call C functions of tdlib.
Download latest release for your OS
Create Telegram Application and get
TELEGRAM_APP_ID
TELEGRAM_APP_HASH
After create Telegram bot and get TELEGRAM_BOT_TOKEN
set it to .env.
Locate it beside with binary
You must prepend install Docker Desktop.
git clone https://github.com/revilon1991/tg-parser.git
cd tg-parser
cp .env.dist .env
Create Telegram Application and get
TELEGRAM_APP_ID
TELEGRAM_APP_HASH
After create Telegram bot and get TELEGRAM_BOT_TOKEN
set it to .env
and run
docker-compose up -d
docker-compose exec go make
docker-compose exec go make install
INFO Build docker image it is long process. Wait ~40 minutes. You can see progress bar from terminal.
./tg-parser [command]
# or if installation with docker from source
docker-compose exec go go run cmd/tg-parser/main.go [command]
# API server
# You can see updates telegram from terminal.
./tg-parser run-server
# Fetch members id from channels
./tg-parser fetch-members
- /getMe Information your bot
- /getChannelInfo Information channel
- /getChannel Short information by channel id
- /getMembers Members by channel id
- /getUser Get user photo by photo id
- /getPhoto Get user photo by photo id
INFO
When you call end-point, api server must be running
channel_id
- get from database after invite bot to channel
photo_id
- get from/getUser
end-point