Updated the search platform from spotify to youtube

This commit is contained in:
Choco
2025-07-03 16:10:41 +08:00
parent c23aa5c11e
commit 7c5caa8d6d

View File

@@ -93,7 +93,7 @@ class Basic(commands.Cog):
node = voicelink.NodePool.get_node() node = voicelink.NodePool.get_node()
if not node: if not node:
return [] return []
tracks: list[voicelink.Track] = await node.get_tracks(current, requester=interaction.user, search_type=SearchType.SPOTIFY) tracks: list[voicelink.Track] = await node.get_tracks(current, requester=interaction.user)
return [app_commands.Choice(name=truncate_string(f"🎵 {track.author} - {track.title}", 100), value=truncate_string(f"{track.author} - {track.title}", 100)) for track in tracks] if tracks else [] return [app_commands.Choice(name=truncate_string(f"🎵 {track.author} - {track.title}", 100), value=truncate_string(f"{track.author} - {track.title}", 100)) for track in tracks] if tracks else []
history = {track["identifier"]: track for track_id in reversed(await get_user(interaction.user.id, "history")) if (track := voicelink.decode(track_id))["uri"]} history = {track["identifier"]: track for track_id in reversed(await get_user(interaction.user.id, "history")) if (track := voicelink.decode(track_id))["uri"]}