Trait

net.katsstuff.ackcord

DiscordClient

Related Doc: package ackcord

Permalink

trait DiscordClient[F[_]] extends CommandsHelper[F]

Trait used to interface with Discord stuff from high level.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DiscordClient
  2. CommandsHelper
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def cache: Cache

    Permalink

    The cache used by the client

  2. abstract def commands: Commands[F]

    Permalink

    The global commands object used by the client

    The global commands object used by the client

    Definition Classes
    DiscordClientCommandsHelper
  3. abstract def newCommandsHelper(settings: CommandSettings[F]): (UniqueKillSwitch, CommandsHelper[F])

    Permalink

    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.

  4. abstract def onEvent[G[_]](handler: (APIMessage) ⇒ G[Unit])(implicit streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Permalink

    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.

  5. abstract def registerHandler[G[_], A <: APIMessage](handler: EventHandler[F, G, A])(implicit classTag: ClassTag[A], streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Permalink

    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.

  6. abstract def requests: RequestHelper

    Permalink

    The requests object used by the client

    The requests object used by the client

    Definition Classes
    DiscordClientCommandsHelper
  7. abstract def shards: Seq[ActorRef]

    Permalink

    The shards of this client

  8. abstract val sourceRequesterRunner: RequestRunner[SourceRequest, F]

    Permalink

    A stream requester runner.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. implicit val executionContext: ExecutionContextExecutor

    Permalink
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. def joinChannel(guildId: GuildId, channelId: ChannelId, createPlayer: ⇒ AudioPlayer, force: Boolean = false, timeoutDur: FiniteDuration = 30.seconds): Future[AudioPlayer]

    Permalink

    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.

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

    Permalink

    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.

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

    Permalink

    Load a track using LavaPlayer.

  16. def login(): Future[Done]

    Permalink

    Login the shards of this client.

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

    Permalink

    Logout the shards of this client

    Logout the shards of this client

    timeout

    The amount of time to wait before forcing logout.

  18. val musicManager: ActorRef

    Permalink
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def onRawCmd[G[_]](handler: (RawCmd[F]) ⇒ G[Unit])(implicit streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Permalink

    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
  23. def registerCmd[A, G[_]](refiner: CmdRefiner[F], description: Option[CmdDescription])(handler: (ParsedCmd[F, A]) ⇒ G[Unit])(implicit arg0: MessageParser[A], F: Monad[F], streamableF: Streamable[F], streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Permalink

    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
  24. def registerCmd[A, G[_]](prefix: String, aliases: Seq[String], filters: Seq[CmdFilter] = Nil, description: Option[CmdDescription] = None)(handler: (ParsedCmd[F, A]) ⇒ G[Unit])(implicit arg0: MessageParser[A], F: Monad[F], streamableF: Streamable[F], streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Permalink

    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
  25. def registerHandler[G[_], A](handler: CommandHandler[F, G, A])(implicit arg0: MessageParser[A], streamableG: Streamable[G], F: Monad[F], streamableF: Streamable[F]): (UniqueKillSwitch, Future[Done])

    Permalink

    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
  26. def registerHandler[G[_]](handler: RawCommandHandler[F, G])(implicit streamable: Streamable[G]): (UniqueKillSwitch, Future[Done])

    Permalink

    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
  27. def setPlaying(guildId: GuildId, playing: Boolean): Unit

    Permalink

    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.

  28. var shardShutdownManager: ActorRef

    Permalink
  29. def shutdown(timeout: FiniteDuration = 1.minute): Future[Terminated]

    Permalink

    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.

  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def withCache[G[_], ContainsCache](handler: (CacheSnapshot[F]) ⇒ (ContainsCache) ⇒ G[Unit])(implicit hasCache: HasCache[F, ContainsCache]): (ContainsCache) ⇒ G[Unit]

    Permalink

    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

Inherited from CommandsHelper[F]

Inherited from AnyRef

Inherited from Any

Ungrouped