Skip to content

Commit cce26d6

Browse files
committed
refactor: Fixed soundcloud search
1 parent d0ee58b commit cce26d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

internal/command/music.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,13 @@ func (h *MusicHandler) onPlay(data discord.SlashCommandInteractionData, e *handl
167167
})
168168
}
169169

170-
src, _ := data.OptString("src")
170+
src := data.String("src")
171171
q := data.String("query")
172+
172173
switch src {
173-
case "SoundCloud":
174+
case string(lavalink.SearchTypeSoundCloud):
174175
q = lavalink.SearchTypeSoundCloud.Apply(q)
175-
case "YouTube Music":
176+
case string(lavalink.SearchTypeYouTubeMusic):
176177
q = lavalink.SearchTypeYouTubeMusic.Apply(q)
177178
default:
178179
// If the query is a direct link, we just send the url directly

0 commit comments

Comments
 (0)