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

Support slash commands #146

Closed
multimeric opened this issue Dec 17, 2020 · 9 comments
Closed

Support slash commands #146

multimeric opened this issue Dec 17, 2020 · 9 comments

Comments

@multimeric
Copy link
Collaborator

multimeric commented Dec 17, 2020

Discord recently added "slash commands", which is a platform-supported method of defining bot commands, subcommands and arguments. It gives features like command completion, a better UI and discoverability for commands: https://discord.com/developers/docs/interactions/slash-commands.

I think this would be a great feature for judgebot. I'm happy to implement this once I get time. Currently this isn't natively supported by discord.js, so it's probably not worth starting until this PR is merged: discordjs/discord.js#5106 discordjs/discord.js#5448.

@thetayloredman
Copy link

One thing: you are limited to 50 guild commands and 50 global commands.

@multimeric
Copy link
Collaborator Author

Why is this a problem? Judgebot has like 14 commands as is. If it ever grows to beyond 50 I think that subcommands could be used to shrink this number.

@thetayloredman
Copy link

thetayloredman commented Dec 17, 2020 via email

@bra1n
Copy link
Owner

bra1n commented Dec 17, 2020

Ooh, nice feature! Thanks for the heads-up, when they finish the linked PR I think it could be used for judgebot. However, it looks like it would need a lot of rewriting and at least the webhook approach won't work with Emoji reactions, if I'm not mistaken. So we'll have to see how an "INTERACTION_CREATE" gateway event will be handled by Discord.JS.

@multimeric
Copy link
Collaborator Author

I think the bot can respond to the interaction with a regular message sent to the channel, at which point you can listen for reactions in the normal way. So I don't think this will be a huge issue.

@bra1n
Copy link
Owner

bra1n commented Dec 18, 2020

Let's hope that's going to be the case. :-)

@thetayloredman
Copy link

thetayloredman commented Dec 18, 2020 via email

@multimeric
Copy link
Collaborator Author

Okay slash commands are now enabled since discord.js 13.0.0 on August 6. So this feature is unblocked.

@multimeric
Copy link
Collaborator Author

Closed by #159.

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

No branches or pull requests

3 participants