Last night was one of the best yet, thanks to the Bosman v Wozniak: Original Soundtrack.
@tapioks I am really digging this track. I've been using it during my own Tetris sessions and it's so lovely. Great work.
You have induced a terrible journey in me.
I've added a bot for submitting songs.
"!song ..." submits a song.
"!picksong" picks a random song (and removes it from the list).
"!resetsongs" resets the song submissions.
Only one song per user is allowed, but your song can be updated by submitting another. Only channel moderators can pick and reset songs.
I modified and extended the bot since the last show. I will use this post to keep an up-to-date description of the bot's commands.
The most important change is that commands can now be whispered to the bot using Twitch's whisper feature (e.g. /w SoundtrackBot !mysong). If you whisper a command the bot will reply with a whisper, reducing the level of bot spam in the main chat potentially to zero. You can still post commands to chat to have the response posted in chat.
The bot is always online. You can submit songs at any time, including during the week. Songs will be persisted indefinitely until a moderator explicitly deletes them.
The bot respects Twitch's rate limit for posted messages. However, Twitch applies a different and undocumented set of spam detection rules to whispers. It might happen that the bot gets temporarily shadowbanned from using whispers. In this case, it will still be able to receive commands via whispers but won't whisper a response back. Commands in main chat are unaffected by this. The bot also avoids posting the same message twice in a row If you're not getting a response to a command, you probably have triggered one of these anti-spam-detector counter measures.
!song http://...: Submits a song. Every user can only have one song. Submitting another song will overwrite your previous submission.
!song: Updates the submission date of your existing song. This is equivalent to resubmitting your currently submitted song. Use this to confirm that your song is still up-to-date in case a moderator chooses to delete old songs.
!currentsong: Will post the last picked song.
!mysong: The bot will whisper you the song you've submitted. This command has to be whispered to the bot. It will be ignored if posted in main chat.
!mysongsucks: Your song will be removed from the pool.
!songinfo: Will post the current number of submitted songs.
!songhelp: Will post a short list of available commands.
!davidwise: Posts a random song from David Wise from a fixed list of his songs. Moderators can use the command in main chat. Regular users can only whisper it.
!picksong: Randomly picks a song from the pool of submitted songs. The song is then removed from the list. The song is posted to chat if the command was sent to chat or whispered as a reply to the moderator if the command was whispered to the bot.
!favorite: Will add the last picked song to a list of favorite songs.
!favorite http://...: Will add a song to a list of favorite songs.
!pickfavorite: Randomly picks a song from the list of favorite songs. The song is posted to chat if the command was sent to chat or whispered as a reply to the moderator if the command was whispered to the bot. The song will not be removed from the list.
!currentsong on/off/restricted Will enable, disable or restrict the !currentsong command. When restricted the !currentsong command cannot be used for three minutes after a song has been picked.
!deletesongs 7 days: Will delete all songs older than the given number of days. (7 in this example).
!deletesongs all: Will delete all songs.
!davidwise: Posts a random song from David Wise from a fixed list of his songs.
@ElTorro once Bosman beats the Woz in three weeks time (calling it), can you post the !davidwise list? I'd love to see what you deemed to be essential!
@ElTorro Is it possibly to make it so anyone can use !davidwise ? It's just too good of a command. If necessary limit it to whispers for non mod plebs.
@Olf_Himself Done. Everyone can use !davidwise now. Moderators can use it in the main chat. Regular users can whisper it.
@tapioks ive just discovered this thread and making my way through your soundcloud now.
Added some new things. The !currentsong command can now be restricted or disabled with !currentsong off and !currentsong restricted.
I'd also suggest that we delete old songs regularly to give current viewers of the show a better chance to have their song picked. But that's up to Kyle!
in case the betting bot is still offline next week, I cleaned up and improved the betting feature in SoundtrackBot that I improvised for today's stream.
!bet 123456: Places a bet. The score you bet on has to be greater than 0. Obviously, every user can only place one bet at the same time, but you can update your bet.
!betinfo: Posts the number of placed bets.
!bethelp: Posts a short list of available betting-related commands.
!openbets: Opens the bets! This command needs to be posted for the bot to accept bets. Otherwise the bot will just silently ignore them. It also clears all bet submissions if the last betting round is older than three hours.
!closebets: Closes the bets. The bot will not accept new bets afterwards.
!clearbets: Closes the bets and clears all bet submissions.
!score 123456: Posts the winning bet (or multiple winning bets if multiple persons are equally close to the final score). Whisper this command to the bot to hide the response from chat.
tonight the bot has been temporarily shadow-banned for 24 hours from posting whispers. This happens when Twitch's anti-spam system kicks in. Unfortunately, Twitch does not publish the rules of that system. Modding the bot might help, but that's only a guess.
In any case, if that happens the bot will still read all commands and will still be able to post messages in chat . So the fallback solution in this case is to post commands like !picksong in main chat.
If I am present during the stream, I will reconnect the bot with one of several fallback accounts that I've prepared for situations like this.
A good part of the bot's code already only implements several rate limiters to avoid this. I added an additional rate limiter that will restrict the number of different, non-moderator users that can receive whispers from the bot to 15 different users per hour. Important moderator commands like !picksong will bypass that limiter. Hope that helps.
Description of what your bot does with whispers: the bot manages song suggestions and high score bets. Viewers can whisper commands to the bot and have him whisper back their currently suggest song, their current bet, and general statistics.
How many whispers an hour, and day you send: during a stream the bot serves several hundred viewers and may send between 100 and 500 whispers or more.