gsuid_core/gsuid_core/message_models.py
2023-10-08 23:33:34 +08:00

16 lines
657 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from typing import List, Literal, Optional
from msgspec import Struct
class Button(Struct):
text: str
data: str # 具体数据
pressed_text: Optional[str] = None # 按下之后显示的值
style: Literal[0, 1] = 1 # 0灰色线框1蓝色线框
action: Literal[0, 1, 2] = 2 # 0跳转按钮1回调按钮2命令按钮
permisson: Literal[0, 1, 2, 3] = 2 # 0指定用户1管理者2所有人可按3指定身份组
specify_role_ids: List[str] = [] # 仅限频道可用
specify_user_ids: List[str] = [] # 指定用户
unsupport_tips: str = '您的客户端暂不支持该功能, 请升级后适配...'