mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 07:08:18 +00:00
sily_girl fix a bug (#214)
Co-authored-by: Xtao_dada <xtao@xtaolink.cn>
This commit is contained in:
parent
18b55272b1
commit
1001750f77
@ -862,7 +862,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "silly_girl",
|
"name": "silly_girl",
|
||||||
"version": "1.03",
|
"version": "1.031",
|
||||||
"section": "chat",
|
"section": "chat",
|
||||||
"maintainer": "cdle",
|
"maintainer": "cdle",
|
||||||
"size": "3 kb",
|
"size": "3 kb",
|
||||||
|
@ -95,22 +95,25 @@ async def poll(data):
|
|||||||
try:
|
try:
|
||||||
replies = json.loads(req_data.text)
|
replies = json.loads(req_data.text)
|
||||||
results = []
|
results = []
|
||||||
print(replies)
|
|
||||||
for reply in replies:
|
for reply in replies:
|
||||||
if reply["whiltelist"] != "":
|
if reply["whiltelist"] != "":
|
||||||
persistent_vars["sillyGirl"]['whiltelist'] = reply["whiltelist"]
|
persistent_vars["sillyGirl"]['whiltelist'] = reply["whiltelist"]
|
||||||
await persistent_vars["sillyGirl"]['context'].edit("获取白名单中...")
|
await persistent_vars["sillyGirl"]['context'].edit("获取白名单中...")
|
||||||
continue
|
continue
|
||||||
if reply["delete"]:
|
if reply["delete"]:
|
||||||
|
try:
|
||||||
await bot.edit_message(reply["chat_id"], reply["id"], "打错字了,呱呱~")
|
await bot.edit_message(reply["chat_id"], reply["id"], "打错字了,呱呱~")
|
||||||
|
except Exception as e:
|
||||||
|
""""""
|
||||||
|
try:
|
||||||
await bot.delete_messages(reply["chat_id"], [reply["id"]])
|
await bot.delete_messages(reply["chat_id"], [reply["id"]])
|
||||||
continue
|
except Exception as e:
|
||||||
|
""""""
|
||||||
if reply["id"] != 0:
|
if reply["id"] != 0:
|
||||||
try:
|
try:
|
||||||
await bot.edit_message(reply["chat_id"], reply["id"], reply["text"])
|
await bot.edit_message(reply["chat_id"], reply["id"], reply["text"])
|
||||||
continue
|
continue
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
text = reply["text"]
|
text = reply["text"]
|
||||||
|
Loading…
Reference in New Issue
Block a user