Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: play uploaded file #51

Open
AGSPhoenix opened this issue Jan 13, 2022 · 1 comment
Open

Feature request: play uploaded file #51

AGSPhoenix opened this issue Jan 13, 2022 · 1 comment

Comments

@AGSPhoenix
Copy link
Contributor

A few users on my server want to be able to just post MP3s and have the bot play them out. It seems like a blank ::play call with the file attached would be a pretty simple way to do so.

Security considerations:

  • This ability should default to off, and require configuration changes to enable. lavaplayer and ukulele are not bug free, and probably contain vulnerabilities that could be exploited with enough effort. Bot operators should have to opt in to that risk.
  • As an extra spicy config option, the ability to fetch MP3s from an arbitrary URL would be a moderately useful bonus, as long as you aren't worried about your users setting up a server to get the bot's IP address. Would be something like ::play https://example.com/muzak.mp3

For a first implementation, it might be best to have the bot fetch the full file before playing (Maybe cap it at 100 MB for non-Discord links?). Some servers will disconnect clients downloading slowly, or won't support resuming a transfer, which would cut the playback off several minutes in. Not sure if Discord's CDN does this. Might not even be necessary? Could use some testing.

Freya, any objections to this functionality? Kinda toying with the idea of writing this up into a PR.

@freyacodes
Copy link
Owner

I believe that linking URLs will just attempt to play any audio the bot finds. This is done by streaming, which doesn't seem to be a common issue. Streaming also supports the use of internet radios.

Grabbing any attachment URL to use instead would be very easy.

The configuration properties you mentioned could also be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants