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
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Events
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. val fromGatewayPublish: Sink[GatewayMessage[Any], NotUsed]
  2. val fromGatewaySubscribe: Source[GatewayMessage[Any], NotUsed]
  3. 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.

  4. def interactions: Source[(RawInteraction, Option[CacheSnapshot]), NotUsed]

    Exposes the command interactions sent to this bot.

  5. val parallelism: Int
  6. def productElementNames: Iterator[String]
    Definition Classes
    Product
  7. val publish: Sink[CacheEvent, NotUsed]
  8. def publishCacheEvent(elem: CacheEvent): Unit

    Publish a single cache event.

  9. val subscribe: Source[(CacheEvent, CacheState), NotUsed]
  10. def subscribeAPI: Source[APIMessage, NotUsed]

    A source used to subscribe to APIMessages sent to this cache.

  11. def subscribeAPIActor(actor: ActorRef, completeMessage: Any, onFailureMessage: (Throwable) => Any)(specificEvent: Class[_ <: APIMessage]*): Unit

    Subscribe an actor to this cache using Sink.actorRef.

  12. 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.

  13. val toGatewayPublish: Sink[GatewayMessage[Any], NotUsed]
  14. val toGatewaySubscribe: Source[GatewayMessage[Any], NotUsed]

Deprecated Value Members

  1. def receiveGatewayPublish: Sink[GatewayMessage[Any], NotUsed]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.18.0) Use fromGatewayPublish instead

  2. def receiveGatewaySubscribe: Source[GatewayMessage[Any], NotUsed]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.18.0) Use fromGatewaySubscribe instead

  3. def sendGatewayPublish: Sink[GatewayMessage[Any], NotUsed]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.18.0) Use toGatewayPublish instead

  4. def sendGatewaySubscribe: Source[GatewayMessage[Any], NotUsed]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.18.0) Use toGatewaySubscribe instead