Closed shizamuru-dev closed 3 months ago
Hey if you have an attachment and the attachment still exists in the channel (E.g the message has not been deleted) you can use the url of the attachment to search tracks directly.
tracks: wavelink.Search = await wavelink.Playable.search(attachment.url)
# Rest of code...
If you have files on your server that you want to play you can pass, None
to source=
in the Playable.search()
tracks: wavelink.Search = await wavelink.Playable.search("local.mp3", source=None)
# Rest of code...
Hi, I was wondering if there is any way to play the sound from a file attached by the user?
I don't see in the documentation mentioning any local source (for uploading a file to the server, and further playback), or the possibility to add a raw track (via discord.File.fb).