Skip to content

Migrate to 1.0.0

Michael Rittmeister edited this page Jan 9, 2021 · 3 revisions

This guide explains how to migrate from the old Lavaplayer based client to the new plain Kotlin client.

Everything except legacy support has been moved to dev.kord.extensions.lavalink

Replacements:

Builder:

kord.lavalink {
  autoReconnect = false 
}

becomes

kord.lavakord {
  link {
    autoReconnect = false 
  }
}

lavalink.client.io.Lavalink

Replaced by: dev.kord.extensions.lavalink.audio.LavaKord

Lavalink#addNode(URI, String) -> LavaKord#addNode(String, String)

lavalink.client.io.Link

Replaced by: dev.kord.extensions.lavalink.audio.Link (Including Link.State)

Link#disconnect() -> Link#disconnectAudio()

com.sedmelluq.discord.lavaplayer.track.AudioTrack

Replaced by: dev.kord.extensions.lavalink.audio.Track

Extensions

The Link#loadItem(String, AudioLoadResultHandler) extension has been deprecated in favor of the Link#loadItem(String) extension

All Kord related extensions from me.schlaubi.lavakord have been migrated to dev.kord.extensions.lavalink.kord

  • LavKord#getLink(Snowflake)
  • GuildBehavior#getLink(LavaKord)
  • Link#connectAudio(VoiceChannel) ->Link#connectAudio(VoiceChannel)
  • Link#connectAudio(Snowflake) -> Link#connectAudio(Snowflake)
  • InsufficientPermissionException.kordPermission