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 ba68d01c9b Изменить '' 1 year ago
helpers import 1 year ago Изменить '' 1 year ago Изменить '' 1 year ago
requirements.txt import 1 year ago
run import 1 year ago
telegram-post-bot.service import 1 year ago


Telegram bot to forward anything from socket file (or port if you change few lines) to Telegram channel, group or person chat.

Requires python 3 libs:

  • wheel
  • python-telegram-bot
  • raven (if you using Sentry)

Best results if you install it to venv.

Sample alert script for Zabbix

See more here

source /etc/profile

json_escape () {
    printf '%s' "$1" | python -c 'import json,sys; print(json.dumps("\""))'

post_title=$(json_escape "$1")
post_body=$(json_escape "$2")

echo "{\"chatID\":\"${chat_id}\",\"message\":\"${post_title}\n\n${post_body}\"}" | nc -U /run/telegram-GrapeBlessedBot.sock

You can also use Docker image