Skip to content

Instantly share code, notes, and snippets.

@dariubs
Created October 15, 2016 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dariubs/a2c4d5cb3e41c332a954b53b6de75fbc to your computer and use it in GitHub Desktop.
Save dariubs/a2c4d5cb3e41c332a954b53b6de75fbc to your computer and use it in GitHub Desktop.
ibot gem simple example
require 'ibot'
bot = IBot.new('mybot')
bot.add_group 'greeting'
bot.add_group 'goodby'
bot.add_pattern 'greeting', /hi/i
bot.add_pattern 'greeting', /hello/i
bot.add_response 'greeting', 'Hello.'
bot.add_response 'greeting', 'Holla.'
out = bot.response bot.text_group 'Hello, world!'
puts out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment