diff --git a/src/decorators.py b/src/decorators.py index a373f94..d4cd46f 100644 --- a/src/decorators.py +++ b/src/decorators.py @@ -181,9 +181,6 @@ class hook: self.__doc__ = self.func.__doc__ return self - def caller(self, *args): - return self.func(*args) - @staticmethod def unhook(hookid): for each in list(HOOKS): diff --git a/src/handler.py b/src/handler.py index 319fbf7..e0d70c4 100644 --- a/src/handler.py +++ b/src/handler.py @@ -94,7 +94,7 @@ def unhandled(cli, prefix, cmd, *args): if isinstance(arg, bytes): largs[i] = arg.decode('ascii') for fn in decorators.HOOKS.get(cmd, []): try: - fn.caller(cli, prefix, *largs) + fn.func(cli, prefix, *largs) except Exception as e: if botconfig.DEBUG_MODE: raise e