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

Slash commands as events #294

Closed
warcode opened this issue Jul 10, 2015 · 2 comments
Closed

Slash commands as events #294

warcode opened this issue Jul 10, 2015 · 2 comments

Comments

@warcode
Copy link
Contributor

warcode commented Jul 10, 2015

Slash commands such as

/topic
/me
/slash parameter1 parameter2

should have a built-in handler that lets plugins register for the callbacks.

Returns the parameter(s) entered by the user.

@sampaiodiego
Copy link
Member

we do have plugins and handlers for this =)

as you can see the /me command on https://github.com/RocketChat/Rocket.Chat/tree/master/packages/rocketchat-me

so, unless you want a specific command I'll close this issue, ok?

@warcode
Copy link
Contributor Author

warcode commented Jul 11, 2015

As it is now each plugin has to check for /x in a message and handle it from there.

What I am proposing is a single system that checks for /x before any real "message" is sent, generating a callback to the registered function for x. This makes it possible to restrict having a command affecting multiple plugins, which might break things. The current system also makes it cumbersome to have a /help listing all the available slash commands, while a single slash command handler would know the registered commands and be able to list them all.

Peym4n pushed a commit to redlink-gmbh/Rocket.Chat that referenced this issue Apr 6, 2018
…Adapt-assistify-toolbar

Adapt assistify room types' toolbars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants