jagrosh / MusicBot

🎶 A Discord music bot that's easy to set up and run yourself!
https://jmusicbot.com
Apache License 2.0
5.29k stars 2.54k forks source link

[Feature Request] Slash commands #664

Open diwako opened 3 years ago

diwako commented 3 years ago

Is your feature request related to a problem? Please describe. Discord recently added slash commands. That is when you just type in / and it shows you all kind of operations possible on a discord server. https://discord.com/developers/docs/interactions/slash-commands

Describe the solution you'd like As a user I want to be able to use slash commands to play, skip or stop music from the music bot

Describe the basic flow/steps of using this feature How this feature would be used:

  1. Type / into chat or press the slash button
  2. See a list of commands available from the music bot
  3. Select a command or press "tab" to auto complete it
omsenjalia commented 3 years ago

This is a great idea

ottowong commented 3 years ago

would love to see this too

TheGreatestJannet commented 3 years ago

According to discord.py apparently it is required to add them by 2022 or the bot will stop working: https://gist.github.com/Rapptz/4a2f62751b9600a31a0d3c78100287f1?a

bup0441 commented 3 years ago

Danny is right about the potential breakage of the Message Content Intent and needing slash commands if your bot is big enough, but this only applies to bots in more than 100 servers or verified bots. JMusicBots by design should not be used in more than a few servers at a time, so the Message Content Privileged Intent will not affect their function.

TheGreatestJannet commented 3 years ago

Oh I see. Thanks a lot for clarifying!

MichailiK commented 3 years ago

It was even planned to make the bot refuse to launch on verified bots.

DJMoffinz commented 3 years ago

Good idea. Great minds think alike, it would seem.

Codeize commented 3 years ago

It was even planned to make the bot refuse to launch on verified bots.

This is a really cheap incentive by Discord to force everyone to use their half baked system imo

MichailiK commented 3 years ago

It was even planned to make the bot refuse to launch on verified bots.

This is a really cheap incentive by Discord to force everyone to use their half baked system imo

idk if you understand what im saying: we may plan to bake in a check if the bot is verified & refuse to launch, saying musicbot isnt intended for large scale.

Codeize commented 3 years ago

It was even planned to make the bot refuse to launch on verified bots.

This is a really cheap incentive by Discord to force everyone to use their half baked system imo

idk if you understand what im saying: we may plan to bake in a check if the bot is verified & refuse to launch, saying musicbot isnt intended for large scale.

Ah I see, my apologies

MichailiK commented 3 years ago

Technical side note: This will likely require an update from JDA-Utilities, which is the command handler JMusicBot uses.

lilchancep commented 3 years ago

My apologies if I reading this wrong but it looks like support for slash commands was added on June 4th. Pull#1501

MichailiK commented 3 years ago

JDA-Utilities is responsible for handling commands in JMusicBot, so JDA-Utilities needs to be updated first.

Chew commented 2 years ago

JDA-Chewtils (fork of the above) has support for it. I know jag made the original lib so if he's fine with me switching to mine (or merging it into his) I can get it added to this bot very easily.

ghost commented 2 years ago

My bot is present on 150 servers but only a few at a time ever use the bot simultaneously. It would save me a lot of stress if this bot could support slash commands.

jagrosh commented 2 years ago

Using slash commands isn't really related to how many servers a private bot is on; it doesn't really change the functionality, and if used at the same time as non-slash commands, could potentially (slightly) worsen performance.

That being said, JMusicBot will add slash command support after JDA-Utils is updated to support them. This update is currently in-progress.

As a final note, JMusicBot is not intended to be run as a public bot, and running a copy of JMusicBot on more than 75 servers is not supported. Many systems in the bot are designed around maximum per-server quality (as would be expected for a private, self-hosted music bot), rather than being highly scalable. Because of this expectation, if a feature was added that required something only possible on a private bot, JMusicBot would become unusable on a public/large-server-count bot. If you're trying to run a public music bot, you're much better off writing your own bot from scratch that is designed to scale accordingly.

ghost commented 2 years ago

My bot is private but the community it serves has a lot of sub-servers. So it has to be verified which means it will be forced to use slash commands next month

On Mon, Mar 21, 2022, 8:48 PM John Grosh @.***> wrote:

Using slash commands isn't really related to how many servers a private bot is on; it doesn't really change the functionality, and if used at the same time as non-slash commands, could potentially (slightly) worsen performance.

That being said, JMusicBot will add slash command support after JDA-Utils is updated to support them. This update is currently in-progress.

As a final note, JMusicBot is not intended to be run as a public bot, and running a copy of JMusicBot on more than 75 servers is not supported. Many systems in the bot are designed around maximum per-server quality (as would be expected for a private, self-hosted music bot), rather than being highly scalable. Because of this expectation, if a feature was added that required something only possible on a private bot, JMusicBot would become unusable on a public/large-server-count bot. If you're trying to run a public music bot, you're much better off writing your own bot from scratch that is designed to scale accordingly.

— Reply to this email directly, view it on GitHub https://github.com/jagrosh/MusicBot/issues/664#issuecomment-1074346694, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKFEJD7MVJ7M777IKWIJUDVBDHBVANCNFSM42JNNGDQ . You are receiving this because you commented.Message ID: @.***>

jagrosh commented 2 years ago

Considering that the JDA-Utils slash command update is still in-progress, slash commands on JMusicBot will certainly not be ready before next month. You will need to create additional bot accounts and run multiple copies of JMusicBot if you intend to support more than 75 servers. Additionally, JMusicBot may be unusable on verified bots in the future, as the person running the bot is not the developer of the bot, as implied by the verification system.

ghost commented 2 years ago

Understood, thank you for your responsiveness and detailed replies.

evanw555 commented 2 years ago

I'm running a private instance of this bot for 1 private server, so the privileged message intents problem is not present for me. My biggest concern is the spam generated by using plaintext message commands (it annoys members of my server).

Once slash commands are in development, I'm hoping that there will be a configuration option for making all command replies ephemeral (i.e. only show the response to the user sending the command). This would reduce a lot of the noise generated by this bot on my server. Furthermore, it would be great if the admin could disable plaintext message commands, as I'd like to reduce the spam ASAP.

Thanks for continuing to update this bot, and thanks for your intent to support slash commands.

arnon001 commented 1 year ago

(first for 2023) when this will be updated?

sedric commented 1 year ago

JDA-Utils seems dormant : last commit is a year old now. May it be removed from dependencies as you did for GiveawayBot ?

jagrosh commented 1 year ago

JDA-Utils is still necessary for JMusicBot, and JMusicBot will get slash command support when I finish my JDA5 update for JDA-Utils

Shiny1708 commented 1 year ago

Any updates on this?

Grant-K commented 1 year ago

Any updates on this?

I second this been about 2 months since last update on implementation would be very nice to keep things uniform

MichailiK commented 1 year ago

We’re still awaiting JDA-Utilities updates.

Grant-K commented 1 year ago

We’re still awaiting JDA-Utilities updates.

They are kinda far behind considering when slashs were announced and enforced but fair enough i believe thats a free time project

jagrosh commented 1 year ago

Both this and JDA Utils are "free time projects," and I'm about 70% finished with the slash commands update for JDA Utils

Grant-K commented 1 year ago

Both this and JDA Utils are "free time projects," and I'm about 70% finished with the slash commands update for JDA Utils

Much Obliged just read the documentation seems like alot of code change required pretty much re doing most commands

Grant-K commented 1 year ago

Wait doesnt your vortex bot use JDA?

userzfr commented 1 year ago

It's a very good idea

GeorgesAlkhouri commented 1 year ago

Thanks for the time you put in!

othello777 commented 1 year ago

it looks like Pull#1501 got merged. does that mean there is slash command support now? I reinvited my bot with applications.commands permissions, but it didnt seem to do much

jagrosh commented 1 year ago

it looks like Pull#1501 got merged. does that mean there is slash command support now? I reinvited my bot with applications.commands permissions, but it didnt seem to do much

This is irrelevant, support has not been added yet because I am still working on the JDA-Utils update.

randomdeveloperdude commented 7 months ago

Any updates?

MichailiK commented 7 months ago

There is still work being done on a JDA-Utils update.

Lovasz-Akos commented 4 months ago

can't wait for this

BarkerB commented 3 months ago

Really looking forward to this feature, thanks for all your hard work with JDA Utils and JMusicBot!

Zammer8 commented 2 weeks ago

@jagrosh Any plans for adding this? I'd love it! It would also let us customize each command's permissions easily, with the Integrations tab, which lets people control Slash Command Perms.