Sha256: f3cb781a8af9c38e89cdbe9d74f4169a2d5e01e14d0b1805dd33c22a2445f344
Contents?: true
Size: 808 Bytes
Versions: 1
Compression:
Stored size: 808 Bytes
Contents
module Isis module Plugin class AnimalsBeingJerks < Isis::Plugin::Base TRIGGERS = %w(!animalsbeingjerks !jerks !abj) def respond_to_msg?(msg, speaker) TRIGGERS.include? msg.downcase end private def response_html page = Nokogiri.HTML(open('http://animalsbeingdicks.com/random')) img = page.css('.entry img').attr('src').value "<img src=\"#{img}\">" end def response_md page = Nokogiri.HTML(open('http://animalsbeingdicks.com/random')) img = page.css('.entry img').attr('src').value "#{img}" end def response_text page = Nokogiri.HTML(open('http://animalsbeingdicks.com/random')) img = page.css('.entry img').attr('src').value "#{img}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
isis-plugin-animalsbeingjerks-1.0.0 | lib/isis/plugin/animalsbeingjerks.rb |