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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def interactions: Source[(RawInteraction, Option[CacheSnapshot]), NotUsed]
Exposes the command interactions sent to this bot.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- 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.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val toGatewayPublish: Sink[GatewayMessage[Any], NotUsed]
- val toGatewaySubscribe: Source[GatewayMessage[Any], NotUsed]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- 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