JavaLink

class JavaLink(suspendingLink: Link) : CoroutineScope, JavaEventSource<Event>

Wrapper class for Link which replaces suspending functions by using CompletableFuture.

Constructors

Link copied to clipboard
constructor(suspendingLink: Link)

Properties

Link copied to clipboard
Link copied to clipboard

All events received using a Flow.Publisher

Link copied to clipboard

the id of the Guild this Link is connected to

Link copied to clipboard

the id of the last channel this Link is connected to

Link copied to clipboard

the LavaKord instance which created this link

Link copied to clipboard
val node: Node

the Node which is currently used to play songs (Can be changed in case one node crashes)

Link copied to clipboard

a Player to play audio

Link copied to clipboard

the current State of this Link

Link copied to clipboard

the underlying delegate EventSource

Functions

Link copied to clipboard
fun connectAudio(voiceChannelId: Long): CompletableFuture<Void>

Connects this link to the voice channel with the specified voiceChannelId

Link copied to clipboard

Destroys this link (will no longer be usable).

Link copied to clipboard

Disconnects from the currently connected voice channel.

Link copied to clipboard
open fun <E : Event> on(eventType: Class<E>, handler: Consumer<E>)

Creates an event handler which executes Consumer for every event of eventType.