diff --git a/list.json b/list.json index 046bad5..190012c 100644 --- a/list.json +++ b/list.json @@ -852,7 +852,7 @@ }, { "name": "silly_girl", - "version": "1.04", + "version": "1.041", "section": "chat", "maintainer": "cdle", "size": "3 kb", diff --git a/silly_girl.py b/silly_girl.py index 9f508b1..581b876 100644 --- a/silly_girl.py +++ b/silly_girl.py @@ -1,3 +1,4 @@ +from asyncio import sleep from pagermaid.listener import listener from pagermaid import persistent_vars, bot from pagermaid.utils import client, alias_command @@ -88,8 +89,10 @@ async def poll(data): init = "&init=true" req_data = await client.post(persistent_vars["sillyGirl"]['url']+"/pgm?token="+persistent_vars["sillyGirl"]['token']+init, json=data) except Exception as e: + await sleep(1) return if not req_data.status_code == 200: + await sleep(1) return try: replies = json.loads(req_data.text) @@ -137,5 +140,5 @@ async def poll(data): await persistent_vars["sillyGirl"]['context'].edit("傻妞连接成功,愉快玩耍吧。") await persistent_vars["sillyGirl"]['context'].delete() except Exception as e: - + await sleep(1) return