Sha256: c373709dd1af7d0be7cb6da0d9811491e89a98227ab752c2cb9c193b20d86ed6

Contents?: true

Size: 786 Bytes

Versions: 2

Compression:

Stored size: 786 Bytes

Contents

require 'ruboty/slack_reaction_added/actions/reaction_ping.rb'
require 'ruboty/slack_reaction_added/actions/thumbup.rb'

module Ruboty
  module SlackReactionAdded
    module Handlers
      class Handler < Ruboty::Handlers::Base

        on /ping\z/,
            name: 'reaction_able_ping',
            description: 'ping allow reaction',
            allow_reaction: true

        on /.*\z/,
            name: 'thumbup',
            description: 'thumbup',
            reaction_only: true,
            all: true

        def reaction_able_ping(message)
          Ruboty::SlackReactionAdded::Actions::ReactionPing.new(message).call
        end

        def thumbup(message)
          Ruboty::SlackReactionAdded::Actions::Thumbup.new(message).call
        end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruboty-slack_reaction_added-0.2.0 lib/ruboty/slack_reaction_added/handlers/handler.rb
ruboty-slack_reaction_added-0.1.0 lib/ruboty/slack_reaction_added/handlers/handler.rb