Przeglądaj źródła

Captcha bug fixed

TheHamkerCat 5 lat temu
rodzic
commit
bbbdfd32b4
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      wbb/modules/rose_adapter.py

+ 6 - 0
wbb/modules/rose_adapter.py

@@ -38,10 +38,16 @@ async def fbanstat(_, message):
             await m.edit(limit_text)
             processing = False
             return
+        loop_limit = 0
         while True:
             msgg = await app2.get_messages(miss_rose, rose_reply_message_id)
             if msgg.text == rose_reply_text:
                 await asyncio.sleep(2)
+                if loop_limit > 4:
+                    await m.edit(rose_reply_text)
+                    processing = False
+                    return
+                loop_limit += 1
                 continue
             rose_reply = msgg.text.markdown
             if "Looks" in rose_reply: