Replies: 1 comment 3 replies
-
This seems out-of-scope for this project. A web interface for an in-Discord music player sounds like a separate project entirely, and you'd probably find it easier to write it from scratch than try to create some sort of adapter for JMusicBot. Regardless of your approach, I highly doubt anything like this would be added to JMusicBot, as it would undoubtedly add additional libraries (more file size), require refactors of most of the code, and add unnecessary complication/confusion for most users, and at worst-case, a security concern that users could potentially get tricked into configuring maliciously. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, first of all thanks for this piece of software, we're using the bot for quite some time now and we're very happy with it.
I was wondering about the possibility of implementing a way to execute bot commands not just from a Discord text channel, but also locally from the machine the bot is running on.
Let me quickly describe the use case:
-play dir/file.mp3
I would like to make that less painful by writing a web UI for people to click the desired file on the list and have it automatically played (I would do that myself, obviously). However, this would require a way to make the bot accept commands from "outside" - not just the Discord text channels, but for example a locally-bound port that would accept some payload with a command to execute. A curl mock for that would be something like:
curl -H 'Content-Type: application/json' -d '{"discord_userid":"317791173500xxxxxx", "command": "play dir/file.mp3"}' 127.0.0.1:1234
executed locally from the machine JMusicBot is running on.
This should cause the bot to play the sound in the voice channel the discord_userid is connected to.
Obviously, this doesn't have to be limited to just -play, could be any number of commands. This could bring benefits to people looking to do some external integration with the bot, obviously due to security considerations should be disabled by default and maybe limited to localhost only. Not hellbent on bound port/json either - there are many mechanisms for that, just wondering what do you think and if it's doable in the codebase without major changes.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions