Florence Bot is a project I've been working on over the last year. It's a Twitch chat bot and giveaway system with many features, built from scratch for a couple streamer called Fremily (Fred & Emily). You should check them out!
They regularly give away game codes during stream but the system they had was very manual and sometimes there were mistakes when sending game codes to winners or when drawing winners. They were also looking to move away from the chatbot & donation service they were using so needed an alternative.
Here's where Florence Bot comes in.
It's built from scratch using Ruby on Rails as the web framework and Cinch as the IRC chat client framework.
It's hosted on a Hetzner VPS, uses a MySQL database backend and Amazon S3 for storing some assets.
Home
Gives quick access to the main public features
Game Donation
The game codes given away are mostly purchased by Fred and Emily but anyone from chat can submit any spare game codes they have. These are then kept in the database and added to the giveaway wheel.
Game Redemption
The old way of moderators or Fremily sending out won codes was manual and flaky because it was using the Twitch whisper system. After a recent stream where mods had to try and give out over 300 game codes to winners, I thought of a better way of doing this. Users can now login and easily redeem their own codes! I'm really happy with how well this works and it's saved so much time!
Clip / Tweet Submission
Twitch Clips can be submitted to the bot for them to be tweeted out on the @FremilyClips Twitter account. Clips have to be approved by mods or Fremily before they are tweeted out. I built the initial version in an hour after Fred mentioned it on stream. This is another feature which I'm really happy with how well it works.
Commands
A public view of what commands are available in the chat bot.
Giveaway Wheel
The wheel is created as an OBS browser source. It is controlled from chat
by any of the mods typing !wheel username
. This uses Pusher to
send a request to the OBS source. Once a game has been won from the wheel,
the game is marked as won in the admin and is linked to the user who won it.
Admin Area
The Dashboard shows a quick overview of the number of games, giveaways and commands. It also shows the 10 recently won games so moderators can quickly see what games have been sent to winners.
Giveaways
Giveaways are automatically started when a Tier 3 subscription happens or when someone gifts 5+ subscriptions to the community. If there is a giveaway already started, it also queues them up. I'm really happy with how well this works!
Commands
Commands are very useful in chat. Maybe someone wants to check the
!specs
or maybe a mod needs to tell someone that
this stream is !english
only. They can be added or changed
from here. There is also a 10 second timeout to prevent the same command
being used more than once in that timeframe.
Buy Links
Fremily are partnered with HumbleBundle which means them and their
charity of choice, SpecialEffect, get a small kick-back when a game
is purchased with their partner details in the link. This feature
adds the required partner and charity details to the end of the
HumbleBundle links and allows a user to type !buy
in chat
to get a link.
Counts
Counts can also be useful in chat. Want to count how many times you die in a certain game? Moderators have access to custom commands for each count to add or remove a set number from the count.
Clips / Tweets
This is the admin area for the Twitch Clip / Tweet submission. It allows mods and Fred/Emily to edit, approve and send tweets.