🐛 Do not upload two errors
This commit is contained in:
parent
85e411c8e9
commit
e162b02f3d
@ -6,7 +6,7 @@ from time import gmtime, strftime, time
|
|||||||
from traceback import format_exc
|
from traceback import format_exc
|
||||||
|
|
||||||
from telethon import events
|
from telethon import events
|
||||||
from telethon.errors import MessageTooLongError
|
from telethon.errors import MessageTooLongError, MessageNotModifiedError, MessageEmptyError
|
||||||
from telethon.events import StopPropagation
|
from telethon.events import StopPropagation
|
||||||
|
|
||||||
from pagermaid import bot, config, help_messages, logs, user_id, analytics, user_bot
|
from pagermaid import bot, config, help_messages, logs, user_id, analytics, user_bot
|
||||||
@ -129,6 +129,10 @@ def listener(**args):
|
|||||||
raise StopPropagation
|
raise StopPropagation
|
||||||
except MessageTooLongError:
|
except MessageTooLongError:
|
||||||
await context.edit(lang('too_long'))
|
await context.edit(lang('too_long'))
|
||||||
|
except MessageNotModifiedError:
|
||||||
|
pass
|
||||||
|
except MessageEmptyError:
|
||||||
|
pass
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
exc_info = sys.exc_info()[1]
|
exc_info = sys.exc_info()[1]
|
||||||
exc_format = format_exc()
|
exc_format = format_exc()
|
||||||
|
Loading…
Reference in New Issue
Block a user