mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-19 19:06:07 +00:00
fix: 私聊不可用 #74
This commit is contained in:
@@ -29,12 +29,13 @@ def process_message(launcher_type: str, launcher_id: int, text_message: str, mes
|
|||||||
session_name = "{}_{}".format(launcher_type, launcher_id)
|
session_name = "{}_{}".format(launcher_type, launcher_id)
|
||||||
|
|
||||||
# 检查是否被禁言
|
# 检查是否被禁言
|
||||||
result = mgr.bot.member_info(target=launcher_id, member_id=mgr.bot.qq).get()
|
if launcher_type == 'group':
|
||||||
result = asyncio.run(result)
|
result = mgr.bot.member_info(target=launcher_id, member_id=mgr.bot.qq).get()
|
||||||
if result.mute_time_remaining > 0:
|
result = asyncio.run(result)
|
||||||
logging.info("机器人被禁言,跳过消息处理(group_{},剩余{}s)".format(launcher_id,
|
if result.mute_time_remaining > 0:
|
||||||
result.mute_time_remaining))
|
logging.info("机器人被禁言,跳过消息处理(group_{},剩余{}s)".format(launcher_id,
|
||||||
return reply
|
result.mute_time_remaining))
|
||||||
|
return reply
|
||||||
|
|
||||||
pkg.openai.session.get_session(session_name).acquire_response_lock()
|
pkg.openai.session.get_session(session_name).acquire_response_lock()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user