Slack
Inherits Reference / Object
Handles connecting and starting Slack websocket session and delegates slack events.
require "../src/slack.cr"
slack = Slack.new(token: ENV["SLACK_TOKEN"])
slack.on(Slack::Event::UserTyping) do |session, event|
puts "someone is typing 2"
end
slack.run
Constants
VERSION = "0.1.0"
Constructors
new(token : String)
SourceInstance methods
config
Sourceconfig=(config)
Sourcedebug
Sourcedebug=(debug : Bool)
SourceBinds a callback to event. Allows multiple bindings to event, and will be called in order of binding
wss
Sourcewss=(wss : String | Nil)
Source