You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest adding a unified event system to BBot. The interface could be something like this:
classModule(object):
defon(self, *args):
""" .. :py:method:: on(events, handler) on(events, selector, handler) Attach an event handler function to one or more events, optionally limited by a selector. An event could be an IRC command name (like ``"NICK"``), an IRC command numeric string (like ``400``) or an abstract event (like ``"LEAVE"``). The selection passes if the "main data" (such as the text for a message) is either equal to the selector or if ``selector.match(data)`` is ``True``. When an event is matched and the selection passes, the handler is called with a Message object as its argument. :param events: the events to handle :param selector: the selectors :param handler: the handler function :type handler: :py:class:`~types.FunctionType` """
I apologize in advance if the reST isn't very good.
The text was updated successfully, but these errors were encountered:
I suggest adding a unified event system to BBot. The interface could be something like this:
I apologize in advance if the reST isn't very good.
The text was updated successfully, but these errors were encountered: