feat(github_parser): 添加GitHub仓库信息查询功能

- 新增github_parser插件,支持通过命令或自动解析链接查询GitHub仓库信息
- 添加github_repo.html模板用于渲染仓库信息图片
- 优化图片管理器支持高质量截图和CSS缩放
- 重构消息事件类权限常量定义方式
- 更新帮助页面样式为三列布局并优化响应式设计
This commit is contained in:
2026-01-20 18:33:46 +08:00
parent 1ec066c9cb
commit 5f943c1792
6 changed files with 526 additions and 51 deletions

View File

@@ -72,20 +72,7 @@ class MessageEvent(OneBotEvent):
def post_type(self) -> str:
return EventType.MESSAGE
@property
def ADMIN(self) -> Permission:
"""权限级别常量,用于装饰器参数"""
return MESSAGE_EVENT_ADMIN
@property
def OP(self) -> Permission:
"""权限级别常量,用于装饰器参数"""
return MESSAGE_EVENT_OP
@property
def USER(self) -> Permission:
"""权限级别常量,用于装饰器参数"""
return MESSAGE_EVENT_USER
async def reply(self, message: Union[str, "MessageSegment", List["MessageSegment"]], auto_escape: bool = False):
"""
@@ -97,6 +84,12 @@ class MessageEvent(OneBotEvent):
raise NotImplementedError("reply method must be implemented by subclasses")
# 在类定义之后添加权限常量作为类变量
MessageEvent.ADMIN = MESSAGE_EVENT_ADMIN
MessageEvent.OP = MESSAGE_EVENT_OP
MessageEvent.USER = MESSAGE_EVENT_USER
@dataclass(slots=True)
class PrivateMessageEvent(MessageEvent):
"""