🐛 receive_resp不计算消息冷却 (#96)

This commit is contained in:
KimigaiiWuyi 2025-01-23 20:06:02 +08:00
parent f675eac8ed
commit 6f21ebcd31
2 changed files with 9 additions and 9 deletions

View File

@ -34,14 +34,6 @@ else:
async def handle_event(ws: _Bot, msg: MessageReceive, is_http: bool = False):
# 是否启用相同消息CD
if same_user_cd != 0 and cooldown_tracker.is_on_cooldown(
msg.user_id,
same_user_cd,
):
logger.trace(f'[GsCore][触发相同消息CD] 忽略{msg.user_id}该消息!')
return
# 获取用户权限,越小越高
msg.user_pm = user_pm = await get_user_pml(msg)
event = await msg_process(msg)
@ -107,6 +99,14 @@ async def handle_event(ws: _Bot, msg: MessageReceive, is_http: bool = False):
if session_id == mutiply_instances[mutiply_map[temp_gid]].session_id:
return
# 是否启用相同消息CD
if same_user_cd != 0 and cooldown_tracker.is_on_cooldown(
msg.user_id,
same_user_cd,
):
logger.trace(f'[GsCore][触发相同消息CD] 忽略{msg.user_id}该消息!')
return
is_start = False
if _command_start and event.raw_text:
for start in _command_start:

View File

@ -54,7 +54,7 @@ def check_start_tool(is_pip: bool = False):
PDM += PIP
POETRY += ' run pip'
UV += PIP
PYTHON += '-m pip'
PYTHON += ' -m pip'
if OTHER == 'python' or OTHER == 'auto':
OTHER = 'python -m pip'