diff --git a/qqbot/31-2/bot.py b/qqbot/31-2/bot.py index 73c421a..18a6d80 100755 --- a/qqbot/31-2/bot.py +++ b/qqbot/31-2/bot.py @@ -13,7 +13,7 @@ db.generate_mapping() @route("/pics/") def server_static(filepath): - return static_file(filepath, root="../../data/render/output") + return static_file(filepath, root="../../data/render/31-2/output") @post("/") @@ -22,14 +22,16 @@ def recv_msg(): if ( data["post_type"] == "message" and data["message_type"] == "group" - and data["group_id"] == 346058845 + and data["group_id"] in [346058845, 512621194] ): name = data["raw_message"] with db_session: query = select(m for m in Melee if m.name == name) + if query.count() == 0: + query = select(m for m in Shield if m.name == name) if query.count() > 0: return { - "reply": f"[CQ:image,file=http://localhost:7000/pics/{name}.png]", + "reply": f"[CQ:image,file=http://localhost:7000/pics/{name}.png,cache=0]", "at_sender": False, } return "OK"