def get_responses(msg, text)
      message = Slackbotsy::Message.new(self, msg)
      @listeners.map do |listener|
        text.match(listener.regex) do |mdata|
         begin
            message.instance_exec(mdata, *mdata[1..-1], &listener.proc)
          rescue => err # keep running even with a broken script, but report the error
            err
          end
        end
      end
    end
def get_responses(msg, text)
      message = Slackbotsy::Message.new(self, msg)
      @listeners.map do |listener|
        text.match(listener.regex) do |mdata|
         begin
            message.instance_exec(mdata, *mdata[1..-1], &listener.proc)
          rescue => err # keep running even with a broken script, but report the error
            err
          end
        end
      end
    end
def get_responses ( msg , text ) message = Slackbotsy :: Message . new ( self , msg ) @listeners . map do | listener | text . match ( listener . regex ) do | mdata | begin message . instance_exec ( mdata , mdata [ 1 .. - 1 ] , listener . proc ) rescue => err # keep running even with a broken script, but report the error err end end end end
run on msg all hear blocks matching text
run on msg all hear blocks matching text