Fix fantom message with exception when trying to raise MessageNotModified

pull/1/head
Hikari 2022-04-16 20:29:41 +00:00
parent fa1ff8527a
commit 5b7a869f26
No known key found for this signature in database
GPG Key ID: 5FA52ACBB2AD964D
1 changed files with 7 additions and 6 deletions

View File

@ -210,12 +210,13 @@ class Utils(InlineUnit):
), ),
) )
except MessageNotModified: except MessageNotModified:
try: if query:
await query.answer() try:
except InvalidQueryID: await query.answer()
pass # Just ignore that error, bc we need to just except InvalidQueryID:
# remove preloader from user's button, if message pass # Just ignore that error, bc we need to just
# was deleted # remove preloader from user's button, if message
# was deleted
except RetryAfter as e: except RetryAfter as e:
logger.info(f"Sleeping {e.timeout}s on aiogram FloodWait...") logger.info(f"Sleeping {e.timeout}s on aiogram FloodWait...")