Discord bot as player output #4931
Closed
j5155
started this conversation in
Feature requests and ideas
Replies: 2 comments 2 replies
-
|
Isn't this a duplicate https://github.com/orgs/music-assistant/discussions/2041 |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Yeah, that's reasonable, if unfortunate. I won't publish my work then. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be really cool if a Discord voice channel could be used as a player output. This would work similarly to existing Discord music bots, but could have higher quality and pull from local files and paid platforms. A user would have to generate a bot token from discord.dev and provide it to Music Assistant, but this is very easy to do.
As I see it, this would have two largely-independent parts:
Audio output from Music Assistant to Discord. This would use the discord.py existing async python library to send the audio to Discord, which can already accept raw or Opus encoded audio. I think this is definitely doable and is just a case of format conversions, and I've already begin work on this.
Control of Music Assistant from Discord. This would be the usual Discord music bot interface, allowing users to search for and play songs, pause, skip forward and back, manage the queue, etc. I think most of this is pretty easy as long as it's possible for a provider to control Music Assistant like that.
One regularly-used feature that I'm less certain about is support for queueing arbitrary playlist links. Is there any way to convert a playlist link from any arbitrary platform into something Music Assistant can read and play from the library? Is it possible to pull that from individual service providers, or use a playlist platform conversion tool?
Another issue is what should show up as a player. I think what makes sense here is to have the user run a join command in discord, and then once the bot joins the voice channel, make that voice channel appear as a player. Discord doesn't allow bots to join multiple channels in the same server, so exposing channels the bot isn't already in seems like it would lead to very confusing UI as starting one player stops another.
Beta Was this translation helpful? Give feedback.
All reactions