c

ackcord

DiscordClientCore

class DiscordClientCore extends DiscordClient

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DiscordClientCore
  2. DiscordClient
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DiscordClientCore(events: Events, requests: Requests, actor: ActorRef[Command])

Value Members

  1. def bulkRegisterListeners(listeners: EventListener[_ <: APIMessage, NotUsed]*): Seq[(EventListener[_ <: APIMessage, NotUsed], EventRegistration[NotUsed])]

    Starts many listeners at the same time.

    Starts many listeners at the same time. They must all have a materialized value of NotUsed.

    listeners

    The listeners to run.

    returns

    The listeners together with their registrations.

    Definition Classes
    DiscordClient
  2. val commands: CommandConnector

    The global commands object used by the client

    The global commands object used by the client

    Definition Classes
    DiscordClientCoreDiscordClient
  3. val events: Events

    Streams housing events and messages sent to and from Discord.

    Streams housing events and messages sent to and from Discord.

    Definition Classes
    DiscordClientCoreDiscordClient
  4. implicit val executionContext: ExecutionContextExecutor
    Definition Classes
    DiscordClient
  5. def joinChannel(guildId: GuildId, channelId: VoiceGuildChannelId, 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
  6. 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
  7. def loadTrack(playerManager: AudioPlayerManager, identifier: String): Future[AudioItem]

    Load a track using LavaPlayer.

    Load a track using LavaPlayer.

    Definition Classes
    DiscordClient
  8. def login(): Unit

    Login the shards of this client.

    Login the shards of this client. Note that this method just sends the login signal. It does not block until a response is received.

    Definition Classes
    DiscordClientCoreDiscordClient
  9. def logout(timeout: FiniteDuration): 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
    DiscordClientCoreDiscordClient
  10. def musicManager: Future[ActorRef[Command]]
    Definition Classes
    DiscordClientCoreDiscordClient
  11. def onEventAsync(handler: (CacheSnapshot) => PartialFunction[APIMessage, OptFuture[Unit]]): EventRegistration[NotUsed]

    Runs an async function whenever APIMessage s are received.

    Runs an async function whenever APIMessage s are received.

    handler

    The handler function

    returns

    An event registration to handle the listener's lifecycle.

    Definition Classes
    DiscordClient
  12. def onEventSideEffects(handler: (CacheSnapshot) => PartialFunction[APIMessage, Unit]): EventRegistration[NotUsed]

    Runs a function whenever APIMessage s are received.

    Runs a function whenever APIMessage s are received.

    handler

    The handler function

    returns

    An event registration to handle the listener's lifecycle.

    Definition Classes
    DiscordClient
  13. def onEventSideEffectsIgnore(handler: PartialFunction[APIMessage, Unit]): EventRegistration[NotUsed]

    Runs a function whenever APIMessage s are received without the cache snapshot.

    Runs a function whenever APIMessage s are received without the cache snapshot.

    handler

    The handler function

    returns

    An event registration to handle the listener's lifecycle.

    Definition Classes
    DiscordClient
  14. def onEventStreamable[G[_]](handler: (CacheSnapshot) => PartialFunction[APIMessage, G[Unit]])(implicit streamable: Streamable[G]): EventRegistration[NotUsed]

    Runs a function whenever APIMessage s are received.

    Runs a function whenever APIMessage s are received.

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

    G

    The execution type

    handler

    The handler function

    streamable

    A way to convert your execution type to a stream.

    returns

    An event registration to handle the listener's lifecycle.

    Definition Classes
    DiscordClientCoreDiscordClient
  15. def registerListener[A <: APIMessage, Mat](listener: EventListener[A, Mat]): EventRegistration[Mat]

    Registers an EventListener, created inside an EventsController.

    Registers an EventListener, created inside an EventsController.

    A

    The type events this listener takes.

    Mat

    The materialized result of running the listener graph.

    listener

    The listener to run

    returns

    An event registration to handle the listener's lifecycle.

    Definition Classes
    DiscordClientCoreDiscordClient
  16. val requests: Requests

    The low level requests object used by the client

    The low level requests object used by the client

    Definition Classes
    DiscordClientCoreDiscordClient
  17. val requestsHelper: RequestsHelper

    The high level requests helper for use in user code.

    The high level requests helper for use in user code.

    Definition Classes
    DiscordClientCoreDiscordClient
  18. def runGatewayCommands(clientId: String)(commands: CreatedApplicationCommand*): Unit

    Listen for the specified commands from the gateway.

    Listen for the specified commands from the gateway.

    Definition Classes
    DiscordClient
  19. 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
  20. def shards: Future[Seq[ActorRef[Command]]]

    The shards of this client

    The shards of this client

    Definition Classes
    DiscordClientCoreDiscordClient
  21. def shutdownAckCord(timeout: FiniteDuration = 1.minute): Future[Unit]

    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 for logout to succeed before forcing shutdown.

    Definition Classes
    DiscordClient
  22. def shutdownJVM(timeout: FiniteDuration): Future[Unit]

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

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

    timeout

    The amount of time to wait for logout to succeed before forcing shutdown.

    Definition Classes
    DiscordClientCoreDiscordClient
  23. implicit val system: ActorSystem[Nothing]
    Definition Classes
    DiscordClient

Deprecated Value Members

  1. def cache: Events
    Definition Classes
    DiscordClient
    Annotations
    @deprecated
    Deprecated

    (Since version 0.17) Prefer events