case class Events(publish: Sink[CacheEvent, NotUsed], subscribe: Source[(CacheEvent, CacheState), NotUsed], toGatewayPublish: Sink[GatewayMessage[Any], NotUsed], toGatewaySubscribe: Source[GatewayMessage[Any], NotUsed], fromGatewayPublish: Sink[GatewayMessage[Any], NotUsed], fromGatewaySubscribe: Source[GatewayMessage[Any], NotUsed], parallelism: Int)(implicit system: ActorSystem[Nothing]) extends Product with Serializable
Houses streams to interact with events and messages sent to and from Discord.
- publish
A sink used for publishing. Any elements connected to this sink is published to the cache.
- subscribe
A source to subscribe to. All updates are pushed here.
- parallelism
How many cache updates to construct at the same time.
- Source
- Events.scala
- Alphabetic
- By Inheritance
- Events
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Events(publish: Sink[CacheEvent, NotUsed], subscribe: Source[(CacheEvent, CacheState), NotUsed], toGatewayPublish: Sink[GatewayMessage[Any], NotUsed], toGatewaySubscribe: Source[GatewayMessage[Any], NotUsed], fromGatewayPublish: Sink[GatewayMessage[Any], NotUsed], fromGatewaySubscribe: Source[GatewayMessage[Any], NotUsed], parallelism: Int)(implicit system: ActorSystem[Nothing])
- publish
A sink used for publishing. Any elements connected to this sink is published to the cache.
- subscribe
A source to subscribe to. All updates are pushed here.
- parallelism
How many cache updates to construct at the same time.
Value Members
- val fromGatewayPublish: Sink[GatewayMessage[Any], NotUsed]
- val fromGatewaySubscribe: Source[GatewayMessage[Any], NotUsed]
- def gatewayClientConnection: Flow[GatewayMessage[_], GatewayMessage[_], NotUsed]
Messages sent to this flow will be sent to the gateway.
Messages sent to this flow will be sent to the gateway. Messages coming out of this flow are received from the gateway.
- def interactions: Source[(RawInteraction, Option[CacheSnapshot]), NotUsed]
Exposes the command interactions sent to this bot.
- val parallelism: Int
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val publish: Sink[CacheEvent, NotUsed]
- def publishCacheEvent(elem: CacheEvent): Unit
Publish a single cache event.
- val subscribe: Source[(CacheEvent, CacheState), NotUsed]
- def subscribeAPI: Source[APIMessage, NotUsed]
A source used to subscribe to APIMessages sent to this cache.
- def subscribeAPIActor(actor: ActorRef, completeMessage: Any, onFailureMessage: (Throwable) => Any)(specificEvent: Class[_ <: APIMessage]*): Unit
Subscribe an actor to this cache using Sink.actorRef.
- def subscribeAPIActorWithAck(actor: ActorRef, initMessage: Any, ackMessage: Any, completeMessage: Any, failureMessage: (Throwable) => Any = classic.Status.Failure)(specificEvent: Class[_ <: APIMessage]*): Unit
Subscribe an actor to this cache using Sink.actorRefWithAck.
- val toGatewayPublish: Sink[GatewayMessage[Any], NotUsed]
- val toGatewaySubscribe: Source[GatewayMessage[Any], NotUsed]
Deprecated Value Members
- def receiveGatewayPublish: Sink[GatewayMessage[Any], NotUsed]
- Annotations
- @deprecated
- Deprecated
(Since version 0.18.0) Use fromGatewayPublish instead
- def receiveGatewaySubscribe: Source[GatewayMessage[Any], NotUsed]
- Annotations
- @deprecated
- Deprecated
(Since version 0.18.0) Use fromGatewaySubscribe instead
- def sendGatewayPublish: Sink[GatewayMessage[Any], NotUsed]
- Annotations
- @deprecated
- Deprecated
(Since version 0.18.0) Use toGatewayPublish instead
- def sendGatewaySubscribe: Source[GatewayMessage[Any], NotUsed]
- Annotations
- @deprecated
- Deprecated
(Since version 0.18.0) Use toGatewaySubscribe instead