def __call__(*args, **kwargs): functions = self._to_listener_functions( kwargs) if kwargs else list(args) primary_matcher = builtin_matchers.dialog_cancellation( callback_id, True) return self._register_listener(list(functions), primary_matcher, matchers, middleware)
def __call__(func): primary_matcher = builtin_matchers.dialog_cancellation( callback_id, True) return self._register_listener(func, primary_matcher, matchers, middleware)