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

Allow executing message/user commands via text commands #139

Open
2 tasks done
abitofevrything opened this issue Oct 6, 2023 · 1 comment
Open
2 tasks done

Allow executing message/user commands via text commands #139

abitofevrything opened this issue Oct 6, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@abitofevrything
Copy link
Member

abitofevrything commented Oct 6, 2023

Is your feature request related to a problem? Please describe.
Message and User commands aren't the easiest to use - they require users to know they exist in the first place, and even then are hidden behind a context menu, which makes them difficult for power users to use efficiently.

Describe the solution you'd like
Allow message commands to be executed by sending prefix command_name Convertable<Message> or by sending prefix command_name while replying to a message. The first executes the message command named command_name on the message referenced by the argument, and the second executes the message command command_name on the message that was replied to.
Similarly for user commands, they can be executed by sending prefix command_name Convertable<User>.

Additional context
This would be a breaking change as MessageContext and UserContext would have to be changed to no longer always include an interaction.

These options for executing message and user commands would not be registered as text slash commands as, if going through the slash command interface, users can simply use the existing context menu.

Questions to answer:

  • How is command_name determined? The names of user and message commands can include spaces, but this wouldn't work very well for command prefixes. Maybe we can allow both spaced and snake_cased command names?
  • Could we also allow sending prefix command_name while replying to a message to run a user command on the user that sent the message? If so, how do we handle messages sent by webhooks with no user attached?
@abitofevrything abitofevrything added the enhancement New feature or request label Oct 6, 2023
@abitofevrything abitofevrything added this to the 6.0.0 milestone Oct 6, 2023
@abitofevrything abitofevrything self-assigned this Oct 6, 2023
@abitofevrything
Copy link
Member Author

I'll go forward by setting command_name using the convertToKebabCase function already used for argument names, and I think we will disallow running user commands by replying as it is unintuitive.

@abitofevrything abitofevrything modified the milestones: 6.0.0, 6.1.0 Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

1 participant