Florence Bot

View Site →

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.

Florence Bot Home

Home

Gives quick access to the main public features

Florence Bot Game Donation

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.

Florence Bot Game Redemption

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!

Florence Bot Clip Submission

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.

Florence Bot Commands

Commands

A public view of what commands are available in the chat bot.

Giveaway Wheel

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.

Florence Bot Admin Dashboard

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.

Florence Bot Giveaways

Giveaways

Giveaways are started from chat when a moderator types !flogiveaway. This starts a timer of 2 minutes. When someone types !enter, it checks if they are a follower and if so, they are then entered into the giveaway. Once the 2 minute timer is up, it announces in chat. Tier 2 and Tier 3 subscribers are also automatically entered into the giveaway upon it starting.

Giveaways are also 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!

Florence Bot Commands

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.

Florence Bot Buy Links

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.

Florence Bot Counts

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.

Florence Bot Clips / Tweets
Florence Bot Clips / Tweets Approve

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.

    Technologies Used:

  • Rails 6
  • Cinch
  • HAML
  • Pusher
  • Twitch API
  • Twitter API
  • AWS S3

Want something like this built for you? Contact me for a quote.