fix:修复麦麦好奇和message_api的一个错误

This commit is contained in:
SengokuCola
2025-09-30 01:29:10 +08:00
parent e2310de6b5
commit b2eec7d3b1
6 changed files with 63 additions and 40 deletions

View File

@@ -81,7 +81,8 @@ def find_messages(
query = query.where(Messages.user_id != global_config.bot.qq_account)
if filter_command:
query = query.where(not Messages.is_command)
# 使用按位取反构造 Peewee 的 NOT 条件,避免直接与 False 比较
query = query.where(~Messages.is_command)
if limit > 0:
if limit_mode == "earliest":