c

net.katsstuff.ackcord

CoreDiscordClient

case class CoreDiscordClient(shards: Seq[ActorRef], cache: Cache, commands: Commands[Id], requests: RequestHelper) extends DiscordClient[Id] with Product with Serializable

Source
client.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CoreDiscordClient
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. DiscordClient
  7. CommandsHelper
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CoreDiscordClient(shards: Seq[ActorRef], cache: Cache, commands: Commands[Id], requests: RequestHelper)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val cache: Cache

    The cache used by the client

    The cache used by the client

    Definition Classes
    CoreDiscordClientDiscordClient
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. val commands: Commands[Id]

    The global commands object used by the client

    The global commands object used by the client

    Definition Classes
    CoreDiscordClientDiscordClientCommandsHelper
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. implicit val executionContext: ExecutionContextExecutor
    Definition Classes
    DiscordClient
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def joinChannel(guildId: GuildId, channelId: ChannelId, createPlayer: ⇒ AudioPlayer, force: Boolean = false, timeoutDur: FiniteDuration = 30.seconds): Future[AudioPlayer]

    Join a voice channel.

    Join a voice channel.

    guildId

    The guildId of the voice channel.

    channelId

    The channelId of the voice channel.

    createPlayer

    A named argument to create a player if one doesn't already exist.

    force

    The the join should be force even if already connected to somewhere else (move channel).

    timeoutDur

    The timeout duration before giving up,

    returns

    A future containing the used player.

    Definition Classes
    DiscordClient
  14. def leaveChannel(guildId: GuildId, destroyPlayer: Boolean = false): Unit

    Leave a voice channel.

    Leave a voice channel.

    guildId

    The guildId to leave the voice channel in.

    destroyPlayer

    If the player used for this guild should be destroyed.

    Definition Classes
    DiscordClient
  15. def loadTrack(playerManager: AudioPlayerManager, identifier: String): Future[AudioItem]

    Load a track using LavaPlayer.

    Load a track using LavaPlayer.

    Definition Classes
    DiscordClient
  16. def login(): Future[Done]

    Login the shards of this client.

    Login the shards of this client.

    Definition Classes
    DiscordClient
  17. def logout(timeout: FiniteDuration = 1.minute): Future[Boolean]

    Logout the shards of this client

    Logout the shards of this client

    timeout

    The amount of time to wait before forcing logout.

    Definition Classes
    DiscordClient
  18. val musicManager: ActorRef
    Definition Classes
    DiscordClient
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def newCommandsHelper(settings: CommandSettings[Id]): (UniqueKillSwitch, CommandsHelper[Id])

    Creates a new commands object to handle commands if the global settings are unfitting.

    Creates a new commands object to handle commands if the global settings are unfitting.

    settings

    The settings to use for the commands object

    returns

    A killswitch to stop this command helper, together with the command helper.

    Definition Classes
    CoreDiscordClientDiscordClient
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. def onEvent[G[_]](handler: (APIMessage) ⇒ G[Unit])(implicit streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Runs a partial function whenever APIMessages are received.

    Runs a partial function whenever APIMessages are received.

    If you use IntelliJ you might have to specify the execution type. (Normally Id or SourceRequest)

    G

    The execution type

    handler

    The handler function

    streamable

    A way to convert your execution type to a stream.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CoreDiscordClientDiscordClient
  24. def onRawCmd[G[_]](handler: (RawCmd[Id]) ⇒ G[Unit])(implicit streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Runs a partial function whenever a raw command object is received.

    Runs a partial function whenever a raw command object is received.

    If you use IntelliJ you might have to specify the execution type. (Normally Id or SourceRequest)

    G

    The execution type

    handler

    The handler function.

    streamable

    A way to convert your execution type to a stream.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
  25. def registerCmd[A, G[_]](refiner: CmdRefiner[Id], description: Option[CmdDescription])(handler: (ParsedCmd[Id, A]) ⇒ G[Unit])(implicit arg0: MessageParser[A], F: Monad[Id], streamableF: Streamable[Id], streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Register a command which runs some code.

    Register a command which runs some code.

    G

    The execution type

    handler

    The handler function.

    streamable

    A way to convert your execution type to a stream.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
  26. def registerCmd[A, G[_]](prefix: String, aliases: Seq[String], filters: Seq[CmdFilter] = Nil, description: Option[CmdDescription] = None)(handler: (ParsedCmd[Id, A]) ⇒ G[Unit])(implicit arg0: MessageParser[A], F: Monad[Id], streamableF: Streamable[Id], streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Register a command which runs some code.

    Register a command which runs some code.

    G

    The execution type

    handler

    The handler function.

    streamable

    A way to convert your execution type to a stream.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
  27. def registerHandler[G[_], A <: APIMessage](handler: EventHandler[Id, G, A])(implicit classTag: ClassTag[A], streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Registers an EventHandler that will be called when an event happens.

    Registers an EventHandler that will be called when an event happens.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CoreDiscordClientDiscordClient
  28. def registerHandler[G[_], A](handler: CommandHandler[Id, G, A])(implicit arg0: MessageParser[A], streamableG: Streamable[G], F: Monad[Id], streamableF: Streamable[Id]): (UniqueKillSwitch, Future[Done])

    Registers an CommandHandler that will be called when that command is used.

    Registers an CommandHandler that will be called when that command is used.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
  29. def registerHandler[G[_]](handler: RawCommandHandler[Id, G])(implicit streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Registers an CommandHandler that will be called when that command is used.

    Registers an CommandHandler that will be called when that command is used.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
  30. val requests: RequestHelper

    The requests object used by the client

    The requests object used by the client

    Definition Classes
    CoreDiscordClientDiscordClientCommandsHelper
  31. def setPlaying(guildId: GuildId, playing: Boolean): Unit

    Set a bot as speaking/playing in a channel.

    Set a bot as speaking/playing in a channel. This is required before sending any sound.

    Definition Classes
    DiscordClient
  32. val shardShutdownManager: ActorRef
    Definition Classes
    DiscordClient
  33. val shards: Seq[ActorRef]

    The shards of this client

    The shards of this client

    Definition Classes
    CoreDiscordClientDiscordClient
  34. def shutdown(timeout: FiniteDuration = 1.minute): Future[Terminated]

    Logs out the shards of this client, and then shuts down the actor system.

    Logs out the shards of this client, and then shuts down the actor system.

    timeout

    The amount of time to wait before forcing shutdown.

    Definition Classes
    DiscordClient
  35. val sourceRequesterRunner: RequestRunner[[α$0$]Source[α$0$, NotUsed], Id]

    A stream requester runner.

    A stream requester runner.

    Definition Classes
    CoreDiscordClientDiscordClient
  36. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  40. def withCache[G[_], ContainsCache](handler: (CacheSnapshot[Id]) ⇒ (ContainsCache) ⇒ G[Unit])(implicit hasCache: HasCache[Id, ContainsCache]): (ContainsCache) ⇒ G[Unit]

    An utility function to extract a CacheSnapshot from a type in a function.

    An utility function to extract a CacheSnapshot from a type in a function.

    G

    The execution type

    ContainsCache

    The type of the value that contains the cache.

    handler

    The handler function with a cache parameter.

    hasCache

    A typeclass allowing you to extract the cache.

    returns

    A handler function

    Definition Classes
    DiscordClient

Deprecated Value Members

  1. def onEventC(handler: (CacheSnapshot[Id]) ⇒ PartialFunction[APIMessage, Unit]): (UniqueKillSwitch, Future[Done])

    Run some code with a CacheSnapshot when an event happens.

    Run some code with a CacheSnapshot when an event happens.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    DiscordClient
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers or the new onEvent instead

  2. def onEventDSL(handler: PartialFunction[APIMessage, RequestDSL[Unit]]): (UniqueKillSwitch, Future[Done])

    Run a RequestDSL when an event happens.

    Run a RequestDSL when an event happens.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    DiscordClient
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers or the new onEvent instead

  3. def onEventDSLC(handler: (CacheSnapshot[Id]) ⇒ PartialFunction[APIMessage, RequestDSL[Unit]]): (UniqueKillSwitch, Future[Done])

    Run a RequestDSL with a CacheSnapshot when an event happens.

    Run a RequestDSL with a CacheSnapshot when an event happens.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CoreDiscordClientDiscordClient
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers or the new onEvent instead

  4. def onRawCommand(handler: PartialFunction[RawCmd[Id], Unit]): (UniqueKillSwitch, Future[Done])

    Run some code when raw command arrives.

    Run some code when raw command arrives.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers or the new onRawCmd instead

  5. def onRawCommandC(handler: (CacheSnapshot[Id]) ⇒ PartialFunction[RawCmd[Id], Unit]): (UniqueKillSwitch, Future[Done])

    Run some code with a CacheSnapshot when raw command arrives.

    Run some code with a CacheSnapshot when raw command arrives.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers or the new onRawCmd instead

  6. def onRawCommandDSL(handler: PartialFunction[RawCmd[Id], RequestDSL[Unit]]): (UniqueKillSwitch, Future[Done])

    Run a RequestDSL when raw command arrives.

    Run a RequestDSL when raw command arrives.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers or the new onRawCmd instead

  7. def onRawCommandDSLC(handler: (CacheSnapshot[Id]) ⇒ PartialFunction[RawCmd[Id], RequestDSL[Unit]]): (UniqueKillSwitch, Future[Done])

    Run a RequestDSL with a CacheSnapshot when raw command arrives.

    Run a RequestDSL with a CacheSnapshot when raw command arrives.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers or the new onRawCmd instead

  8. def registerCommand[A](category: CmdCategory, aliases: Seq[String], filters: Seq[CmdFilter] = Nil, description: Option[CmdDescription] = None)(handler: (ParsedCmd[Id, A]) ⇒ Unit)(implicit arg0: MessageParser[A], F: Monad[Id], streamable: Streamable[Id]): (UniqueKillSwitch, Future[Done])

    Register a command which runs some code.

    Register a command which runs some code.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers the new registerCmd instead

  9. def registerCommandC[A](category: CmdCategory, aliases: Seq[String], filters: Seq[CmdFilter] = Nil, description: Option[CmdDescription] = None)(handler: (CacheSnapshot[Id]) ⇒ (ParsedCmd[Id, A]) ⇒ Unit)(implicit arg0: MessageParser[A], F: Monad[Id], streamable: Streamable[Id]): (UniqueKillSwitch, Future[Done])

    Register a command which runs some code with a CacheSnapshot.

    Register a command which runs some code with a CacheSnapshot.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers the new registerCmd instead

  10. def registerCommandDSL[A](category: CmdCategory, aliases: Seq[String], filters: Seq[CmdFilter] = Nil, description: Option[CmdDescription] = None)(handler: (ParsedCmd[Id, A]) ⇒ RequestDSL[Unit])(implicit arg0: MessageParser[A], F: Monad[Id], streamable: Streamable[Id]): (UniqueKillSwitch, Future[Done])

    Register a command which runs a RequestDSL.

    Register a command which runs a RequestDSL.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers the new registerCmd instead

  11. def registerCommandDSLC[A](category: CmdCategory, aliases: Seq[String], filters: Seq[CmdFilter] = Nil, description: Option[CmdDescription] = None)(handler: (CacheSnapshot[Id]) ⇒ (ParsedCmd[Id, A]) ⇒ RequestDSL[Unit])(implicit arg0: MessageParser[A], F: Monad[Id], streamable: Streamable[Id]): (UniqueKillSwitch, Future[Done])

    Register a command which runs a RequestDSL with a CacheSnapshot.

    Register a command which runs a RequestDSL with a CacheSnapshot.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers or the new registerCmd instead

  12. def registerHandler[A <: APIMessage](handler: EventHandlerDSL[A])(implicit classTag: ClassTag[A], F: Monad[Id], streamable: Streamable[Id]): (UniqueKillSwitch, Future[Done])

    Registers an EventHandlerDSL that will be run when an event happens.

    Registers an EventHandlerDSL that will be run when an event happens.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    DiscordClient
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) RequestDSL is deprecated. Use the handlers instead

  13. def registerHandler[A](handler: CommandHandlerDSL[A])(implicit arg0: MessageParser[A], F: Monad[Id], streamable: Streamable[Id]): (UniqueKillSwitch, Future[Done])

    Registers an CommandHandlerDSL that will be run when that command is used.

    Registers an CommandHandlerDSL that will be run when that command is used.

    returns

    A kill switch to cancel this listener, and a future representing when it's done.

    Definition Classes
    CommandsHelper
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use the handlers the new registerCmd instead

  14. def runDSL[A](dsl: RequestDSL[A]): Future[A]

    Runs a RequestDSL once, and returns the result.

    Runs a RequestDSL once, and returns the result.

    Definition Classes
    DiscordClient
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) Use requesterRunner instead

  15. def runDSL(source: Source[RequestDSL[Unit], NotUsed]): (UniqueKillSwitch, Future[Done])
    Attributes
    protected
    Definition Classes
    DiscordClient
    Annotations
    @deprecated
    Deprecated

    (Since version 0.11) RequestDSL is deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from DiscordClient[Id]

Inherited from CommandsHelper[Id]

Inherited from AnyRef

Inherited from Any

Ungrouped