@@ -76,7 +76,9 @@ class LyricsCommand : MusicCommand() {
7676
7777 loadLyricsFromLavalink(player.link) {
7878 if (it == null ) {
79- val searchItem = " ${playingTrack.info.title} - ${playingTrack.info.author} "
79+ // TODO: figure out why the search is not executing.
80+ sendMsg(ctx, " There where no lyrics found for `${playingTrack.info.title} `" )
81+ /* val searchItem = "${playingTrack.info.title} - ${playingTrack.info.author}"
8082
8183 handleSearch(searchItem, ctx.config) { embed ->
8284 if (embed == null) {
@@ -85,7 +87,7 @@ class LyricsCommand : MusicCommand() {
8587 }
8688
8789 sendEmbed(ctx, embed)
88- }
90+ }*/
8991 return @loadLyricsFromLavalink
9092 }
9193
@@ -119,7 +121,10 @@ class LyricsCommand : MusicCommand() {
119121
120122 loadLyricsFromLavalink(player.link) {
121123 if (it == null ) {
122- val searchItem = " ${playingTrack.info.title} - ${playingTrack.info.author} "
124+ event.hook.sendMessage(" There where no lyrics found for `${playingTrack.info.title} `" )
125+ .queue()
126+
127+ /* val searchItem = "${playingTrack.info.title} - ${playingTrack.info.author}"
123128
124129 handleSearch(searchItem, variables.config) { embed ->
125130 if (embed == null) {
@@ -129,7 +134,7 @@ class LyricsCommand : MusicCommand() {
129134 }
130135
131136 event.hook.sendMessageEmbeds(embed.build()).queue()
132- }
137+ }*/
133138 return @loadLyricsFromLavalink
134139 }
135140
@@ -160,9 +165,7 @@ class LyricsCommand : MusicCommand() {
160165 link.node.customJsonRequest(Lyrics ::class .java) {
161166 it.path(" /v4/sessions/$sessionId /players/$guildId /lyrics" )
162167 }
163- .publishOn(Schedulers .boundedElastic())
164- .doOnError { cb(null ) }
165- .doOnSuccess {
168+ .subscribe({
166169 val lyricInfo = when (it) {
167170 is TimedLyrics -> {
168171 // Block is safe here, player is already cached
@@ -201,8 +204,9 @@ class LyricsCommand : MusicCommand() {
201204 lyricInfo?.let { info ->
202205 cb(buildLyricsEmbed(info))
203206 }
207+ }) {
208+ cb(null )
204209 }
205- .subscribe()
206210 }
207211
208212 private fun buildLyricsEmbed (data : LyricInfo ): EmbedBuilder {
0 commit comments