Queer European MD passionate about IT
Explorar o código

davteutil.sleep_until was refactored

Davte %!s(int64=5) %!d(string=hai) anos
pai
achega
fb3e05681b
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      davtelepot/custombot.py

+ 1 - 2
davtelepot/custombot.py

@@ -1717,8 +1717,7 @@ class Bot(telepot.aio.Bot, Gettable):
             return
         inline_message_id = update['inline_message_id']
         self.to_be_obscured.append(inline_message_id)
-        while datetime.datetime.now() < when:
-            await sleep_until(when)
+        await sleep_until(when)
         try:
             await self.editMessageCaption(
                 inline_message_id,