LavalinkNode

class LavalinkNode(val name: String, serverUri: URI, val password: String, val regionFilter: IRegionFilter?, val lavalink: LavalinkClient) : Disposable, Closeable

The Node is a physical instance of the lavalink server software.

Constructors

Link copied to clipboard
constructor(name: String, serverUri: URI, password: String, regionFilter: IRegionFilter?, lavalink: LavalinkClient)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val flux: Flux<ClientEvent<*>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var stats: Stats?
Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard

Creates or updates a player.

Link copied to clipboard
inline fun <T> customJsonRequest(builderFn: UnaryOperator<HttpBuilder>): Mono<T>
fun <T> customJsonRequest(decodeTo: Class<T>, builderFn: UnaryOperator<HttpBuilder>): Mono<T>
fun <T> customJsonRequest(deserializer: DeserializationStrategy<T>, builderFn: UnaryOperator<HttpBuilder>): Mono<T>

Send a custom request to the lavalink node. Any host and port you set will be replaced with the node host automatically. The scheme must match your node's scheme, however. The response body will be deserialized using the provided deserializer.

Link copied to clipboard
fun customRequest(builderFn: UnaryOperator<HttpBuilder>): Mono<Response>

Send a custom request to the lavalink node. Any host and port you set will be replaced with the node host automatically. The scheme must match your node's scheme, however.

Link copied to clipboard
fun decodeTrack(encoded: String): Mono<Track>

Uses the node to decode a base64 encoded track.

Link copied to clipboard
fun decodeTracks(encoded: List<String>): Mono<List<Track>>

Uses the node to decode a list of base64 encoded tracks.

Link copied to clipboard
fun destroyPlayer(guildId: Long): Mono<Unit>

Destroy a guild's player.

Link copied to clipboard
open override fun dispose()
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun getNodeInfo(): Mono<Info>

Get information about the node.

Link copied to clipboard
fun getPlayer(guildId: Long): Mono<LavalinkPlayer>

Gets the player from the guild id. If the player is not cached, it will be retrieved from the server.

Link copied to clipboard

Retrieves a list of all players from the lavalink node.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open fun isDisposed(): Boolean
Link copied to clipboard
fun loadItem(identifier: String): Mono<LavalinkLoadResult>

Load an item for the player.

Link copied to clipboard
inline fun <T : ClientEvent<*>> on(): Flux<T>
fun <T : ClientEvent<*>> on(type: Class<T>): Flux<T>
Link copied to clipboard
fun updatePlayer(guildId: Long, updateConsumer: Consumer<PlayerUpdateBuilder>): Mono<LavalinkPlayer>