1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Update docstrings for asynctelebot.

This commit is contained in:
coder2020official 2022-03-07 00:18:11 +05:00
parent c45e06c694
commit f69a2ba044
3 changed files with 416 additions and 158 deletions

View File

@ -73,10 +73,12 @@ class ExceptionHandler:
class TeleBot:
"""
This is the main class to deal with bot.
This is the main synchronous class for Bot.
It allows you to add handlers for different kind of updates.
Usage:
.. code-block:: python
from telebot import TeleBot

File diff suppressed because it is too large Load Diff

View File

@ -29,3 +29,28 @@ class StatesGroup:
if not name.startswith('__') and not callable(value) and isinstance(value, State):
# change value of that variable
value.name = ':'.join((cls.__name__, name))
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