Skip to content
forked from 39bit/spoilerobot

The source code for the Spoiler-o-bot, a Telegram spoiler creation bot

License

Notifications You must be signed in to change notification settings

udf/spoilerobot

 
 

Repository files navigation

spoilerobot

The source code for the Spoiler-o-bot, a Telegram spoiler creation bot You can try it out by typing @spoilerobot (inline) in Telegram

Usage

  • Setup PostgreSQL on your system

  • Create a user and database for the bot by becoming the postgres user and executing

    $ createuser spoilerobot
    $ createdb spoilerobot
    $ psql
    postgres=# GRANT ALL PRIVILEGES ON DATABASE spoilerobot TO spoilerobot;
    postgres=# \c spoilerobot postgres
    You are now connected to database "spoilerobot" as user "postgres".
    postgres=# GRANT ALL ON SCHEMA public TO spoilerobot;
    postgres=# \password spoilerobot
    [enter a password for the bot's database user]
    
  • Store this password in the db_pwd environment variable (or modify config.py)

  • Put your bot token in a file called token.txt

  • Edit the environmental variables inside shell.nix

  • Enter development shell with nix-shell

  • Run the bot with python spoilerobot.py

About

The source code for the Spoiler-o-bot, a Telegram spoiler creation bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 97.8%
  • Nix 2.2%