Created
October 15, 2016 23:41
-
-
Save dariubs/a2c4d5cb3e41c332a954b53b6de75fbc to your computer and use it in GitHub Desktop.
ibot gem simple example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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