Telegram bot for controlling spam, logging, and more
Go to file
Stan James 534f2cbd3e Fixing `Error R10`
The fix: https://stackoverflow.com/a/40356341/59913
2018-01-31 08:30:07 -07:00
.gitignore Cleaned up README and moved config info out of version control 2018-01-28 22:29:50 -07:00
LICENSE Initial commit 2018-01-25 19:51:46 -07:00
Procfile Fixing `Error R10` 2018-01-31 08:30:07 -07:00
README.md Deleted unused config and updated README 2018-01-30 16:28:00 -07:00
bot.py Moved database uri to env var 2018-01-30 16:23:53 -07:00
model.py Fixed print() to python 3 standard 2018-01-30 16:44:44 -07:00
requirements.txt Cleaned up README and moved config info out of version control 2018-01-28 22:29:50 -07:00

README.md

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.