Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.

Commit 3a3d10b

Browse files
committed
fix: 数据库消息数+1卡这了
1 parent 37e5abd commit 3a3d10b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/xybot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async def process_message(self, message: Dict[str, Any]):
4343
"""处理接收到的消息"""
4444

4545
# 数据库消息数+1先
46-
await self.key_db.set("messages", str(int(await self.key_db.get("messages")) + 1))
46+
await self.key_db.set("messages", str(int(await self.key_db.get("messages") or 0) + 1))
4747

4848
msg_type = message.get("MsgType")
4949

0 commit comments

Comments
 (0)