Sha256: 1cbd084b458aac34c5fe264552298b0ff98a1446598b775c3e847b6be230099c
Contents?: true
Size: 705 Bytes
Versions: 1
Compression:
Stored size: 705 Bytes
Contents
# frozen_string_literal: true module ReactionRemovedListener def self.call(schema:, raw_data:) # Do some cool(quick returning) things here # schema.payload.event will be a SlackBot::Events::Schemas::Type::ReactionModified puts "Heya! I found a reaction! #{schema.payload.event.reaction}" raise StandardError, "I Randomly decided to Barf" if rand > 0.9 end def self.on_success(schema) # Send a metric maybe? # Or a Log Message puts "Congrats! You executed it succesfully" end def self.on_failure(schema, error) # Send job to sidekiq to try again? # Or send a log message; but make sure to do it quick puts "Yikes, You died a misreable death" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slack_bot-events-0.4.4 | examples/multi_listener/reaction_removed_listener.rb |