From e162b02f3d6385ba9356f4269d57f9259098b648 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 19 Mar 2022 17:48:19 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Do=20not=20upload=20two=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagermaid/listener.py | 6 +++++- setup.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pagermaid/listener.py b/pagermaid/listener.py index d27ba21..e482e77 100644 --- a/pagermaid/listener.py +++ b/pagermaid/listener.py @@ -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() diff --git a/setup.py b/setup.py index c98e64f..d13a6e1 100644 --- a/setup.py +++ b/setup.py @@ -34,3 +34,4 @@ setup( install_requires=install_requires, include_package_data=True ) +print(1) \ No newline at end of file