feat:为组件方法提供新参数,暂时解决notice问题
This commit is contained in:
@@ -73,6 +73,9 @@ def find_messages(
|
||||
if conditions:
|
||||
query = query.where(*conditions)
|
||||
|
||||
# 排除 id 为 "notice" 的消息
|
||||
query = query.where(Messages.message_id != "notice")
|
||||
|
||||
if filter_bot:
|
||||
query = query.where(Messages.user_id != global_config.bot.qq_account)
|
||||
|
||||
@@ -167,6 +170,9 @@ def count_messages(message_filter: dict[str, Any]) -> int:
|
||||
if conditions:
|
||||
query = query.where(*conditions)
|
||||
|
||||
# 排除 id 为 "notice" 的消息
|
||||
query = query.where(Messages.message_id != "notice")
|
||||
|
||||
count = query.count()
|
||||
return count
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user