mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
feat: add English command aliases for Discord compatibility
This commit is contained in:
@@ -116,7 +116,7 @@ class QQGroupDailyAnalysis(Star):
|
||||
except Exception as e:
|
||||
logger.error(f"插件资源清理失败: {e}")
|
||||
|
||||
@filter.command("群分析")
|
||||
@filter.command("群分析", alias=["group_analysis"])
|
||||
@filter.permission_type(PermissionType.ADMIN)
|
||||
async def analyze_group_daily(
|
||||
self, event: AiocqhttpMessageEvent, days: int | None = None
|
||||
@@ -324,7 +324,7 @@ class QQGroupDailyAnalysis(Star):
|
||||
f"❌ 分析失败: {str(e)}。请检查网络连接和LLM配置,或联系管理员"
|
||||
)
|
||||
|
||||
@filter.command("设置格式")
|
||||
@filter.command("设置格式", alias=["set_format"])
|
||||
@filter.permission_type(PermissionType.ADMIN)
|
||||
async def set_output_format(
|
||||
self, event: AiocqhttpMessageEvent, format_type: str = ""
|
||||
@@ -371,7 +371,7 @@ class QQGroupDailyAnalysis(Star):
|
||||
self.config_manager.set_output_format(format_type)
|
||||
yield event.plain_result(f"✅ 输出格式已设置为: {format_type}")
|
||||
|
||||
@filter.command("设置模板")
|
||||
@filter.command("设置模板", alias=["set_template"])
|
||||
@filter.permission_type(PermissionType.ADMIN)
|
||||
async def set_report_template(
|
||||
self, event: AiocqhttpMessageEvent, template_input: str = ""
|
||||
@@ -442,7 +442,7 @@ class QQGroupDailyAnalysis(Star):
|
||||
self.config_manager.set_report_template(template_name)
|
||||
yield event.plain_result(f"✅ 报告模板已设置为: {template_name}")
|
||||
|
||||
@filter.command("查看模板")
|
||||
@filter.command("查看模板", alias=["view_templates"])
|
||||
@filter.permission_type(PermissionType.ADMIN)
|
||||
async def view_templates(self, event: AiocqhttpMessageEvent):
|
||||
"""
|
||||
@@ -528,7 +528,7 @@ class QQGroupDailyAnalysis(Star):
|
||||
# 使用 Nodes 包装成一个合并转发消息
|
||||
yield event.chain_result([Nodes(node_list)])
|
||||
|
||||
@filter.command("安装PDF")
|
||||
@filter.command("安装PDF", alias=["install_pdf"])
|
||||
@filter.permission_type(PermissionType.ADMIN)
|
||||
async def install_pdf_deps(self, event: AiocqhttpMessageEvent):
|
||||
"""
|
||||
@@ -550,7 +550,7 @@ class QQGroupDailyAnalysis(Star):
|
||||
logger.error(f"安装 PDF 依赖失败: {e}", exc_info=True)
|
||||
yield event.plain_result(f"❌ 安装过程中出现错误: {str(e)}")
|
||||
|
||||
@filter.command("分析设置")
|
||||
@filter.command("分析设置", alias=["analysis_settings"])
|
||||
@filter.permission_type(PermissionType.ADMIN)
|
||||
async def analysis_settings(
|
||||
self, event: AiocqhttpMessageEvent, action: str = "status"
|
||||
|
||||
Reference in New Issue
Block a user