mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-19 10:26:49 +00:00
🎨 change permission check from driver into adapter #46
This commit is contained in:
@ -9,6 +9,11 @@ def log(level: str, message: str):
|
||||
...
|
||||
|
||||
|
||||
def get_auth_bearer(
|
||||
access_token: Optional[str] = ...) -> Union[Optional[str], NoReturn]:
|
||||
...
|
||||
|
||||
|
||||
def escape(s: str, *, escape_comma: bool = ...) -> str:
|
||||
...
|
||||
|
||||
@ -69,6 +74,12 @@ class Bot(BaseBot):
|
||||
def type(self) -> str:
|
||||
...
|
||||
|
||||
@classmethod
|
||||
async def check_permission(cls, driver: Driver, connection_type: str,
|
||||
headers: dict,
|
||||
body: Optional[dict]) -> Union[str, NoReturn]:
|
||||
...
|
||||
|
||||
async def handle_message(self, message: dict):
|
||||
...
|
||||
|
||||
|
Reference in New Issue
Block a user