You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you give me an overview of where I could find the code that sets up event collection?
I looked through the code and couldn't figure out how it's being done. I think it would be great to be able to pass in multiple events that are similar in type.
Example
SlackRubyBotServer::Events.configure do |config|
config.on :event, ['event_callback', ['pin_added', 'pin_removed']] do |event|
Right now I'm handling it like this..
SlackRubyBotServer::Events.configure do |config|
config.on :event, ['event_callback'] do |event|
event_type = event[:event][:type]
case event_type
when 'pin_added', 'pin_removed'
# Do Pin Stuff
when 'reaction_added', 'reaction_removed'
# Do Reaction Stuff
else
# Do Log & Error Handling Stuff
end
{ ok: true }
end
end
The text was updated successfully, but these errors were encountered:
Could you give me an overview of where I could find the code that sets up event collection?
I looked through the code and couldn't figure out how it's being done. I think it would be great to be able to pass in multiple events that are similar in type.
Example
Right now I'm handling it like this..
The text was updated successfully, but these errors were encountered: