Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
Update qq.py
Liwx20bec3bc266e
diff --git a/nanobot/channels/qq.py b/nanobot/channels/qq.pyindex 99a712b51..6c5804900 100644--- a/nanobot/channels/qq.py+++ b/nanobot/channels/qq.py@@ -56,7 +56,7 @@ class QQChannel(BaseChannel):self.config: QQConfig = configself._client: "botpy.Client | None" = Noneself._processed_ids: deque = deque(maxlen=1000)- self._msg_seq: int = 1 # Message sequence to avoid QQ API deduplication+ self._msg_seq: int = 1 # 消息序列号,避免被 QQ API 去重async def start(self) -> None:"""Start the QQ bot."""@@ -103,11 +103,13 @@ class QQChannel(BaseChannel):returntry:msg_id = msg.metadata.get("message_id")+ self._msg_seq += 1 # 递增序列号await self._client.api.post_c2c_message(openid=msg.chat_id,msg_type=0,content=msg.content,msg_id=msg_id,+ msg_seq=self._msg_seq, # 添加序列号避免去重)except Exception as e:logger.error("Error sending QQ message: {}", e)@@ -134,3 +136,4 @@ class QQChannel(BaseChannel):)except Exception:logger.exception("Error handling QQ message")+