From 29f717026385be3b9b9e2acd51cc395330ec5579 Mon Sep 17 00:00:00 2001 From: Cory Alder Date: Sun, 5 Jan 2025 12:13:10 -0800 Subject: [PATCH] add more info to the readme with an example raffle post --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fa022da..bd8081d 100644 --- a/README.md +++ b/README.md @@ -1 +1,26 @@ -# raffle \ No newline at end of file +# VHS Discourse RaffleBot + +This bot takes a post with a number of polls, and runs randomness on it to generate a list of raffle winners, then posts that list in a reply to the original post. + +On Discourse, post a poll like so: + +``` +[poll type=multiple results=always min=1 max=3 public=true chartType=bar close=2025-01-04T23:00:00.000Z] +* 1 x Raffle Item One +* 2 x Raffle itme two (there are two of this thing available) +* 10 x Widgets +[/poll] + +[poll type=multiple results=always min=1 max=2 public=true chartType=bar close=2025-01-04T23:00:00.000Z] +* 5 x Raffle section two item one +* 1 x Raffle section two item two +[/poll] +``` + +To run the RaffleBot as a github action, you need: + +1. permission to run github actions on this repo +2. the raffle post's topicID - e.g. talk.vanhack.ca/t/raffle-welcome-to-2021/11292/18 the ID is 11292 +3. an action `print-nice`, `dump-raw-object`, `dump-base64-picked-object`, `post-data-to-topic`, `post-winners-to-topic`, `print-raw-data-post`, or `print-raw-winners-post` + +To run the rafflebot locally, you need a everything above, plus a discourse api key.