Yet another Wahrheit-oder-Pflicht ("truth or dare") bot for Telegram, because all the others suck.
The existing bots are all defunct or incomplete. So I wrote my own.
$ # Install Python3 somehow
$ pip3 install --user -r requirements.txt
That should be it.
- Copy
secret_template.py
tosecret.py
- Create your bot
- This means you have to talk to the
@BotFather
: https://web.telegram.org/z/#93372553 - Do
/newbot
, edit it as much as you like (i.e. description, photo) - For the commands, see
bot.py
, functioncmd_start
. - Invite him into the group chat(s) you like
- Afterwards, set the bot to "Allow groups: No"
- Copy the API token
- This means you have to talk to the
- Fill in your own username and the API token in
secret.py
- Run
bot.py
. I like to run it as./bot.py 2>&1 | tee bot_$(date +%s).log
, because that works inside screen and I still have arbitrary scrollback. - Write
/permit
into the chat to allow games. Use/admin
to view all the commands you have. - You can Ctrl-C the bot at any time and restart it later. The state is made permanent in
wopper_data.json
Not much, maybe add more message variants?
Here are some things this project will definitely (probably) not support:
- Complex D&D-style roll syntax
- Any advanced parsing
- Any further control of the game
Feel free to dive in! Open an issue or submit PRs.