desc "pug me", I18n.t("scripts.pug_me") command(/pug me/i) do response = http.get "http://pugme.herokuapp.com/random" say "<#{response['pug']}>" end desc "pug bomb X", I18n.t("scripts.pug_bomb") command(/pug bomb( \d+)?/i) do |count| count = (count || "5").strip if count.to_i > 5 count = "5" say "wow! so many pugs! sendind 5 instead." end response = http.get "http://pugme.herokuapp.com/bomb", count: count response["pugs"].each do |pug| say "<#{pug}>" end end