🐛 Do not upload two errors

This commit is contained in:
xtaodada 2022-03-19 17:48:19 +08:00
parent 85e411c8e9
commit e162b02f3d
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 6 additions and 1 deletions

View File

@ -6,7 +6,7 @@ from time import gmtime, strftime, time
from traceback import format_exc
from telethon import events
from telethon.errors import MessageTooLongError
from telethon.errors import MessageTooLongError, MessageNotModifiedError, MessageEmptyError
from telethon.events import StopPropagation
from pagermaid import bot, config, help_messages, logs, user_id, analytics, user_bot
@ -129,6 +129,10 @@ def listener(**args):
raise StopPropagation
except MessageTooLongError:
await context.edit(lang('too_long'))
except MessageNotModifiedError:
pass
except MessageEmptyError:
pass
except BaseException as e:
exc_info = sys.exc_info()[1]
exc_format = format_exc()

View File

@ -34,3 +34,4 @@ setup(
install_requires=install_requires,
include_package_data=True
)
print(1)