def register_event(event_type, include_subclasses=False):
    """
    Register a method to handle a specific `opsdroid.events.Event` object.

    Args:
        event_type (Event): The event class this method can handle.
        include_subclasses (bool): Allow the function to trigger on subclasses of the registered
            event. Defaults to False.

    """

    def decorator(func):
        if hasattr(func, "__opsdroid_events__"):
            func.__opsdroid_events__.append(event_type)
        else:
            func.__opsdroid_events__ = [event_type]

        func.__opsdroid_match_subclasses__ = include_subclasses
        return func

    return decorator