Giter Club home page Giter Club logo

lillybot's Introduction

#Image of LillySatouLillyBot

Welcome to Lillybot! I am a Twitch.TV bot written in Ruby. I respond to a number of commands, will participate in conversations based on various keywords and will even play games. A list of commands/interactions are available below.


##Installation

  1. Ensure you have Ruby installed. You can check with whereis ruby or ruby -v
  2. Fork the repo
  3. Make a branch: git checkout -b [new-feature-or-whatever]
  4. Install Bundler: gem install bundler
  5. Install dependencies using bundler: bundle install
  6. Add your details into a json file as described below
  7. Run using ruby lillybot.rb

##Configurations

Update the auth.json file in the configs/ directory. This will be detected by the bot and used to log in.


##Dependencies

###Software Tools

  1. Ruby
  2. Bundler

###Gems 3. A modified version of Twitch-chat (stored locally in libs folder, originally by EnotPoloskun) 4. Activesupport 5. Eventmachine 6. Rufus-Scheduler


##Commands Quicklist

Here's a quick list of example commands to get you started. You can play around with Lillybot on my twitch channel in the chat at any time. Most commands and keywords will allow for slight variants to help promote

###Commands

Command Function
!time Returns the current time in Melbourne, Australia
!feels Gives a short description of where Lilly's from
!banme Bans the user for 1 second
!quote Generates a random quote from Kawata Shoujo
!mycreator Tells you who created the Lillybot

###Keywords

Command Function
Hello/Hey/Hi Lilly Lilly greets you
How are you, Lilly? Lilly tells you how she is
Lily You spelt Lilly wrong and she notices
Right Lilly You ask Lilly's opinion
FrankerZ Lilly loves dogs

###Games

Command Function
!slots Play slots with Lilly!
!chance Play a game of chance. Don't get 3!
!guessinggame Guess the number!

###Complete List (With Todos)

Commands for each plugin can be found on the respective plugin's README file. See the plugins folder folder for bundled plugins.

Upcoming commands can be found here


##Hosting

LillyBot is currently hosted on a DigitalOcean Droplet. Setting up a droplet is very easy and a good way to host your bot. It does cost $5 a month for the smallest option (unless you are really dedicated and like to create/destroy droplets for the 0.007c per hour option) but to have your bot available at any time, it's a valueable option!

I've set up my droplet with Ubuntu 15.10 x64, 512MB memory, 1 CPU, 20GB SSD and 1000GB transfer. I also like to use oh-my-zsh for some handy shortcuts with git. Vim is also a great option for quick edits but can be complicated for beginners. In this case, I'd suggest doing your edits on your local machine and pushing them up to the server.


##Adding Commands

For any simple commands such as !mycreator, you can easily add these to the JSON file. Lillybot refers to a commands.json file for these simple commands.

The format for JSON is:

{
    "!command1" : "Response",
    "!command2" : "Response 2"
}

For more complex commands or responses, such as those that use Regular Expressions, you will need to add those to the case statement in the Lillybot.rb file.

case message
    when /Lilly/i && /\Ah(i|ello|ey)/i then
        say_hello(user, message)
    when /MaiWaifu/ then
        send_message "MaiWaifu"
    when /\A!\S*touch\Z/i then
        be_touched(user)
end

lillybot's People

Contributors

stephwestgarth avatar theoriginalbit avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.