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:
parent
c45e06c694
commit
f69a2ba044
@ -73,10 +73,12 @@ class ExceptionHandler:
|
|||||||
|
|
||||||
class TeleBot:
|
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.
|
It allows you to add handlers for different kind of updates.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
from telebot import TeleBot
|
from telebot import TeleBot
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -29,3 +29,28 @@ class StatesGroup:
|
|||||||
if not name.startswith('__') and not callable(value) and isinstance(value, State):
|
if not name.startswith('__') and not callable(value) and isinstance(value, State):
|
||||||
# change value of that variable
|
# change value of that variable
|
||||||
value.name = ':'.join((cls.__name__, name))
|
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
|
Loading…
Reference in New Issue
Block a user