MusicBot icon indicating copy to clipboard operation
MusicBot copied to clipboard

[Feature Request] Slash commands

Open diwako opened this issue 3 years ago • 38 comments

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

diwako avatar Apr 02 '21 20:04 diwako

This is a great idea

omsenjalia avatar Jun 02 '21 16:06 omsenjalia

would love to see this too

ottowong avatar Jun 15 '21 21:06 ottowong

Now, with the new update of JDA it's possible.

Edit : But this has not yet been added.

hermitoff avatar Jul 24 '21 08:07 hermitoff

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

TheGreatestJannet avatar Aug 28 '21 07:08 TheGreatestJannet

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.

bup0441 avatar Aug 28 '21 07:08 bup0441

Oh I see. Thanks a lot for clarifying!

TheGreatestJannet avatar Aug 28 '21 07:08 TheGreatestJannet

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

MichailiK avatar Aug 28 '21 07:08 MichailiK

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

DJMoffinz avatar Sep 13 '21 04:09 DJMoffinz

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

Codeize avatar Sep 13 '21 06:09 Codeize

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.

MichailiK avatar Sep 13 '21 06:09 MichailiK

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

Codeize avatar Sep 13 '21 07:09 Codeize

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

MichailiK avatar Sep 27 '21 18:09 MichailiK

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

lilchancep avatar Oct 04 '21 19:10 lilchancep

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

MichailiK avatar Oct 04 '21 19:10 MichailiK

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.

Chew avatar Oct 12 '21 19:10 Chew

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.

ghost avatar Mar 21 '22 18:03 ghost

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.

jagrosh avatar Mar 21 '22 19:03 jagrosh

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: @.***>

ghost avatar Mar 21 '22 19:03 ghost

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.

jagrosh avatar Mar 21 '22 20:03 jagrosh

Understood, thank you for your responsiveness and detailed replies.

ghost avatar Mar 27 '22 14:03 ghost

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.

evanw555 avatar Apr 06 '22 00:04 evanw555

(first for 2023) when this will be updated?

arnon001 avatar Jan 22 '23 07:01 arnon001

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

sedric avatar Jan 28 '23 04:01 sedric

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

jagrosh avatar Jan 31 '23 17:01 jagrosh

Any updates on this?

Shiny1708 avatar Mar 06 '23 22:03 Shiny1708

Any updates on this?

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

Grant-K avatar Mar 25 '23 00:03 Grant-K

We’re still awaiting JDA-Utilities updates.

MichailiK avatar Mar 25 '23 00:03 MichailiK

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

Grant-K avatar Mar 25 '23 00:03 Grant-K

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

jagrosh avatar Mar 25 '23 00:03 jagrosh

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 avatar Mar 25 '23 00:03 Grant-K

Wait doesnt your vortex bot use JDA?

Grant-K avatar Mar 25 '23 00:03 Grant-K