Created
December 6, 2016 17:42
-
-
Save gilbertw1/7abe262e3c0bb383e65ab97015b23f2e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package slack.rtm | |
import slack.api.BlockingSlackApiClient | |
import scala.concurrent.duration._ | |
import akka.actor.{ ActorSystem, Props } | |
import SlackRtmConnectionActor._ | |
object Main extends App { | |
val token = "<token>" | |
implicit val system = ActorSystem("test") | |
val client = BlockingSlackApiClient(token) | |
val state = RtmState(client.startRealTimeMessageSession()) | |
val actor = system.actorOf(Props(new SlackRtmConnectionActor(token, state, 10.seconds))) | |
val handler = MessageHandlerActor(println) | |
actor ! AddEventListener(handler) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment