mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
Update task_hook.py
This commit is contained in:
parent
1fe41dd823
commit
3c8983e753
@ -14,10 +14,20 @@ async def handle_api_call(bot: Bot, api: str, data: Dict[str, Any]):
|
|||||||
or api == "send_group_msg"
|
or api == "send_group_msg"
|
||||||
)
|
)
|
||||||
and (
|
and (
|
||||||
(r := re.search("^\[\[_task\|(.*)]]", str(data["message"]).strip()))
|
(
|
||||||
|
r := re.search(
|
||||||
|
"^\[\[_task\|(.*)]]",
|
||||||
|
data["message"].strip()
|
||||||
|
if isinstance(data["message"], str)
|
||||||
|
else str(data["message"]["text"]).strip(),
|
||||||
|
)
|
||||||
|
)
|
||||||
or (
|
or (
|
||||||
r := re.search(
|
r := re.search(
|
||||||
"^[[_task\|(.*)]]", str(data["message"]).strip()
|
"^[[_task\|(.*)]]",
|
||||||
|
data["message"].strip()
|
||||||
|
if isinstance(data["message"], str)
|
||||||
|
else str(data["message"]["text"]).strip(),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user