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.
- Alphabetic
- By Inheritance
- Events
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- 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[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val parallelism: Int
- 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(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
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