Handmade Hero»Forums»Game
Andrew Chronister
194 posts / 1 project
Developer, administrator, and style wrangler
HH Stream Bot Discussion Thread
Edited by Andrew Chronister on
Those of you who tune into the twitch chat during streams have probably noticed by now that there is a robot among us. Luckily, he's a beneficent robot, dedicated to helping answer those repetitive questions (but really, why does Casey wear those wrist braces??) and addressing common needs of the twitch chat (how long until the next stream???).

That being said, he was also thrown together in about 3 hours last Wednesday and needs to continue evolving to become the best 'bot he can be! I can continue working on and improving him, but I need some things from you, the community.

1) Suggestions! These can be commands you want to see available, features that would be good or necessary to have, or complaints about how weighted his RNG is.

2) A whitelist of people who can use most or all of the bot's functions during the stream. We saw from the !random incident that some of the more easter eggy commands are subject to a bit of (unintentional) spamminess while there's hundreds of people in the chat, so at least some will need to be turned off to the general public while it's in full swing.
-- Note: there is some spam-prevention built in, as both twitch and the bot itself prevent duplicate messages from being sent over too fast an interval.

2A) A list of commands we definitely want available during the stream, to anyone who's available to trigger them.

3) Contributions: Please, create pull requests and issues at the GitHub repo! I will need some support in maintaining this bot and adding all the functions we think will be good for FAQ and other purposes.

I'm going to be looking at ways to automate deployment from the git repo (right now I have to manually restart every time I push, ugh!) and potentially host him somewhere in the cloud so he's no longer confined to the mortal coil of my little raspberry pi over in the corner. To further decouple him from my potentially inadvertently restrictive ownership, I might take suggestions for alternate names (twitch accounts are cheap!)

Cheers,
ChronalDragon

Update: As of 12/24/2014, the bot now goes by hmh_bot in the twitch chat! If you have any suggestions or comments about the name, post them here.
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
HH Stream Bot Discussion Thread
I love the robot, but as I don't really see the stream chat since I have to concentrate on coding, I don't have much in the way of suggestions. But if I can be of any assistance, please let me know, like if you need me to write answers to questions for the bot's library or something!

- Casey
Tod Hansmann
10 posts
Just a guy
HH Stream Bot Discussion Thread
I can help maintain the code. The bot answers are great, and we just need to do something about the overlapping answers. I saw some confusion about which answer to pick for a given question when they were related. Probably more effective to make those easy to remember by separating them clearly.

We could also use the bot code to funnel into a web tool of some sort for the question/answer period if need be. I can help integrate the bot into a Pyramid or Flask app for logging and/or for question queueing if we'd like. We could then make the chat fully logged and searchable too if we want. If we need a stable 24/7 host, I have a colocated server it could sit on.

Deployment should be a simple matter of devops architecturing. Define how exactly you want it to work and we can be more specific on advising how to go about it?
HH Stream Bot Discussion Thread
I'm happy to help, as soon as you post the .py
Dustin Specht
12 posts
HH Stream Bot Discussion Thread
Happy to help as well.
Max
1 posts
[witty text]
HH Stream Bot Discussion Thread
Edited by Max on
nvm, will do this on GitHub :lol:

Will update with more commands whenever I see we should add something.

I recommend these commands:

!shame or !owl - notify Casey/chat of a mistake
!support - how to support Handmade Hero
HH Stream Bot Discussion Thread
Edited by iamdefinitelybatman on
Casey doesn't read the chat while he's talking, and shame sounds mean. It would be better to say owl or mistake.

Casey picks up 99.9% of his errors.

Plus, I wouldn't want people firing mistakes when they're really not. Might make them trigger-happy.

I do like !support.
Andrew Chronister
194 posts / 1 project
Developer, administrator, and style wrangler
HH Stream Bot Discussion Thread
Edited by Andrew Chronister on
Okay, I've put the code up on github:

https://github.com/Chronister/ChronalRobot

To contribute, create pull requests and github issues! If certain people are contributing a lot, I'll add them as registered contributors to the repo ;)

(For a reference on the bot framework, see http://willie.dftba.net/ )

In terms of deployment, here's what I'd like, ideally:
- Bot can run 24/7 (doesn't necessarily have to). Should definitely be able to be turned on at short notice
- Should pull down latest code from github once a day OR on demand
- Environment needs to support python 3 (for obvious reasons)

Beyond that, I have no huge constraints. As long as it's reasonable to deal with, anything works.

(For reference, I'm currently running her on a raspberry pi at home)
Andrew Chronister
194 posts / 1 project
Developer, administrator, and style wrangler
HH Stream Bot Discussion Thread
Some recent updates:

itsuart2 decided to create a test twitch account for his bot, which he happened to name hmh_bot. I felt this was probably more appropriate given the functions which the bot has begun to encompass, so the default username and oauth is now on that account. Look for "hmh_bot" in chat now! (You might see chronalrobot around once and a while for testing or fun purposes)

We've now had code contributions from 3 different people. Thanks a lot for the help, guys. I added a !credits command on the bot with the twitch and github names of the contributors.

The schedule is being kept in a database now, and it will be pushed around with the source code. Right now I'm running the main instance of the bot, but if anyone else takes up that mantle, be sure to commit changes to handmade.db every once in a while.

Once again, thanks for all the help and support! And thanks to Casey for appreciating the bot in prestream q&a ;)
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
HH Stream Bot Discussion Thread
It there anything I could do that would help centralize where the schedule is, so that perhaps I just update it in one place and then it can be read by the bot, etc.?

- Casey
Andrew Chronister
194 posts / 1 project
Developer, administrator, and style wrangler
HH Stream Bot Discussion Thread
cmuratori
It there anything I could do that would help centralize where the schedule is, so that perhaps I just update it in one place and then it can be read by the bot, etc.?

- Casey


Yeah actually -- I don't know how much work this would be on your end, but if you could add a JSON or XML output that was accessible at like handmadehero.org/schedule, the bot could read that and update at regular intervals.

Don't feel too much pressure to do that, though, because it's pretty easy to update at the moment anyway.

Note: For anyone else on the admin list (abnercoimbre, garlando, and the github contributors), just use !schedule <day> <time> and it will update the stream time for that day. To check that it was set properly, use !schedule <day>.

Thanks for offering!

Also, Casey, there was some discussion the other day about whether or not a filtered list of Q&A questions would be useful to you. Are you finding you have to mentally filter out a lot of questions? Do you think it would be useful or detrimental to have someone actively greying-out/responding to already answered questions?

Obviously the bot takes care of a lot of the more common ones already, but if they're asked with the Q&A keywords they still end up on your list. And sometimes you answer them anyway and make interesting additions. So we thought we should get your opinion before going anywhere with a more complex system.
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
HH Stream Bot Discussion Thread
Edited by Casey Muratori on
Yes, I can totally make a URL specifically for retrieving machine-readable schedule information. I want to make something that automatically tweets the schedule anyway, since right now I am manually doing that and it is annoying :( So I'll do that all in one pass.

As for the questions, it's really only a problem on days when we end up on the Twitch front page, it seems. On those days I think we get a lot of people who aren't familiar with the stream and how the Q&A works, and then there are 20 questions like "WHAT LANGUAGE IS THIS?" for every one question about something we actually did.

I have a thing on my end which reads the questions off IRC and presents them to me one at a time, so it's not a huge deal, but it does make things a little crunky when I have to sit there reading through 20 questions to get to one that's actually legit, as opposed to non-front-page days when almost every question is legit.

Not sure if any of this is a problem, though, just trying to give some perspective on what it feels like from where I'm sitting :)

- Casey
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
HH Stream Bot Discussion Thread
So, the broadcast schedule is now available in machine-readable form for testing here:

http://handmadehero.org/broadcast.csv

Please let me know if this is workable or if changes need to be made.

- Casey