Skip to content

Commit

Permalink
feat: debug message on search command
Browse files Browse the repository at this point in the history
  • Loading branch information
Apehum committed Apr 12, 2024
1 parent b9d09d1 commit 71ca19e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import su.plo.slib.api.chat.component.McTextComponent
import su.plo.slib.api.chat.style.McTextClickEvent
import su.plo.slib.api.chat.style.McTextHoverEvent
import su.plo.slib.api.permission.PermissionDefault
import su.plo.voice.discs.DiscsPlugin
import su.plo.voice.discs.command.CommandHandler
import su.plo.voice.discs.command.SubCommand
import su.plo.voice.discs.utils.extend.asPlayer
Expand Down Expand Up @@ -51,6 +52,7 @@ class SearchCommand(handler: CommandHandler) : SubCommand(handler) {
handler.plugin.audioPlayerManager.getPlaylist("ytsearch:$query").await().tracks
} catch (e: Exception) {
voicePlayer.instance.sendTranslatable("pv.addon.discs.error.search_fail", e.message ?: "Unexpected error")
DiscsPlugin.DEBUG_LOGGER.log("Search failed", e)
return@launch
}

Expand Down

0 comments on commit 71ca19e

Please sign in to comment.