Playing a user's track from a file? #318
shizamuru-dev
started this conversation in
General
Replies: 1 comment 5 replies
-
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, tracks: wavelink.Search = await wavelink.Playable.search("local.mp3", source=None)
# Rest of code... |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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).
Beta Was this translation helpful? Give feedback.
All reactions