class DiscordClientCore extends DiscordClient
- Alphabetic
- By Inheritance
- DiscordClientCore
- DiscordClient
- CommandsHelper
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new DiscordClientCore(cache: Cache, commands: Commands, requests: RequestHelper, actor: ActorRef[Command])
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
-
val
cache: Cache
The cache used by the client
The cache used by the client
- Definition Classes
- DiscordClientCore → DiscordClient
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
commands: Commands
The global commands object used by the client
The global commands object used by the client
- Definition Classes
- DiscordClientCore → DiscordClient → CommandsHelper
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
implicit
val
executionContext: ExecutionContextExecutor
- Definition Classes
- DiscordClient
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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
-
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
-
def
newCommandsHelper(settings: CommandSettings): (UniqueKillSwitch, CommandsHelper)
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
- DiscordClientCore → DiscordClient
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
- DiscordClientCore → DiscordClient
-
def
onRawCmd[G[_]](handler: (RawCmd) ⇒ 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
-
def
registerCmd[A, G[_]](refiner: CmdRefiner, description: Option[CmdDescription])(handler: (ParsedCmd[A]) ⇒ G[Unit])(implicit arg0: MessageParser[A], 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
-
def
registerCmd[A, G[_]](prefix: String, aliases: Seq[String], filters: Seq[CmdFilter] = Nil, description: Option[CmdDescription] = None)(handler: (ParsedCmd[A]) ⇒ G[Unit])(implicit arg0: MessageParser[A], 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
-
def
registerHandler[G[_], A <: APIMessage](handler: EventHandler[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
- DiscordClientCore → DiscordClient
-
def
registerHandler[G[_], A](handler: CommandHandler[G, A])(implicit arg0: MessageParser[A], streamableG: 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
-
def
registerHandler[G[_]](handler: RawCommandHandler[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
-
val
requests: RequestHelper
The requests object used by the client
The requests object used by the client
- Definition Classes
- DiscordClientCore → DiscordClient → CommandsHelper
-
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
shutdown(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 before forcing shutdown.
- Definition Classes
- DiscordClient
-
val
sourceRequesterRunner: RequestRunner[[α$0$]Source[α$0$, NotUsed]]
A stream requester runner.
A stream requester runner.
- Definition Classes
- DiscordClientCore → DiscordClient
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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()
-
def
withCache[G[_], ContainsCache](handler: (CacheSnapshot) ⇒ (ContainsCache) ⇒ G[Unit])(implicit hasCache: HasCache[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