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

Add server.on as a shortcut for hooks.add #62

Closed
dblock opened this issue Mar 28, 2016 · 3 comments
Closed

Add server.on as a shortcut for hooks.add #62

dblock opened this issue Mar 28, 2016 · 3 comments

Comments

@dblock
Copy link
Collaborator

dblock commented Mar 28, 2016

Add server.on, eg.

server.hooks.add(:hello, MyBot::Hooks::UserChange.new)

could become

server.on :hello do
  # implementation
end

cc: @dramalho, thoughts?

@laertispappas
Copy link
Contributor

I think that hooks method and the Set implementation should be deprecated as well since they are implementation details and should not be part of the public API.

I would like to prepare a PR and add the on shorthand that you proposed. What do you think about the deprecation that I mentioned above?

Best
LP

@dblock
Copy link
Collaborator Author

dblock commented Jun 20, 2017

I'd like to see that code.

@dblock
Copy link
Collaborator Author

dblock commented Mar 25, 2019

Resolved via #147

@dblock dblock closed this as completed Mar 25, 2019
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

2 participants