Open baldengineer opened 3 years ago
I've started playing with this, but I think we need to figure out the scoring system we want to use before I go too far, because depending on the range of possible scoring, can depend on who's on the leaderboard.
Moving to May, so we can have a discussion on scoring system before proceeding with this one.
Use to display results from mqtt topic
Appears the command server (the interface between the webserver and the bot) is currently a one way connection, and unable to extract data, at the moment. I have reached out to the framework creator to see if I'm correct.
So it's not looking like there's an easy way for the webserver to retrieve info from the bot directly... Alternatives
@geekbozu Data in stream/trivia/leaderboard
:{"squire0412": 805, "baldengineer": 159, "pigravity": 358, "bellum128": 499, "tisboyo": 172, "powahayeagle": 696, "anelysian": 486, "papabear_az": 790, "mredmakes": 192, "tmkdk": 162}
Contains the full winner listing
stream/trivia/winners
: {"second": {"name": "tisboyo3", "score": 43}, "first": {"name": "tisboyo", "score": 60}}
Mqtt command to show that row (first, second, third), sent when the bot wants that row to be made visible
stream/trivia/show_winner_position
:first
, second
, third
, values pulled from the places variable
Winner message sent to chat will be duplicated to stream/trivia/trivia_winner_message
Create a web endpoint with JSON string that returns a list of the usernames and points so far.
Initially, the OBS web object will be built locally. (and eventually moving it to the bot.)
Related to #175 I plan to say: "Let's see the trivia results!" There I'll show the leader board. At that point, I'll hit the
!trivia winner
command. So that gives me some time to build in the top 3 on-screen.