zhenxun_bot/zhenxun/builtin_plugins/hooks/auth/exception.py

27 lines
584 B
Python
Raw Normal View History

2025-01-08 15:23:10 +08:00
class IsSuperuserException(Exception):
pass
2025-04-08 17:11:44 +08:00
class SkipPluginException(Exception):
def __init__(self, info: str, *args: object) -> None:
super().__init__(*args)
self.info = info
def __str__(self) -> str:
return self.info
def __repr__(self) -> str:
return self.info
class PermissionExemption(Exception):
def __init__(self, info: str, *args: object) -> None:
super().__init__(*args)
self.info = info
def __str__(self) -> str:
return self.info
def __repr__(self) -> str:
return self.info