examples/bot.rb in scamp-0.0.1 vs examples/bot.rb in scamp-0.0.2
- old
+ new
@@ -1,14 +1,14 @@
#!/usr/bin/env ruby
$:.unshift File.join(File.dirname(__FILE__), '../lib')
-require 'Scamp'
+require 'scamp'
-scamp = Scamp.new(:api_key => "YOUR API KEY")
+scamp = Scamp.new(:api_key => "YOUR API KEY", :subdomain => "37s")
-Scamp.behaviour do
+scamp.behaviour do
# Match some regex limited to a channel condition based on a channel id
match /^channel id (.+)$/, :conditions => {:channel => 401839} do
# Reply in the current channel
say "Match some regex limited to a channel condition based on a channel id"
end
@@ -71,6 +71,6 @@
say "multi-condition match"
end
end
# FIXME: this does if the channel doesn't exist. Need a better error.
-scamp.connect!([293788, "Monitoring"])
\ No newline at end of file
+scamp.connect!([293788, "Monitoring"])