Skip to content

Commit 24f1ed7

Browse files
committed
Update README.md
1 parent 71e971f commit 24f1ed7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ to their friends. As soon as all their friends bought their ticket, they should
1111
distribute it to another member.
1212

1313
This bot simplifies this process by automating parts of it. A yaml file serves as a database, containing a mapping
14-
of vouchers and member accounts.
14+
of vouchers and member accounts. Optionally, you can enter a number of persons, so you are able to estimate how
15+
long the voucher will be on it's way.
1516

1617
## Features
1718

@@ -24,11 +25,17 @@ of vouchers and member accounts.
2425

2526
Python 3.7 required (TODO: require 3.8 to be able to use TypedDict eventually)
2627

27-
Copy `example_voucher.yml` to `voucher.yml`. Enter your vouchers. Make a backup of this file (we do not make one for
28+
Copy `example_voucher.yml` to `voucher.yml`. Enter your vouchers and their owners. Make a backup of this file (we do not make one for
2829
you and we **WILL** modify this file. Don't cry if something get's lost).
2930

3031
Open `constants.py` and change `VOUCHER_TABLE_POST_ID`. This post will be constantly updated with the table of members
3132
who currently own a voucher.
3233

3334
pip install -r requirements.txt
34-
DISCOURSE_API_KEY=deadbeef python src/app.py --dry # leave out --dry if you are brave
35+
DISCOURSE_API_KEY=deadbeef python src/app.py --dry # leave out --dry if you are brave
36+
37+
The script will send a message with a voucher to each person who is in `voucher.yml`. It will save the Discourse topic
38+
id in the file as `message_id`, so it won't send the same message twice.
39+
40+
If a user replies to that message, the script will scan for the string `CHAOS[a-zA-Z0-9]+` in their messages. If it
41+
finds a new voucher, the old voucher in the yml file get's replaced by the new one and all other fields will be reset.

0 commit comments

Comments
 (0)