From fb3e05681bbbaac7625dcfa74832c7ec5d2e6c50 Mon Sep 17 00:00:00 2001 From: Davte Date: Tue, 12 Feb 2019 18:27:58 +0100 Subject: [PATCH] davteutil.sleep_until was refactored --- davtelepot/custombot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/davtelepot/custombot.py b/davtelepot/custombot.py index 92c4a33..48e5b89 100644 --- a/davtelepot/custombot.py +++ b/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,