Event handler registration is tedious
geewiz opened this issue · comments
Jochen Lillich commented
Not having to call register_handler
for each event handler would simplify the bot setup. Using Module composition instead of inheritance would allow us to use self.included
to auto-register all the event handlers in a bot application.
Jochen Lillich commented
Example code from GoRails:
module Example
class << self
attr_reader :registered
end
def self.include(base)
(@registered ||= []) << base
end
end