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

Switch from text command to slash command #56

Closed
utarwyn opened this issue Aug 14, 2021 · 7 comments · Fixed by #113 or #156
Closed

Switch from text command to slash command #56

utarwyn opened this issue Aug 14, 2021 · 7 comments · Fixed by #113 or #156
Assignees
Labels
status: help wanted Issues that need further investigation. type: enhancement Features and feature requests.
Milestone

Comments

@utarwyn
Copy link
Owner

utarwyn commented Aug 14, 2021

As Discord is evolving months after months, a new feature has been added to use slash commands instead of text commands [1]. This improves accessibility for Discord users. That's why I thinking of moving the module in that way and deprecate text commands.

Also to support users privacy, a change wiil be made next year to Discord API to limit certified bots to use message contents [2]. I think it's a good decision and I would like to do the same for the module.

Feel free to give your feedbacks about that idea 😄

[1] Discord.js article about the subject: https://blog.discord.com/slash-commands-are-here-8db0a385d9e6
[2] Modifications on Discord.js API : https://support-dev.discord.com/hc/en-us/articles/4404772028055

@utarwyn utarwyn added type: enhancement Features and feature requests. status: help wanted Issues that need further investigation. labels Aug 14, 2021
@utarwyn utarwyn self-assigned this Aug 14, 2021
@humblefool13
Copy link

Yes , i was gonna ask for it , you should add ways to use slash module through slash commands :)

@utarwyn
Copy link
Owner Author

utarwyn commented Aug 18, 2021

What I propose in details to implement this feature and also to keep text commands if needed by some users:

Starting from 2.2.x:

  • A new option called slashCommand will be created to add support for both commands, text command will remain the default to do not break bots

Starting from v3.x.x:

  • command option will become textCommand and the text command will be deprecated
  • slashCommand option will become command to use the slash command by default

The objective of this change is to keep both commands but to only enable slash command by default.

An example on how to register a slash command using Discord v12.5:
https://github.com/redteadeveloper/Slasher/blob/f41169b49911a14fb04ebe512510fbf52cee7fc8/index.js#L29-L33

@MagesticChicen
Copy link

I believe the option to use text commands should always be there in addition to slash commands, since discord is only removing access to message content for verified applications all unverified bots will have access to message content and every verified application who has been granted the intent will also.

In this scenario in which the developer has access to message content it may be within your best interest to continue to provide an option for text based commands because it could be what a small server prefers, the standard for other commands the bot has or even just what they are used to.

Text commands being removed from version 3 seems it may limit or confuse users who do not want to use slash commands (especially when considering message content will not be out of reach for some developers)
Therefore surely it would be upmost inclusive to provide the option for one, the other or both even after the 9 month lee-way period from Discord themselves...
Just an idea

@MagesticChicen
Copy link

MagesticChicen commented Aug 31, 2021

Also perhaps a quicker way to keep the node requirement down to only v14 could be to install a master branch version that was created prior to the addition of the version 16 requirement (I'm using a version of v13 that functions on node 14 like this)
Here's one --> here

@utarwyn
Copy link
Owner Author

utarwyn commented Aug 31, 2021

In this scenario in which the developer has access to message content it may be within your best interest to continue to provide an option for text based commands because it could be what a small server prefers, the standard for other commands the bot has or even just what they are used to.

Thank you for the feedback. I understand your point of view and I know that a part of developers will continue to use text commands. As the module seems to be relatively stable, the third version of it should not be out before 2022-2023, so I will support both options for now and I will see how it goes in next months.

I do not want to confuse users and I would like to be as inclusive as possible. The module is designed with latest Discord guidelines and bot design practices in mind. If users are still using text commands I will leave the option as is and do not remove it completly. I have edited my last comment to take this idea into consideration.

Therefore surely it would be upmost inclusive to provide the option for one, the other or both even after the 9 month lee-way period from Discord themselves...

You are talking about the possibility to enable both at the same time? Is that really useful for users?


Also perhaps a quicker way to keep the node requirement down to only v14 could be to install a master branch version that was created prior to the addition of the version 16 requirement (I'm using a version of v13 that functions on node 14 like this)

Thank you for the suggestion, I'll check it out! I'm a bit confused because Discord.js v13 is not backwards compatible at all, so I'm afraid it will not be easy to have the same source code for both versions. I'm still working on this.

@MagesticChicen
Copy link

MagesticChicen commented Aug 31, 2021

Ah alright that sounds good
And yes I wondered whether the option to enable both slash commands and text based at the same time allows for users who understand the previous system to interact while still providing the new command meta to which Discord recommend
Certainly not a need more of a convenience oriented idea

The discordjs version I linked should be able to run v13 on node 14 the only inconvenience is as you would expect from a dev branch some bugs might be present, as long as no changes affect the functionality it could work. See v13.1.0 changelog for issues present within v13.0.0 and previous commits
If it works you wouldn't even need an option for 16 you could just have the package functioning on node 14+

Note: Using the version I provided will also hinder ability to use context menus

@utarwyn
Copy link
Owner Author

utarwyn commented Nov 22, 2021

Slash command is coming soon! 👀
In both releases 3.0.0 (discord.js v13) and 2.2.0 (discord.js v12).

https://i.gyazo.com/0209f8e4a602bd7f23fa2c9ecc123cb1.gif

To avoid API rate limit errors, I have also decided to add two admin commands ?tttdeploy and ?tttdelete to register or unregister the command which can be defined in configuration and locale files. A new wiki page will explain how to setup it. The README will also be updated soon.

@utarwyn utarwyn added this to the 3.x.x milestone Nov 22, 2021
@utarwyn utarwyn mentioned this issue Nov 22, 2021
@utarwyn utarwyn linked a pull request Dec 4, 2021 that will close this issue
@utarwyn utarwyn pinned this issue Dec 4, 2021
@utarwyn utarwyn closed this as completed Dec 4, 2021
@utarwyn utarwyn linked a pull request Jan 24, 2022 that will close this issue
utarwyn added a commit that referenced this issue Jan 24, 2022
utarwyn added a commit that referenced this issue Jan 24, 2022
@utarwyn utarwyn unpinned this issue Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted Issues that need further investigation. type: enhancement Features and feature requests.
Projects
None yet
3 participants