spoilerobot
spoilerobot copied to clipboard
The source code for the Spoiler-o-bot, a Telegram spoiler creation bot
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_pwdenvironment variable (or modifyconfig.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