mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-07 12:43:35 +08:00
🐛 receive_resp
不计算消息冷却 (#96)
This commit is contained in:
parent
f675eac8ed
commit
6f21ebcd31
@ -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:
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user