class DiscordClientCore extends DiscordClient
- Source
- DiscordClientCore.scala
- Alphabetic
- By Inheritance
- DiscordClientCore
- DiscordClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
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 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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- val commands: CommandConnector
The global commands object used by the client
The global commands object used by the client
- Definition Classes
- DiscordClientCore → DiscordClient
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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
- DiscordClientCore → DiscordClient
- implicit val executionContext: ExecutionContextExecutor
- Definition Classes
- DiscordClient
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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
- 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
- def loadTrack(playerManager: AudioPlayerManager, identifier: String): Future[AudioItem]
Load a track using LavaPlayer.
Load a track using LavaPlayer.
- Definition Classes
- DiscordClient
- 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
- DiscordClientCore → DiscordClient
- 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
- DiscordClientCore → DiscordClient
- def musicManager: Future[ActorRef[Command]]
- Definition Classes
- DiscordClientCore → DiscordClient
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- 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
- 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
- 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
- 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
- DiscordClientCore → DiscordClient
- 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
- DiscordClientCore → DiscordClient
- val requests: Requests
The low level requests object used by the client
The low level requests object used by the client
- Definition Classes
- DiscordClientCore → DiscordClient
- 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
- DiscordClientCore → DiscordClient
- 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
- 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
- def shards: Future[Seq[ActorRef[Command]]]
The shards of this client
The shards of this client
- Definition Classes
- DiscordClientCore → DiscordClient
- 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
- 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
- DiscordClientCore → DiscordClient
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- implicit val system: ActorSystem[Nothing]
- Definition Classes
- DiscordClient
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def cache: Events
- Definition Classes
- DiscordClient
- Annotations
- @deprecated
- Deprecated
(Since version 0.17) Prefer events
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated