dariubs / iBot

Make your own bot based on regex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


Languages

Language:Ruby 100.0%