From d58336adcb8bc5508a30285117d123276ffd2f47 Mon Sep 17 00:00:00 2001 From: _run Date: Sun, 28 Nov 2021 00:25:56 +0500 Subject: [PATCH] Fix --- telebot/__init__.py | 24 ------------------------ telebot/async_telebot.py | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index 7983a26..6f29f86 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -68,30 +68,6 @@ class ExceptionHandler: return False -class SkipHandler: - """ - Class for skipping handlers. - Just return instance of this class - in middleware to skip handler. - Update will go to post_process, - but will skip execution of handler. - """ - - def __init__(self) -> None: - pass - -class CancelUpdate: - """ - Class for canceling updates. - Just return instance of this class - in middleware to skip update. - Update will skip handler and execution - of post_process in middlewares. - """ - - def __init__(self) -> None: - pass - class TeleBot: """ This is TeleBot Class Methods: diff --git a/telebot/async_telebot.py b/telebot/async_telebot.py index 7ee990f..48b6487 100644 --- a/telebot/async_telebot.py +++ b/telebot/async_telebot.py @@ -69,6 +69,29 @@ class ExceptionHandler: return False +class SkipHandler: + """ + Class for skipping handlers. + Just return instance of this class + in middleware to skip handler. + Update will go to post_process, + but will skip execution of handler. + """ + + def __init__(self) -> None: + pass + +class CancelUpdate: + """ + Class for canceling updates. + Just return instance of this class + in middleware to skip update. + Update will skip handler and execution + of post_process in middlewares. + """ + + def __init__(self) -> None: + pass class AsyncTeleBot: