🚑 Fix db_session and CQ escape
This commit is contained in:
parent
3d21d83bf0
commit
b650acb674
1 changed files with 7 additions and 6 deletions
13
qqbot/bot.py
13
qqbot/bot.py
|
@ -25,12 +25,13 @@ def recv_msg():
|
||||||
and data["group_id"] == 346058845
|
and data["group_id"] == 346058845
|
||||||
):
|
):
|
||||||
name = data["raw_message"]
|
name = data["raw_message"]
|
||||||
query = select(m for m in Melee if m.name == name)
|
with db_session:
|
||||||
if query.count() > 0:
|
query = select(m for m in Melee if m.name == name)
|
||||||
return {
|
if query.count() > 0:
|
||||||
"reply": f"[CQ]:image,file=http://localhost:7000/pics/{name}.png",
|
return {
|
||||||
"at_sender": False,
|
"reply": f"[CQ:image,file=http://localhost:7000/pics/{name}.png]",
|
||||||
}
|
"at_sender": False,
|
||||||
|
}
|
||||||
return "OK"
|
return "OK"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue