功能:通过 HTTP API 实现 Danding_QqPush 插件,用于 QQ 群通知
- 增加了通过外部 HTTP API 向 QQ 群组发送消息的核心功能。 - 实现了对长文本消息的图片渲染,以避免被认定为垃圾信息。 - 支持在消息中提及特定的 QQ 用户。 - 创建了用于 API 令牌和图片渲染设置的配置选项。 - 开发了一个测试脚本以验证 API 功能。 - 对现有代码进行了重构,以提高组织性和可维护性。
This commit is contained in:
@@ -25,8 +25,8 @@ plugin_config = get_plugin_config(Config)
|
||||
async def handle_api_result(
|
||||
bot: Bot, exception: Optional[Exception], api: str, data: Dict[str, Any], result: Any
|
||||
):
|
||||
"""拦截 send_msg API 调用,监控发出的消息"""
|
||||
if api != "send_msg" or exception:
|
||||
"""拦截 send_msg 和 send_group_msg API 调用,监控发出的消息"""
|
||||
if api not in ["send_msg", "send_group_msg"] or exception:
|
||||
return
|
||||
|
||||
# 获取消息 ID
|
||||
|
||||
Reference in New Issue
Block a user