forked from bot/app
🚀 测试文档工作流
This commit is contained in:
20
liteyuki/message/permission.py
Normal file
20
liteyuki/message/permission.py
Normal file
@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
|
||||
|
||||
@Time : 2024/8/19 下午10:55
|
||||
@Author : snowykami
|
||||
@Email : snowykami@outlook.com
|
||||
@File : permission.py
|
||||
@Software: PyCharm
|
||||
"""
|
||||
|
||||
from typing import Callable, Coroutine, TypeAlias
|
||||
|
||||
PERMISSION_HANDLER: TypeAlias = Callable[[str], bool | Coroutine[None, None, bool]]
|
||||
|
||||
|
||||
class Permission:
|
||||
def __init__(self, handler: PERMISSION_HANDLER):
|
||||
self.handler = handler
|
||||
|
Reference in New Issue
Block a user