Telegram бот для постинга записей в каналы, где бот находится или в личку.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Vladimir Smagin fcd61290ae fix 3 months ago
helpers import 1 year ago
Dockerfile use proxy 3 months ago use proxy 3 months ago
docker-compose.yml use proxy 3 months ago fix 3 months ago
requirements.txt use proxy 3 months ago
run use proxy 3 months ago use proxy 3 months ago
telegram-post-bot.service import 1 year ago


This is my Telegram bot that can accept messages in JSON from port or socket file and forward to group, channel or private person.

Register new bot and get token with @BotFather bot or may be you already did it.

Deploy as old man

Best results if you run it in Docker container, but if you want some sex...

>$ python3 -m venv telegram-post-bot
>$ source telegram-post-bot/bin/activate
>$ pip install --no-cache-dir -r requirements.txt

Now change path in telegram-post-bot.service to actual and install it to systemd.

Deploy in Docker

Start your new container:

docker run -p 4521:4521 -e BOT_TOKEN="some token" \
    -e BOT_PROXY=socks5:// \
    -e SENTRY_DSN= \

Remove proxy and\or Sentry if you dont need it.

Now test it:

>$ ./ 20823278 "test title" "message body"
[{"state": "ok", "result": {"chatID": "20823278", "message": "test title\n\nmessage body"}}]

change 20823278 to your chat ID.

Sample alert script for Zabbix here