mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
UPDATE
This commit is contained in:
parent
7b0785248c
commit
372aa2c122
@ -14,26 +14,21 @@ async def _(bot: Bot, api: str, data: Dict[str, Any]):
|
||||
task = None
|
||||
group_id = None
|
||||
try:
|
||||
if (
|
||||
api == "send_msg" and data.get("message_type") == "group"
|
||||
) or api == "send_group_msg":
|
||||
msg = unescape(
|
||||
data["message"].strip()
|
||||
if isinstance(data["message"], str)
|
||||
else str(data["message"]["text"]).strip()
|
||||
)
|
||||
if (
|
||||
(
|
||||
(api == "send_msg" and data.get("message_type") == "group")
|
||||
or api == "send_group_msg"
|
||||
)
|
||||
and (
|
||||
r := re.search(
|
||||
if r := re.search(
|
||||
"^\[\[_task\|(.*)]]",
|
||||
data["message"].strip()
|
||||
if isinstance(data["message"], str)
|
||||
else str(data["message"]["text"]).strip(),
|
||||
)
|
||||
)
|
||||
and r.group(1) in group_manager.get_task_data().keys()
|
||||
):
|
||||
if r.group(1) in group_manager.get_task_data().keys():
|
||||
task = r.group(1)
|
||||
group_id = data["group_id"]
|
||||
except Exception as e:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user