Skip to content

dariubs/iBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iBot Build Status

Make simple bots with ruby.

Install

gem install ibot

Usage

  1. Create new bot
bot = IBot.new('mybot')
  1. Create some group
bot.add_group 'greeting'
bot.add_group 'goodby'
  1. Define some patterns for each group
bot.add_pattern 'greeting', /hi/i
bot.add_pattern 'greeting', /hello/i
  1. Define some response for each group
bot.add_response 'greeting', 'Hello.'
bot.add_response 'greeting', 'Holla.'
  1. Response to text
bot.response bot.text_group 'Hello, world!'

This example gist

Author

Dariush Abbasi < @dariubs >

License

MIT

About

Make your own bot based on regex

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages