From 0fe5f0ee9bd93924269434efc15676d3c07204bc Mon Sep 17 00:00:00 2001 From: liuwei Date: Tue, 8 Apr 2025 16:31:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E5=BD=92,=E5=85=B3=E9=97=AD=E6=8F=92?= =?UTF-8?q?=E4=BB=B6,=E5=BE=85=E5=90=8E=E7=BB=AD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/message_recall/config.toml | 2 +- plugins/message_recall/main.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/message_recall/config.toml b/plugins/message_recall/config.toml index 656d40c..9bbb4a2 100644 --- a/plugins/message_recall/config.toml +++ b/plugins/message_recall/config.toml @@ -1,4 +1,4 @@ [MessageRecall] -enable = true +enable = false command = ["#撤回"] command-format = "#撤回 3" \ No newline at end of file diff --git a/plugins/message_recall/main.py b/plugins/message_recall/main.py index a94a465..110d6a8 100644 --- a/plugins/message_recall/main.py +++ b/plugins/message_recall/main.py @@ -110,8 +110,9 @@ class MessageRecallPlugin(MessagePluginInterface): return True, "命令格式错误" try: - # 从数据库里面提取可以处理的消息and StrTalker ={roomid} and IsSender=1 - sql = (f"SELECT * FROM MSG where CreateTime > (strftime('%s', 'now') - 120)") + # 从数据库里面提取可以处理的消息and StrTalker ={roomid} + sql = (f"SELECT * FROM MSG where IsSender=1 and CreateTime > (strftime('%s', 'now') - 120) " + f"limit {parts[1]}") data = wcf.query_sql('MSG0.db', sql) self.LOG.info(f"SQL:{sql}\n 查询到可撤回数据: {data}") if not data: