diff --git a/src/bot/helper_functions.py b/src/bot/helper_functions.py index a858a75..0117695 100644 --- a/src/bot/helper_functions.py +++ b/src/bot/helper_functions.py @@ -40,9 +40,8 @@ async def delete_message( *, sleep_time: int = 0, ) -> bool: + await asyncio.sleep(sleep_time) try: - if sleep_time != 0: - await asyncio.sleep(sleep_time) await bot.delete_message(mes.chat.id, mes.id) except telebot.apihelper.ApiException: return False