script/pug.rb in boty-0.0.7 vs script/pug.rb in boty-0.0.9
- old
+ new
@@ -1,9 +1,11 @@
+desc "Send some nice pug in the channel."
respond(/pug me/i) do
response = JSON.parse Net::HTTP.get(URI "http://pugme.herokuapp.com/random")
say "<#{response["pug"]}>"
end
+desc "pug bomb X", "Send X pugs in the channel."
respond(/pug bomb( (\d+))?/i) do |message|
count = message.match[2] || 5
response = JSON.parse Net::HTTP.get(URI "http://pugme.herokuapp.com/bomb?count=#{count}")
response["pugs"].each do |pug| say "<#{pug}>" end
end