telegram-moderator/README.md
2018-01-30 16:28:00 -07:00

1.1 KiB

Telegram Group Chat Logger

This is a bot that logs public Group Chats to a Postgres Database.

Installation

  • Required: Python 3.x, pip, PostgreSQL
  • Clone this repo
  • pip install --upgrade -r requirements.txt

Telegram Bot Setup

export TELEGRAM_BOT_TOKEN="4813829027:ADJFKAf0plousH2EZ2jBfxxRWFld3oK34ya"

Database setup

  • Store database URL in environment variable.
export TELEGRAM_BOT_POSTGRES_URL="postgresql://<user>:<password>@localhost:5432/<databasename>"
  • Run: python model.py to setup the DB tables.

Running the bot

  • Run: python bot.py to start logger
  • Messages will be displayed on stdout as they are logged.