diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 000000000..a34f4059e
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,14 @@
+## Description
+Include changes, new features and etc:
+
+## Describe your tests
+How did you test your change?
+
+Python version:
+
+OS:
+
+## Checklist:
+- [ ] I added/edited example on new feature/change (if exists)
+- [ ] My changes won't break backward compatibility
+- [ ] I made changes both for sync and async
diff --git a/.github/workflows/setup_python.yml b/.github/workflows/setup_python.yml
new file mode 100644
index 000000000..603515ddc
--- /dev/null
+++ b/.github/workflows/setup_python.yml
@@ -0,0 +1,35 @@
+# This is a basic workflow to help you get started with Actions
+
+name: Setup
+
+# Controls when the action will run.
+on:
+ # Triggers the workflow on push or pull request events but only for the master branch
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+ # Allows you to run this workflow manually from the Actions tab
+ #workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "build"
+ all-setups:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10']
+ name: ${{ matrix.python-version }} and tests
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup python
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ architecture: x64
+ - run: |
+ pip3 install -r requirements.txt
+ pip3 install .
+ cd tests && py.test
diff --git a/.gitignore b/.gitignore
index e821e9eaf..fa4a91e77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,7 @@ var/
.idea/
venv/
+.venv/
# PyInstaller
# Usually these files are written by a python script from a template
@@ -58,4 +59,12 @@ docs/_build/
# PyBuilder
target/
-testMain.py
\ No newline at end of file
+testMain.py
+
+#VS Code
+.vscode/
+.DS_Store
+*.code-workspace
+
+# documentation
+_build/
diff --git a/.readthedocs.yml b/.readthedocs.yml
new file mode 100644
index 000000000..948e734bf
--- /dev/null
+++ b/.readthedocs.yml
@@ -0,0 +1,26 @@
+# Read the Docs configuration file for Sphinx projects
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the OS, Python version and other tools you might need
+build:
+ os: ubuntu-22.04
+ tools:
+ python: "3.11"
+
+# Build documentation in the "docs/" directory with Sphinx
+sphinx:
+ configuration: docs/source/conf.py
+ # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
+ # builder: "dirhtml"
+ # Fail on all warnings to avoid broken references
+ # fail_on_warning: true
+
+formats: all
+
+# Optionally set the version of Python and requirements required to build your docs
+python:
+ install:
+ - requirements: doc_req.txt
diff --git a/.travis.yml b/.travis.yml
index f5f202a4f..cc0a0c62e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,10 @@
language: python
python:
- - "2.6"
- - "2.7"
- - "3.3"
- - "3.4"
- - "3.5"
- - "3.6"
- - "pypy"
+ - "3.9"
+ - "3.10"
+ - "3.11"
+ - "3.12"
+ - "3.13"
- "pypy3"
install: "pip install -r requirements.txt"
script:
diff --git a/README.md b/README.md
index fbe40e8f9..8a6c7fd96 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,23 @@
+
+[](https://pypi.python.org/pypi/pyTelegramBotAPI)
+[](https://pypi.python.org/pypi/pyTelegramBotAPI)
+[](https://pytba.readthedocs.io/en/latest/?badge=latest)
+[](https://pypi.org/project/pyTelegramBotAPI/)
+[](https://pypi.python.org/pypi/pytelegrambotapi)
+
#
pyTelegramBotAPI
-
A simple, but extensible Python implementation for the Telegram Bot API.
+
A simple, but extensible Python implementation for the Telegram Bot API.
+
Both synchronous and asynchronous.
+
+##
Supported Bot API version:
-[](https://pypi.python.org/pypi/pyTelegramBotAPI)
-[](https://travis-ci.org/eternnoir/pyTelegramBotAPI)
+
+
+## Contents
- * [Getting started.](#getting-started)
+ * [Getting started](#getting-started)
* [Writing your first bot](#writing-your-first-bot)
* [Prerequisites](#prerequisites)
* [A simple echo bot](#a-simple-echo-bot)
@@ -14,31 +26,53 @@
* [Methods](#methods)
* [General use of the API](#general-use-of-the-api)
* [Message handlers](#message-handlers)
+ * [Edited Message handler](#edited-message-handler)
+ * [Channel Post handler](#channel-post-handler)
+ * [Edited Channel Post handler](#edited-channel-post-handler)
* [Callback Query handlers](#callback-query-handler)
+ * [Shipping Query Handler](#shipping-query-handler)
+ * [Pre Checkout Query Handler](#pre-checkout-query-handler)
+ * [Poll Handler](#poll-handler)
+ * [Poll Answer Handler](#poll-answer-handler)
+ * [My Chat Member Handler](#my-chat-member-handler)
+ * [Chat Member Handler](#chat-member-handler)
+ * [Chat Join request handler](#chat-join-request-handler)
+ * [Inline Mode](#inline-mode)
+ * [Inline handler](#inline-handler)
+ * [Chosen Inline handler](#chosen-inline-handler)
+ * [Answer Inline Query](#answer-inline-query)
+ * [Additional API features](#additional-api-features)
+ * [Middleware handlers](#middleware-handlers)
+ * [Custom filters](#custom-filters)
* [TeleBot](#telebot)
* [Reply markup](#reply-markup)
- * [Inline Mode](#inline-mode)
* [Advanced use of the API](#advanced-use-of-the-api)
- * [Asynchronous delivery of messages](#asynchronous-delivery-of-messages)
+ * [Using local Bot API Server](#using-local-bot-api-sever)
+ * [Asynchronous TeleBot](#asynchronous-telebot)
* [Sending large text messages](#sending-large-text-messages)
* [Controlling the amount of Threads used by TeleBot](#controlling-the-amount-of-threads-used-by-telebot)
* [The listener mechanism](#the-listener-mechanism)
* [Using web hooks](#using-web-hooks)
* [Logging](#logging)
* [Proxy](#proxy)
+ * [Testing](#testing)
+ * [API conformance limitations](#api-conformance-limitations)
+ * [AsyncTeleBot](#asynctelebot)
* [F.A.Q.](#faq)
- * [Bot 2.0](#bot-20)
* [How can I distinguish a User and a GroupChat in message.chat?](#how-can-i-distinguish-a-user-and-a-groupchat-in-messagechat)
+ * [How can I handle reocurring ConnectionResetErrors?](#how-can-i-handle-reocurring-connectionreseterrors)
* [The Telegram Chat Group](#the-telegram-chat-group)
+ * [Telegram Channel](#telegram-channel)
* [More examples](#more-examples)
- * [Bots using this API](#bots-using-this-api)
+ * [Code Template](#code-template)
+ * [Bots using this library](#bots-using-this-library)
-## Getting started.
+## Getting started
-This API is tested with Python 2.6, Python 2.7, Python 3.4, Pypy and Pypy 3.
+This API is tested with Python 3.9-3.13 and Pypy 3.
There are two ways to install the library:
-* Installation using pip (a Python package manager)*:
+* Installation using pip (a Python package manager):
```
$ pip install pyTelegramBotAPI
@@ -46,14 +80,15 @@ $ pip install pyTelegramBotAPI
* Installation from source (requires git):
```
-$ git clone https://github.com/eternnoir/pyTelegramBotAPI.git
-$ cd pyTelegramBotAPI
-$ python setup.py install
+$ pip install git+https://github.com/eternnoir/pyTelegramBotAPI.git
```
It is generally recommended to use the first option.
-**While the API is production-ready, it is still under development and it has regular updates, do not forget to update it regularly by calling `pip install pytelegrambotapi --upgrade`*
+*While the API is production-ready, it is still under development and it has regular updates, do not forget to update it regularly by calling*
+```
+pip install pytelegrambotapi --upgrade
+```
## Writing your first bot
@@ -71,7 +106,7 @@ Then, open the file and create an instance of the TeleBot class.
```python
import telebot
-bot = telebot.TeleBot("TOKEN")
+bot = telebot.TeleBot("TOKEN", parse_mode=None) # You can set parse_mode by default. HTML or MARKDOWN
```
*Note: Make sure to actually replace TOKEN with your own API token.*
@@ -97,13 +132,13 @@ This one echoes all incoming text messages back to the sender. It uses a lambda
We now have a basic bot which replies a static message to "/start" and "/help" commands and which echoes the rest of the sent messages. To start the bot, add the following to our source file:
```python
-bot.polling()
+bot.infinity_polling()
```
Alright, that's it! Our source file now looks like this:
```python
import telebot
-bot = telebot.TeleBot("TOKEN")
+bot = telebot.TeleBot("YOUR_BOT_TOKEN")
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
@@ -113,7 +148,7 @@ def send_welcome(message):
def echo_all(message):
bot.reply_to(message, message.text)
-bot.polling()
+bot.infinity_polling()
```
To start the bot, simply open up a terminal and enter `python echo_bot.py` to run the bot! Test it by sending commands ('/start' and '/help') and arbitrary text messages.
@@ -124,7 +159,7 @@ To start the bot, simply open up a terminal and enter `python echo_bot.py` to ru
All types are defined in types.py. They are all completely in line with the [Telegram API's definition of the types](https://core.telegram.org/bots/api#available-types), except for the Message's `from` field, which is renamed to `from_user` (because `from` is a Python reserved token). Thus, attributes such as `message_id` can be accessed directly with `message.message_id`. Note that `message.chat` can be either an instance of `User` or `GroupChat` (see [How can I distinguish a User and a GroupChat in message.chat?](#how-can-i-distinguish-a-user-and-a-groupchat-in-messagechat)).
The Message object also has a `content_type`attribute, which defines the type of the Message. `content_type` can be one of the following strings:
-`text`, `audio`, `document`, `photo`, `sticker`, `video`, `video_note`, `voice`, `location`, `contact`, `new_chat_members`, `left_chat_member`, `new_chat_title`, `new_chat_photo`, `delete_chat_photo`, `group_chat_created`, `supergroup_chat_created`, `channel_chat_created`, `migrate_to_chat_id`, `migrate_from_chat_id`, `pinned_message`.
+`text`, `audio`, `document`, `animation`, `game`, `photo`, `sticker`, `video`, `video_note`, `voice`, `location`, `contact`, `venue`, `dice`, `new_chat_members`, `left_chat_member`, `new_chat_title`, `new_chat_photo`, `delete_chat_photo`, `group_chat_created`, `supergroup_chat_created`, `channel_chat_created`, `migrate_to_chat_id`, `migrate_from_chat_id`, `pinned_message`, `invoice`, `successful_payment`, `connected_website`, `poll`, `passport_data`, `proximity_alert_triggered`, `video_chat_scheduled`, `video_chat_started`, `video_chat_ended`, `video_chat_participants_invited`, `web_app_data`, `message_auto_delete_timer_changed`, `forum_topic_created`, `forum_topic_closed`, `forum_topic_reopened`, `forum_topic_edited`, `general_forum_topic_hidden`, `general_forum_topic_unhidden`, `write_access_allowed`, `user_shared`, `chat_shared`, `story`.
You can use some types in one function. Example:
@@ -140,7 +175,7 @@ Outlined below are some general use cases of the API.
#### Message handlers
A message handler is a function that is decorated with the `message_handler` decorator of a TeleBot instance. Message handlers consist of one or multiple filters.
-Each filter much return True for a certain message in order for a message handler to become eligible to handle that message. A message handler is declared in the following way (provided `bot` is an instance of TeleBot):
+Each filter must return True for a certain message in order for a message handler to become eligible to handle that message. A message handler is declared in the following way (provided `bot` is an instance of TeleBot):
```python
@bot.message_handler(filters)
def function_name(message):
@@ -154,10 +189,11 @@ TeleBot supports the following filters:
|name|argument(s)|Condition|
|:---:|---| ---|
|content_types|list of strings (default `['text']`)|`True` if message.content_type is in the list of strings.|
-|regexp|a regular expression as a string|`True` if `re.search(regexp_arg)` returns `True` and `message.content_type == 'text'` (See [Python Regular Expressions](https://docs.python.org/2/library/re.html)|
+|regexp|a regular expression as a string|`True` if `re.search(regexp_arg)` returns `True` and `message.content_type == 'text'` (See [Python Regular Expressions](https://docs.python.org/2/library/re.html))|
|commands|list of strings|`True` if `message.content_type == 'text'` and `message.text` starts with a command that is in the list of strings.|
-|func|a function (lambda or function reference)|`True` if the lambda or function reference returns `True`
-
+|chat_types|list of chat types|`True` if `message.chat.type` in your filter|
+|func|a function (lambda or function reference)|`True` if the lambda or function reference returns `True`|
+
Here are some examples of using the filters and message handlers:
```python
@@ -179,17 +215,17 @@ def handle_docs_audio(message):
def handle_message(message):
pass
-#Handles all messages for which the lambda returns True
+# Handles all messages for which the lambda returns True
@bot.message_handler(func=lambda message: message.document.mime_type == 'text/plain', content_types=['document'])
def handle_text_doc(message):
pass
-#Which could also be defined as:
+# Which could also be defined as:
def test_message(message):
return message.document.mime_type == 'text/plain'
@bot.message_handler(func=test_message, content_types=['document'])
-def handle_text_doc(message)
+def handle_text_doc(message):
pass
# Handlers can be stacked to create a function which will be called if either message_handler is eligible
@@ -201,28 +237,177 @@ def send_something(message):
```
**Important: all handlers are tested in the order in which they were declared**
-#### Edited Message handlers
+#### Edited Message handler
+Handle edited messages
+`@bot.edited_message_handler(filters) # <- passes a Message type object to your function`
+
+#### Channel Post handler
+Handle channel post messages
+`@bot.channel_post_handler(filters) # <- passes a Message type object to your function`
-Same as Message handlers
+#### Edited Channel Post handler
+Handle edited channel post messages
+`@bot.edited_channel_post_handler(filters) # <- passes a Message type object to your function`
-#### channel_post_handler
+#### Callback Query Handler
+Handle callback queries
+```python
+@bot.callback_query_handler(func=lambda call: True)
+def test_callback(call): # <- passes a CallbackQuery type object to your function
+ logger.info(call)
+```
-Same as Message handlers
+#### Shipping Query Handler
+Handle shipping queries
+`@bot.shipping_query_handler() # <- passes a ShippingQuery type object to your function`
-#### edited_channel_post_handler
+#### Pre Checkout Query Handler
+Handle pre checkout queries
+`@bot.pre_checkout_query_handler() # <- passes a PreCheckoutQuery type object to your function`
-Same as Message handlers
+#### Poll Handler
+Handle poll updates
+`@bot.poll_handler() # <- passes a Poll type object to your function`
-#### Callback Query Handler
+#### Poll Answer Handler
+Handle poll answers
+`@bot.poll_answer_handler() # <- passes a PollAnswer type object to your function`
+
+#### My Chat Member Handler
+Handle updates of a the bot's member status in a chat
+`@bot.my_chat_member_handler() # <- passes a ChatMemberUpdated type object to your function`
+
+#### Chat Member Handler
+Handle updates of a chat member's status in a chat
+`@bot.chat_member_handler() # <- passes a ChatMemberUpdated type object to your function`
+*Note: "chat_member" updates are not requested by default. If you want to allow all update types, set `allowed_updates` in `bot.polling()` / `bot.infinity_polling()` to `util.update_types`*
+
+#### Chat Join Request Handler
+Handle chat join requests using:
+`@bot.chat_join_request_handler() # <- passes ChatInviteLink type object to your function`
+
+### Inline Mode
+
+More information about [Inline mode](https://core.telegram.org/bots/inline).
-In bot2.0 update. You can get `callback_query` in update object. In telebot use `callback_query_handler` to process callback_querys.
+#### Inline handler
+
+Now, you can use inline_handler to get inline queries in telebot.
```python
-@bot.callback_query_handler(func=lambda call: True)
-def test_callback(call):
- logger.info(call)
+
+@bot.inline_handler(lambda query: query.query == 'text')
+def query_text(inline_query):
+ # Query message is text
```
+#### Chosen Inline handler
+
+Use chosen_inline_handler to get chosen_inline_result in telebot. Don't forget to add the /setinlinefeedback
+command for @Botfather.
+
+More information : [collecting-feedback](https://core.telegram.org/bots/inline#collecting-feedback)
+
+```python
+@bot.chosen_inline_handler(func=lambda chosen_inline_result: True)
+def test_chosen(chosen_inline_result):
+ # Process all chosen_inline_result.
+```
+
+#### Answer Inline Query
+
+```python
+@bot.inline_handler(lambda query: query.query == 'text')
+def query_text(inline_query):
+ try:
+ r = types.InlineQueryResultArticle('1', 'Result', types.InputTextMessageContent('Result message.'))
+ r2 = types.InlineQueryResultArticle('2', 'Result2', types.InputTextMessageContent('Result message2.'))
+ bot.answer_inline_query(inline_query.id, [r, r2])
+ except Exception as e:
+ print(e)
+
+```
+
+### Additional API features
+
+#### Middleware Handlers
+
+A middleware handler is a function that allows you to modify requests or the bot context as they pass through the
+Telegram to the bot. You can imagine middleware as a chain of logic connection handled before any other handlers are
+executed. Middleware processing is disabled by default, enable it by setting `apihelper.ENABLE_MIDDLEWARE = True`.
+
+```python
+apihelper.ENABLE_MIDDLEWARE = True
+
+@bot.middleware_handler(update_types=['message'])
+def modify_message(bot_instance, message):
+ # modifying the message before it reaches any other handler
+ message.another_text = message.text + ':changed'
+
+@bot.message_handler(commands=['start'])
+def start(message):
+ # the message is already modified when it reaches message handler
+ assert message.another_text == message.text + ':changed'
+```
+There are other examples using middleware handler in the [examples/middleware](examples/middleware) directory.
+
+#### Class-based middlewares
+There are class-based middlewares.
+Basic class-based middleware looks like this:
+```python
+class Middleware(BaseMiddleware):
+ def __init__(self):
+ self.update_types = ['message']
+ def pre_process(self, message, data):
+ data['foo'] = 'Hello' # just for example
+ # we edited the data. now, this data is passed to handler.
+ # return SkipHandler() -> this will skip handler
+ # return CancelUpdate() -> this will cancel update
+ def post_process(self, message, data, exception=None):
+ print(data['foo'])
+ if exception: # check for exception
+ print(exception)
+```
+Class-based middleware should have two functions: post and pre process.
+So, as you can see, class-based middlewares work before and after handler execution.
+For more, check out in [examples](https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples/middleware/class_based)
+
+#### Custom filters
+Also, you can use built-in custom filters. Or, you can create your own filter.
+
+[Example of custom filter](https://github.com/eternnoir/pyTelegramBotAPI/blob/master/examples/custom_filters/general_custom_filters.py)
+
+Also, we have examples on them. Check this links:
+
+You can check some built-in filters in source [code](https://github.com/eternnoir/pyTelegramBotAPI/blob/master/telebot/custom_filters.py)
+
+Example of [filtering by id](https://github.com/eternnoir/pyTelegramBotAPI/blob/master/examples/custom_filters/id_filter_example.py)
+
+Example of [filtering by text](https://github.com/eternnoir/pyTelegramBotAPI/blob/master/examples/custom_filters/text_filter_example.py)
+
+If you want to add some built-in filter, you are welcome to add it in custom_filters.py file.
+
+Here is example of creating filter-class:
+
+```python
+class IsAdmin(telebot.custom_filters.SimpleCustomFilter):
+ # Class will check whether the user is admin or creator in group or not
+ key='is_chat_admin'
+ @staticmethod
+ def check(message: telebot.types.Message):
+ return bot.get_chat_member(message.chat.id,message.from_user.id).status in ['administrator','creator']
+
+# To register filter, you need to use method add_custom_filter.
+bot.add_custom_filter(IsAdmin())
+
+# Now, you can use it in handler.
+@bot.message_handler(is_chat_admin=True)
+def admin_of_group(message):
+ bot.send_message(message.chat.id, 'You are admin of this group!')
+
+```
+
+
#### TeleBot
```python
import telebot
@@ -231,11 +416,10 @@ TOKEN = ''
tb = telebot.TeleBot(TOKEN) #create a new Telegram Bot object
# Upon calling this function, TeleBot starts polling the Telegram servers for new messages.
-# - none_stop: True/False (default False) - Don't stop polling when receiving an error from the Telegram servers
-# - interval: True/False (default False) - The interval between polling requests
-# Note: Editing this parameter harms the bot's response time
+# - interval: int (default 0) - The interval between polling requests
# - timeout: integer (default 20) - Timeout in seconds for long polling.
-tb.polling(none_stop=False, interval=0, timeout=20)
+# - allowed_updates: List of Strings (default None) - List of update types to request
+tb.infinity_polling(interval=0, timeout=20)
# getMe
user = tb.get_me()
@@ -247,10 +431,14 @@ tb.remove_webhook()
# getUpdates
updates = tb.get_updates()
+# or
updates = tb.get_updates(1234,100,20) #get_Updates(offset, limit, timeout):
# sendMessage
-tb.send_message(chatid, text)
+tb.send_message(chat_id, text)
+
+# editMessageText
+tb.edit_message_text(new_text, chat_id, message_id)
# forwardMessage
tb.forward_message(to_chat_id, from_chat_id, message_id)
@@ -365,49 +553,8 @@ ForceReply:

-### Inline Mode
-
-More information about [Inline mode](https://core.telegram.org/bots/inline).
-
-#### inline_handler
-
-Now, you can use inline_handler to get inline_query in telebot.
-
-```python
-
-@bot.inline_handler(lambda query: query.query == 'text')
-def query_text(inline_query):
- # Query message is text
-```
-
-
-#### chosen_inline_handler
-
-Use chosen_inline_handler to get chosen_inline_result in telebot. Don't forgot add the /setinlinefeedback
-command for @Botfather.
-
-More information : [collecting-feedback](https://core.telegram.org/bots/inline#collecting-feedback)
-
-```python
-@bot.chosen_inline_handler(func=lambda chosen_inline_result: True)
-def test_chosen(chosen_inline_result):
- # Process all chosen_inline_result.
-```
-
-#### answer_inline_query
-
-```python
-@bot.inline_handler(lambda query: query.query == 'text')
-def query_text(inline_query):
- try:
- r = types.InlineQueryResultArticle('1', 'Result', types.InputTextMessageContent('Result message.'))
- r2 = types.InlineQueryResultArticle('2', 'Result2', types.InputTextMessageContent('Result message2.'))
- bot.answer_inline_query(inline_query.id, [r, r2])
- except Exception as e:
- print(e)
-```
-### Working with entities:
+### Working with entities
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
Attributes:
* `type`
@@ -425,26 +572,38 @@ Refer [Bot Api](https://core.telegram.org/bots/api#messageentity) for extra deta
## Advanced use of the API
-### Asynchronous delivery of messages
-There exists an implementation of TeleBot which executes all `send_xyz` and the `get_me` functions asynchronously. This can speed up you bot __significantly__, but it has unwanted side effects if used without caution.
+### Using local Bot API Server
+Since version 5.0 of the Bot API, you have the possibility to run your own [Local Bot API Server](https://core.telegram.org/bots/api#using-a-local-bot-api-server).
+pyTelegramBotAPI also supports this feature.
+```python
+from telebot import apihelper
+
+apihelper.API_URL = "http://localhost:4200/bot{0}/{1}"
+```
+**Important: Like described [here](https://core.telegram.org/bots/api#logout), you have to log out your bot from the Telegram server before switching to your local API server. in pyTelegramBotAPI use `bot.log_out()`**
+
+*Note: 4200 is an example port*
+
+### Asynchronous TeleBot
+New: There is an asynchronous implementation of telebot.
To enable this behaviour, create an instance of AsyncTeleBot instead of TeleBot.
```python
tb = telebot.AsyncTeleBot("TOKEN")
```
-Now, every function that calls the Telegram API is executed in a separate Thread. The functions are modified to return an AsyncTask instance (defined in util.py). Using AsyncTeleBot allows you to do the following:
+Now, every function that calls the Telegram API is executed in a separate asynchronous task.
+Using AsyncTeleBot allows you to do the following:
```python
import telebot
tb = telebot.AsyncTeleBot("TOKEN")
-task = tb.get_me() # Execute an API call
-# Do some other operations...
-a = 0
-for a in range(100):
- a += 10
-result = task.wait() # Get the result of the execution
+@tb.message_handler(commands=['start'])
+async def start_message(message):
+ await bot.send_message(message.chat.id, 'Hello!')
+
```
-*Note: if you execute send_xyz functions after eachother without calling wait(), the order in which messages are delivered might be wrong.*
+
+See more in [examples](https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples/asynchronous_telebot)
### Sending large text messages
Sometimes you must send messages that exceed 5000 characters. The Telegram API can not handle that many characters in one request, so we need to split the message in multiples. Here is how to do that using the API:
@@ -455,6 +614,19 @@ large_text = open("large_text.txt", "rb").read()
# Split the text each 3000 characters.
# split_string returns a list with the splitted text.
splitted_text = util.split_string(large_text, 3000)
+
+for text in splitted_text:
+ tb.send_message(chat_id, text)
+```
+
+Or you can use the new `smart_split` function to get more meaningful substrings:
+```python
+from telebot import util
+large_text = open("large_text.txt", "rb").read()
+# Splits one string into multiple strings, with a maximum amount of `chars_per_string` (max. 4096)
+# Splits by last '\n', '. ' or ' ' in exactly this priority.
+# smart_split returns a list with the splitted text.
+splitted_text = util.smart_split(large_text, chars_per_string=3000)
for text in splitted_text:
tb.send_message(chat_id, text)
```
@@ -465,7 +637,10 @@ The TeleBot constructor takes the following optional arguments:
TeleBot should execute message handlers on it's polling Thread.
### The listener mechanism
-As an alternative to the message handlers, one can also register a function as a listener to TeleBot. Example:
+As an alternative to the message handlers, one can also register a function as a listener to TeleBot.
+
+NOTICE: handlers won't disappear! Your message will be processed both by handlers and listeners. Also, it's impossible to predict which will work at first because of threading. If you use threaded=False, custom listeners will work earlier, after them handlers will be called.
+Example:
```python
def handle_messages(messages):
for message in messages:
@@ -473,16 +648,15 @@ def handle_messages(messages):
bot.reply_to(message, 'Hi')
bot.set_update_listener(handle_messages)
-bot.polling()
+bot.infinity_polling()
```
### Using web hooks
When using webhooks telegram sends one Update per call, for processing it you should call process_new_messages([update.message]) when you recieve it.
-There are some examples using webhooks in the *examples/webhook_examples* directory.
+There are some examples using webhooks in the [examples/webhook_examples](examples/webhook_examples) directory.
### Logging
-
You can use the Telebot module logger to log debug info about Telebot. Use `telebot.logger` to get the logger of the TeleBot module.
It is possible to add custom logging Handlers to the logger. Refer to the [Python logging module page](https://docs.python.org/2/library/logging.html) for more info.
@@ -494,13 +668,14 @@ telebot.logger.setLevel(logging.DEBUG) # Outputs debug messages to console.
```
### Proxy
+For sync:
You can use proxy for request. `apihelper.proxy` object will use by call `requests` proxies argument.
```python
from telebot import apihelper
-apihelper.proxy = {'http':'http://10.10.1.10:3128'}
+apihelper.proxy = {'http':'http://127.0.0.1:3128'}
```
If you want to use socket5 proxy you need install dependency `pip install requests[socks]` and make sure, that you have the latest version of `gunicorn`, `PySocks`, `pyTelegramBotAPI`, `requests` and `urllib3`.
@@ -509,84 +684,213 @@ If you want to use socket5 proxy you need install dependency `pip install reques
apihelper.proxy = {'https':'socks5://userproxy:password@proxy_address:port'}
```
+For async:
+```python
+from telebot import asyncio_helper
+
+asyncio_helper.proxy = 'http://127.0.0.1:3128' #url
+```
+
+
+### Testing
+You can disable or change the interaction with real Telegram server by using
+```python
+apihelper.CUSTOM_REQUEST_SENDER = your_handler
+```
+parameter. You can pass there your own function that will be called instead of _requests.request_.
+
+For example:
+```python
+def custom_sender(method, url, **kwargs):
+ print("custom_sender. method: {}, url: {}, params: {}".format(method, url, kwargs.get("params")))
+ result = util.CustomRequestResponse('{"ok":true,"result":{"message_id": 1, "date": 1, "chat": {"id": 1, "type": "private"}}}')
+ return result
+```
+
+Then you can use API and proceed requests in your handler code.
+```python
+apihelper.CUSTOM_REQUEST_SENDER = custom_sender
+tb = TeleBot("test")
+res = tb.send_message(123, "Test")
+```
+
+Result will be:
+
+`custom_sender. method: post, url: https://api.telegram.org/botololo/sendMessage, params: {'chat_id': '123', 'text': 'Test'}`
-## F.A.Q.
-### Bot 2.0
-April 9,2016 Telegram release new bot 2.0 API, which has a drastic revision especially for the change of method's interface.If you want to update to the latest version, please make sure you've switched bot's code to bot 2.0 method interface.
+## API conformance limitations
+* ➕ [Bot API 4.5](https://core.telegram.org/bots/api-changelog#december-31-2019) - No nested MessageEntities and Markdown2 support
+* ➕ [Bot API 4.1](https://core.telegram.org/bots/api-changelog#august-27-2018) - No Passport support
+* ➕ [Bot API 4.0](https://core.telegram.org/bots/api-changelog#july-26-2018) - No Passport support
-[More information about pyTelegramBotAPI support bot2.0](https://github.com/eternnoir/pyTelegramBotAPI/issues/130)
+
+## AsyncTeleBot
+### Asynchronous version of telebot
+We have a fully asynchronous version of TeleBot.
+This class is not controlled by threads. Asyncio tasks are created to execute all the stuff.
+
+### EchoBot
+Echo Bot example on AsyncTeleBot:
+
+```python
+# This is a simple echo bot using the decorator mechanism.
+# It echoes any incoming text messages.
+
+from telebot.async_telebot import AsyncTeleBot
+import asyncio
+bot = AsyncTeleBot('TOKEN')
+
+
+
+# Handle '/start' and '/help'
+@bot.message_handler(commands=['help', 'start'])
+async def send_welcome(message):
+ await bot.reply_to(message, """\
+Hi there, I am EchoBot.
+I am here to echo your kind words back to you. Just say anything nice and I'll say the exact same thing to you!\
+""")
+
+
+# Handle all other messages with content_type 'text' (content_types defaults to ['text'])
+@bot.message_handler(func=lambda message: True)
+async def echo_message(message):
+ await bot.reply_to(message, message.text)
+
+
+asyncio.run(bot.polling())
+```
+As you can see here, keywords are await and async.
+
+### Why should I use async?
+Asynchronous tasks depend on processor performance. Many asynchronous tasks can run parallelly, while thread tasks will block each other.
+
+### Differences in AsyncTeleBot
+AsyncTeleBot is asynchronous. It uses aiohttp instead of requests module.
+
+### Examples
+See more examples in our [examples](https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples/asynchronous_telebot) folder
+
+
+## F.A.Q.
### How can I distinguish a User and a GroupChat in message.chat?
Telegram Bot API support new type Chat for message.chat.
- Check the ```type``` attribute in ```Chat``` object:
--
```python
-if message.chat.type == “private”:
- # private chat message
+if message.chat.type == "private":
+ # private chat message
-if message.chat.type == “group”:
+if message.chat.type == "group":
# group chat message
-if message.chat.type == “supergroup”:
+if message.chat.type == "supergroup":
# supergroup chat message
-if message.chat.type == “channel”:
+if message.chat.type == "channel":
# channel message
```
+### How can I handle reocurring ConnectionResetErrors?
+
+Bot instances that were idle for a long time might be rejected by the server when sending a message due to a timeout of the last used session. Add `apihelper.SESSION_TIME_TO_LIVE = 5 * 60` to your initialisation to force recreation after 5 minutes without any activity.
+
## The Telegram Chat Group
Get help. Discuss. Chat.
* Join the [pyTelegramBotAPI Telegram Chat Group](https://telegram.me/joinchat/Bn4ixj84FIZVkwhk2jag6A)
-* We now have a Telegram Channel as well! Keep yourself up to date with API changes, and [join it](https://telegram.me/pytelegrambotapi).
+
+## Telegram Channel
+Join the [News channel](https://t.me/pyTelegramBotAPI). Here we will post releases and updates.
+
## More examples
* [Echo Bot](https://github.com/eternnoir/pyTelegramBotAPI/blob/master/examples/echo_bot.py)
* [Deep Linking](https://github.com/eternnoir/pyTelegramBotAPI/blob/master/examples/deep_linking.py)
* [next_step_handler Example](https://github.com/eternnoir/pyTelegramBotAPI/blob/master/examples/step_example.py)
-## Bots using this API
+## Code Template
+Template is a ready folder that contains architecture of basic project.
+Here are some examples of template:
+
+* [AsyncTeleBot template](https://github.com/coder2020official/asynctelebot_template)
+* [TeleBot template](https://github.com/coder2020official/telebot_template)
+
+
+## Bots using this library
* [SiteAlert bot](https://telegram.me/SiteAlert_bot) ([source](https://github.com/ilteoood/SiteAlert-Python)) by *ilteoood* - Monitors websites and sends a notification on changes
* [TelegramLoggingBot](https://github.com/aRandomStranger/TelegramLoggingBot) by *aRandomStranger*
-* [Send to Kindle Bot](https://telegram.me/Send2KindleBot) by *GabrielRF* - Send to Kindle files or links to files.
-* [Telegram LMGTFY_bot](https://github.com/GabrielRF/telegram-lmgtfy_bot) ([source](https://github.com/GabrielRF/telegram-lmgtfy_bot)) by *GabrielRF* - Let me Google that for you.
-* [Telegram UrlProBot](https://github.com/GabrielRF/telegram-urlprobot) ([source](https://github.com/GabrielRF/telegram-urlprobot)) by *GabrielRF* - URL shortener and URL expander.
-* [Telegram Proxy Bot](https://bitbucket.org/master_groosha/telegram-proxy-bot) by *Groosha* - A simple BITM (bot-in-the-middle) for Telegram acting as some kind of "proxy".
-* [Telegram Proxy Bot](https://github.com/mrgigabyte/proxybot) by *mrgigabyte* - `Credits for the original version of this bot goes to` **Groosha** `, simply added certain features which I thought were needed`.
+* [Telegram LMGTFY_bot](https://github.com/GabrielRF/telegram-lmgtfy_bot) by *GabrielRF* - Let me Google that for you.
+* [Telegram Proxy Bot](https://github.com/mrgigabyte/proxybot) by *mrgigabyte*
* [RadRetroRobot](https://github.com/Tronikart/RadRetroRobot) by *Tronikart* - Multifunctional Telegram Bot RadRetroRobot.
* [League of Legends bot](https://telegram.me/League_of_Legends_bot) ([source](https://github.com/i32ropie/lol)) by *i32ropie*
-* [NeoBot](https://github.com/neoranger/NeoBot) by *neoranger*
-* [TagAlertBot](https://github.com/pitasi/TagAlertBot) by *pitasi*
+* [NeoBot](https://github.com/neoranger/NeoBot) by [@NeoRanger](https://github.com/neoranger)
+* [ColorCodeBot](https://t.me/colorcodebot) ([source](https://github.com/andydecleyre/colorcodebot)) - Share code snippets as beautifully syntax-highlighted images.
* [ComedoresUGRbot](http://telegram.me/ComedoresUGRbot) ([source](https://github.com/alejandrocq/ComedoresUGRbot)) by [*alejandrocq*](https://github.com/alejandrocq) - Telegram bot to check the menu of Universidad de Granada dining hall.
-* [picpingbot](https://web.telegram.org/#/im?p=%40picpingbot) - Fun anonymous photo exchange by Boogie Muffin.
-* [TheZigZagProject](https://github.com/WebShark025/TheZigZagProject) - The 'All In One' bot for Telegram! by WebShark025
* [proxybot](https://github.com/p-hash/proxybot) - Simple Proxy Bot for Telegram. by p-hash
-* [DonantesMalagaBot](https://github.com/vfranch/DonantesMalagaBot)- DonantesMalagaBot facilitates information to Malaga blood donors about the places where they can donate today or in the incoming days. It also records the date of the last donation so that it helps the donors to know when they can donate again. - by vfranch
+* [DonantesMalagaBot](https://github.com/vfranch/DonantesMalagaBot) - DonantesMalagaBot facilitates information to Malaga blood donors about the places where they can donate today or in the incoming days. It also records the date of the last donation so that it helps the donors to know when they can donate again. - by vfranch
* [DuttyBot](https://github.com/DmytryiStriletskyi/DuttyBot) by *Dmytryi Striletskyi* - Timetable for one university in Kiev.
-* [dailypepebot](https://telegram.me/dailypepebot) by [*Jaime*](https://github.com/jiwidi/Dailypepe) - Get's you random pepe images and gives you their id, then you can call this image with the number.
-* [DailyQwertee](https://t.me/DailyQwertee) by [*Jaime*](https://github.com/jiwidi/DailyQwertee) - Bot that manages a channel that sends qwertee daily tshirts every day at 00:00
* [wat-bridge](https://github.com/rmed/wat-bridge) by [*rmed*](https://github.com/rmed) - Send and receive messages to/from WhatsApp through Telegram
-* [flibusta_bot](https://github.com/Kurbezz/flibusta_bot) by [*Kurbezz*](https://github.com/Kurbezz)
-* [EmaProject](https://github.com/halkliff/emaproject) by [*halkliff*](https://github.com/halkliff) - Ema - Eastern Media Assistant was made thinking on the ease-to-use feature. Coding here is simple, as much as is fast and powerful.
* [filmratingbot](http://t.me/filmratingbot)([source](https://github.com/jcolladosp/film-rating-bot)) by [*jcolladosp*](https://github.com/jcolladosp) - Telegram bot using the Python API that gets films rating from IMDb and metacritic
-* [you2mp3bot](http://t.me/you2mp3bot)([link](https://storebot.me/bot/you2mp3bot)) - This bot can convert a Youtube video to Mp3. All you need is send the URL video.
-* [areajugonesbot](http://t.me/areajugonesbot)([link](http://t.me/areajugonesbot)) - The areajugonesbot sends news published on the videogames blog Areajugones to Telegram.
* [Send2Kindlebot](http://t.me/Send2KindleBot) ([source](https://github.com/GabrielRF/Send2KindleBot)) by *GabrielRF* - Send to Kindle service.
* [RastreioBot](http://t.me/RastreioBot) ([source](https://github.com/GabrielRF/RastreioBot)) by *GabrielRF* - Bot used to track packages on the Brazilian Mail Service.
-* [filex_bot](http://t.me/filex_bot)([link](https://github.com/victor141516/FileXbot-telegram))
* [Spbu4UBot](http://t.me/Spbu4UBot)([link](https://github.com/EeOneDown/spbu4u)) by *EeOneDown* - Bot with timetables for SPbU students.
-* [SmartySBot](http://t.me/ZDU_bot)([link](https://github.com/0xVK/SmartySBot)) by *0xVK* - Telegram timetable bot, for Zhytomyr Ivan Franko State University students.
-* [yandex_music_bot](http://t.me/yandex_music_bot)- Downloads tracks/albums/public playlists from Yandex.Music streaming service for free.
+* [SmartySBot](http://t.me/ZDU_bot)([link](https://github.com/0xVK/SmartySBot)) by *0xVK* - Telegram timetable bot, for Zhytomyr Ivan Franko State University students.
* [LearnIt](https://t.me/LearnItbot)([link](https://github.com/tiagonapoli/LearnIt)) - A Telegram Bot created to help people to memorize other languages’ vocabulary.
-* [MusicQuiz_bot](https://t.me/MusicQuiz_bot) by [Etoneja](https://github.com/Etoneja) - Listen to audiosamles and try to name the performer of the song.
* [Bot-Telegram-Shodan ](https://github.com/rubenleon/Bot-Telegram-Shodan) by [rubenleon](https://github.com/rubenleon)
-* [MandangoBot](https://t.me/MandangoBot) by @Alvaricias - Bot for managing Marvel Strike Force alliances (only in spanish, atm).
-
-
-Want to have your bot listed here? Send a Telegram message to @eternnoir or @pevdh.
+* [VigoBusTelegramBot](https://t.me/vigobusbot) ([GitHub](https://github.com/Pythoneiro/VigoBus-TelegramBot)) - Bot that provides buses coming to a certain stop and their remaining time for the city of Vigo (Galicia - Spain)
+* [kaishnik-bot](https://t.me/kaishnik_bot) ([source](https://github.com/airatk/kaishnik-bot)) by *airatk* - bot which shows all the necessary information to KNTRU-KAI students.
+* [Robbie](https://t.me/romdeliverybot) ([source](https://github.com/FacuM/romdeliverybot_support)) by @FacuM - Support Telegram bot for developers and maintainers.
+* [AsadovBot](https://t.me/asadov_bot) ([source](https://github.com/desexcile/BotApi)) by @DesExcile - Сatalog of poems by Eduard Asadov.
+* [thesaurus_com_bot](https://t.me/thesaurus_com_bot) ([source](https://github.com/LeoSvalov/words-i-learn-bot)) by @LeoSvalov - words and synonyms from [dictionary.com](https://www.dictionary.com) and [thesaurus.com](https://www.thesaurus.com) in the telegram.
+* [InfoBot](https://t.me/info2019_bot) ([source](https://github.com/irevenko/info-bot)) by @irevenko - An all-round bot that displays some statistics (weather, time, crypto etc...)
+* [FoodBot](https://t.me/ChensonUz_bot) ([source](https://github.com/Fliego/old_restaurant_telegram_chatbot)) by @Fliego - a simple bot for food ordering
+* [Sporty](https://t.me/SportydBot) ([source](https://github.com/0xnu/sporty)) by @0xnu - Telegram bot for displaying the latest news, sports schedules and injury updates.
+* [JoinGroup Silencer Bot](https://t.me/joingroup_silencer_bot) ([source](https://github.com/zeph1997/Telegram-Group-Silencer-Bot)) by [@zeph1997](https://github.com/zeph1997) - A Telegram Bot to remove "join group" and "removed from group" notifications.
+* [TasksListsBot](https://t.me/TasksListsBot) ([source](https://github.com/Pablo-Davila/TasksListsBot)) by [@Pablo-Davila](https://github.com/Pablo-Davila) - A (tasks) lists manager bot for Telegram.
+* [MyElizaPsychologistBot](https://t.me/TasksListsBot) ([source](https://github.com/Pablo-Davila/MyElizaPsychologistBot)) by [@Pablo-Davila](https://github.com/Pablo-Davila) - An implementation of the famous Eliza psychologist chatbot.
+* [Frcstbot](https://t.me/frcstbot) ([source](https://github.com/Mrsqd/frcstbot_public)) by [Mrsqd](https://github.com/Mrsqd). A Telegram bot that will always be happy to show you the weather forecast.
+* [MineGramBot](https://github.com/ModischFabrications/MineGramBot) by [ModischFabrications](https://github.com/ModischFabrications). This bot can start, stop and monitor a minecraft server.
+* [Tabletop DiceBot](https://github.com/dexpiper/tabletopdicebot) by [dexpiper](https://github.com/dexpiper). This bot can roll multiple dices for RPG-like games, add positive and negative modifiers and show short descriptions to the rolls.
+* [BarnameKon](https://t.me/BarnameKonBot) by [Anvaari](https://github.com/anvaari). This Bot make "Add to google calendar" link for your events. It give information about event and return link. It work for Jalali calendar and in Tehran Time. [Source code](https://github.com/anvaari/BarnameKon)
+* [Translator bot](https://github.com/AREEG94FAHAD/translate_text_bot) by Areeg Fahad. This bot can be used to translate texts.
+* [Digital Cryptocurrency bot](https://github.com/AREEG94FAHAD/currencies_bot) by Areeg Fahad. With this bot, you can now monitor the prices of more than 12 digital Cryptocurrency.
+* [Anti-Tracking Bot](https://t.me/AntiTrackingBot) by Leon Heess [(source)](https://github.com/leonheess/AntiTrackingBot). Send any link, and the bot tries its best to remove all tracking from the link you sent.
+* [Developer Bot](https://t.me/IndDeveloper_bot) by [Vishal Singh](https://github.com/vishal2376) [(source code)](https://github.com/vishal2376/telegram-bot) This telegram bot can do tasks like GitHub search & clone,provide c++ learning resources ,Stackoverflow search, Codeforces(profile visualizer,random problems)
+* [oneIPO bot](https://github.com/aaditya2200/IPO-proj) by [Aadithya](https://github.com/aaditya2200) & [Amol Soans](https://github.com/AmolDerickSoans) This Telegram bot provides live updates , data and documents on current and upcoming IPOs(Initial Public Offerings)
+* [CoronaGraphsBot](https://t.me/CovidGraph_bot) ([source](https://github.com/TrevorWinstral/CoronaGraphsBot)) by *TrevorWinstral* - Gets live COVID Country data, plots it, and briefs the user
+* [ETHLectureBot](https://t.me/ETHLectureBot) ([source](https://github.com/TrevorWinstral/ETHLectureBot)) by *TrevorWinstral* - Notifies ETH students when their lectures have been uploaded
+* [Vlun Finder Bot](https://github.com/resinprotein2333/Vlun-Finder-bot) by [Resinprotein2333](https://github.com/resinprotein2333). This bot can help you to find The information of CVE vulnerabilities.
+* [ETHGasFeeTrackerBot](https://t.me/ETHGasFeeTrackerBot) ([Source](https://github.com/DevAdvik/ETHGasFeeTrackerBot]) by *DevAdvik* - Get Live Ethereum Gas Fees in GWEI
+* [Google Sheet Bot](https://github.com/JoachimStanislaus/Tele_Sheet_bot) by [JoachimStanislaus](https://github.com/JoachimStanislaus). This bot can help you to track your expenses by uploading your bot entries to your google sheet.
+* [GrandQuiz Bot](https://github.com/Carlosma7/TFM-GrandQuiz) by [Carlosma7](https://github.com/Carlosma7). This bot is a trivia game that allows you to play with people from different ages. This project addresses the use of a system through chatbots to carry out a social and intergenerational game as an alternative to traditional game development.
+* [Diccionario de la RAE](https://t.me/dleraebot) ([source](https://github.com/studentenherz/dleraebot)) This bot lets you find difinitions of words in Spanish using [RAE's dictionary](https://dle.rae.es/). It features direct message and inline search.
+* [remoteTelegramShell](https://github.com/EnriqueMoran/remoteTelegramShell) by [EnriqueMoran](https://github.com/EnriqueMoran). Control your LinuxOS computer through Telegram.
+* [Commerce Telegram Bot](https://github.com/ayitinya/commerce-telegram-bot/). Make purchases of items in a store with an Admin panel for data control and notifications.
+* [Pyfram-telegram-bot](https://github.com/skelly37/pyfram-telegram-bot) Query wolframalpha.com and make use of its API through Telegram.
+* [TranslateThisVideoBot](https://gitlab.com/WuerfelDev/translatethisvideo) This Bot can understand spoken text in videos and translate it to English
+* [Zyprexa](https://t.me/mathemathicsBot) ([source](https://github.com/atif5/zyprexa)) Zyprexa can solve, help you solve any mathematical problem you encounter and convert your regular mathematical expressions into beautiful imagery using LaTeX.
+* [Bincode-telegram-bot](https://github.com/tusharhero/bincode-telegram-bot) by [tusharhero](https://github.com/tusharhero) - Makes [bincodes](https://github.com/tusharhero/bincode) from text provides and also converts them back to text.
+* [hydrolib_bot](https://github.com/Mayson90/hydrolib_bot) Toolset for Hydrophilia tabletop game (game cards, rules, structure...).
+* [Gugumoe-bot](http://t.me/gugumoe_bot) ([source](https://github.com/GooGuJiang/Gugumoe-bot)) by [咕谷酱](https://gmoe.cc) GuXiaoJiang is a multi-functional robot, such as OSU game information query, IP test, animation screenshot search and other functions.
+* [Feedback-bot](https://github.com/coder2020official/feedbackbot) A feedback bot for user-admin communication. Made on AsyncTeleBot, using [template](https://github.com/coder2020official/asynctelebot_template).
+* [TeleServ](https://github.com/ablakely/TeleServ) by [ablakely](https://github.com/ablakely) This is a Telegram to IRC bridge which links as an IRC server and makes Telegram users appear as native IRC users.
+* [Simple Store Bot](https://github.com/AntonGlyzin/myshopbot) by [Anton Glyzin](https://github.com/AntonGlyzin) This is a simple telegram-store with an admin panel. Designed according to a template.
+* [Media Rating Bot](https://t.me/mediaratingbot) ([source](https://github.com/CommanderCRM/MediaRatingBot))by [CommanderCRM](https://github.com/CommanderCRM). This bot aggregates media (movies, TV series, etc.) ratings from IMDb, Rotten Tomatoes, Metacritic, TheMovieDB, FilmAffinity and also provides number of votes of said media on IMDb.
+* [Spot Seek Bot](https://t.me/SpotSeekBot) ([source](https://github.com/arashnm80/spot-seek-bot)) by [Arashnm80](https://github.com/arashnm80). This is a free & open source telegram bot for downloading tracks, albums or playlists from spotify.
+* [CalendarIT Bot](https://t.me/calendarit_bot) ([source](https://github.com/codebyzen/CalendarIT_Telegram_Bot))by [CodeByZen](https://github.com/codebyzen). A simple, but extensible Python Telegram bot, can post acquainted with what is happening today, tomorrow or what happened 20 years ago to channel.
+* [DownloadMusicBOT](https://github.com/fcoagz/DownloadMusicBOT) by *Francisco Griman* - It is a simple bot that downloads audio from YouTube videos on Telegram.
+* [AwesomeChatGPTBot](https://github.com/Kourva/AwesomeChatGPTBot) - Simple ChatGTP-3.5 bot. It is FREE and can remember chat history for a while With pre-defined roles!
+* [QR-Code For You Bot](https://t.me/qrcode_for_you_bot) ([source](https://github.com/arashnm80/qrcode-for-you-bot)) by [Arashnm80](https://github.com/arashnm80). Telegram qrcode generator bot created with pyhton and telebot.
+* [Best Instagram Downloader Bot](https://t.me/Best_Instagram_Downloader_Bot) ([source](https://github.com/arashnm80/best-instagram-downloader)) by [Arashnm80](https://github.com/arashnm80). Free and open source telegram bot to download posts and reels from Instagram.
+* [4K YouTube Downloader](https://github.com/hansanaD/TelegramYTDLBot/) - Youtube Downloader with upto 4K resolution support.
+* [DrinkGenius-Bot](https://t.me/cocktail_recommendation_bot) ([source](https://github.com/Povladarchik/DrinkGenius-Bot)) by [Povladarchik](https://github.com/Povladarchik). Your personal assistant in the world of cocktails.
+* [Pytgpt-Bot](https://t.me/pytgpt_bot) ([source](https://github.com/Simatwa/pytgpt-bot)) by [Smartwa](https://github.com/Simatwa). AI powered bot for chatting, text-to-image and text-to-speech conversions.
+* [BetterForward](https://github.com/SideCloudGroup/BetterForward) by [SideCloud](https://github.com/SideCloudGroup). Probably the most reliable Message Forwarding Bot in Telegram via the Topic feature.
+
+**Want to have your bot listed here? Just make a pull request. Only bots with public source code are accepted.**
diff --git a/doc_req.txt b/doc_req.txt
new file mode 100644
index 000000000..ff01a213f
--- /dev/null
+++ b/doc_req.txt
@@ -0,0 +1,5 @@
+-r requirements.txt
+
+furo
+sphinx_copybutton
+git+https://github.com/eternnoir/pyTelegramBotAPI.git
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 000000000..d0c3cbf10
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,20 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line, and also
+# from the environment for the first two.
+SPHINXOPTS ?=
+SPHINXBUILD ?= sphinx-build
+SOURCEDIR = source
+BUILDDIR = build
+
+# Put it first so that "make" without argument is like "make help".
+help:
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/docs/source/_static/logo.png b/docs/source/_static/logo.png
new file mode 100644
index 000000000..b80632a1e
Binary files /dev/null and b/docs/source/_static/logo.png differ
diff --git a/docs/source/_static/logo2.png b/docs/source/_static/logo2.png
new file mode 100644
index 000000000..df0e0d7b0
Binary files /dev/null and b/docs/source/_static/logo2.png differ
diff --git a/docs/source/async_version/index.rst b/docs/source/async_version/index.rst
new file mode 100644
index 000000000..032e50233
--- /dev/null
+++ b/docs/source/async_version/index.rst
@@ -0,0 +1,48 @@
+====================
+AsyncTeleBot
+====================
+
+
+.. meta::
+ :description: Asynchronous pyTelegramBotAPI
+ :keywords: ptba, pytba, pyTelegramBotAPI, asynctelebot, documentation
+
+
+AsyncTeleBot methods
+--------------------
+
+.. automodule:: telebot.async_telebot
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+
+
+Asyncio filters
+---------------
+
+.. automodule:: telebot.asyncio_filters
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+Asyncio handler backends
+------------------------
+
+
+
+.. automodule:: telebot.asyncio_handler_backends
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+
+Extensions
+------------------------
+
+
+
+.. automodule:: telebot.ext.aio.webhooks
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/source/calldata.rst b/docs/source/calldata.rst
new file mode 100644
index 000000000..f471c34ec
--- /dev/null
+++ b/docs/source/calldata.rst
@@ -0,0 +1,17 @@
+
+=====================
+Callback data factory
+=====================
+
+.. meta::
+ :description: Callback data factory in pyTelegramBotAPI
+ :keywords: ptba, pytba, pyTelegramBotAPI, callbackdatafactory, guide, callbackdata, factory
+
+
+callback\_data file
+-----------------------------
+
+.. automodule:: telebot.callback_data
+ :members:
+ :undoc-members:
+ :show-inheritance:
\ No newline at end of file
diff --git a/docs/source/conf.py b/docs/source/conf.py
new file mode 100644
index 000000000..d1aa0b25d
--- /dev/null
+++ b/docs/source/conf.py
@@ -0,0 +1,72 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+from datetime import datetime
+
+# -- Project information -----------------------------------------------------
+
+project = 'pyTelegramBotAPI'
+author = 'coder2020official'
+copyright = f'2022-{datetime.now().year}, {author}'
+
+# The full version, including alpha/beta/rc tags
+release = '4.29.1'
+
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+ 'sphinx.ext.autosectionlabel',
+ 'sphinx.ext.autodoc',
+ "sphinx.ext.autosummary",
+ "sphinx.ext.napoleon",
+ "sphinx_copybutton",
+
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = []
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'furo'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+#html_logo = 'logo.png'
+html_theme_options = {
+ "light_css_variables": {
+ "color-brand-primary": "#7C4DFF",
+ "color-brand-content": "#7C4DFF",
+ },
+ "light_logo": "logo.png",
+ "dark_logo": "logo2.png",
+}
+
+locale_dirs = ["locales/"]
diff --git a/docs/source/formatting.rst b/docs/source/formatting.rst
new file mode 100644
index 000000000..d127cf777
--- /dev/null
+++ b/docs/source/formatting.rst
@@ -0,0 +1,12 @@
+==================
+Formatting options
+==================
+
+.. meta::
+ :description: Formatting options in pyTelegramBotAPI
+ :keywords: html, markdown, parse_mode, formatting, ptba, pytba, pyTelegramBotAPI
+
+.. automodule:: telebot.formatting
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/source/index.rst b/docs/source/index.rst
new file mode 100644
index 000000000..7db23a2fa
--- /dev/null
+++ b/docs/source/index.rst
@@ -0,0 +1,69 @@
+.. pyTelegramBotAPI documentation master file, created by
+ sphinx-quickstart on Fri Feb 18 20:58:37 2022.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+
+Welcome to pyTelegramBotAPI's documentation!
+============================================
+
+.. meta::
+ :description: Official documentation of pyTelegramBotAPI
+ :keywords: ptba, pytba, pyTelegramBotAPI, documentation, guide
+
+
+=======
+TeleBot
+=======
+TeleBot is synchronous and asynchronous implementation of `Telegram Bot API `_.
+
+Chats
+-----
+English chat: `Private chat `__
+
+Russian chat: `@pytelegrambotapi_talks_ru `__
+
+News: `@pyTelegramBotAPI `__
+
+Pypi: `Pypi `__
+
+Source: `Github repository `__
+
+Some features:
+--------------
+Easy to learn and use.
+
+Easy to understand.
+
+Both sync and async.
+
+Examples on features.
+
+States
+
+And more...
+
+Content
+--------
+.. toctree::
+
+ install
+ quick_start
+ types
+ sync_version/index
+ async_version/index
+ calldata
+ util
+ formatting
+
+
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
+
diff --git a/docs/source/install.rst b/docs/source/install.rst
new file mode 100644
index 000000000..906e8bfde
--- /dev/null
+++ b/docs/source/install.rst
@@ -0,0 +1,45 @@
+==================
+Installation Guide
+==================
+
+.. meta::
+ :description: Installation of pyTelegramBotAPI
+ :keywords: ptba, pytba, pyTelegramBotAPI, installation, guide
+
+
+Using PIP
+----------
+.. code-block:: bash
+
+ $ pip install pyTelegramBotAPI
+
+Using pipenv
+------------
+.. code-block:: bash
+
+ $ pipenv install pyTelegramBotAPI
+
+By cloning repository
+---------------------
+.. code-block:: bash
+
+ $ git clone https://github.com/eternnoir/pyTelegramBotAPI.git
+ $ cd pyTelegramBotAPI
+ $ python setup.py install
+
+Directly using pip
+------------------
+.. code-block:: bash
+
+ $ pip install git+https://github.com/eternnoir/pyTelegramBotAPI.git
+
+
+It is generally recommended to use the first option.
+
+While the API is production-ready, it is still under development and it has regular updates, do not forget to update it regularly by calling:
+
+.. code-block:: bash
+
+ $ pip install pytelegrambotapi --upgrade
+
+
diff --git a/docs/source/locales/en/LC_MESSAGES/async_version.po b/docs/source/locales/en/LC_MESSAGES/async_version.po
new file mode 100644
index 000000000..fd2679e40
--- /dev/null
+++ b/docs/source/locales/en/LC_MESSAGES/async_version.po
@@ -0,0 +1,5559 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-01-05 22:16+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../source/async_version/index.rst:3
+msgid "AsyncTeleBot"
+msgstr ""
+
+#: ../../source/async_version/index.rst:6
+msgid "Asynchronous pyTelegramBotAPI"
+msgstr ""
+
+#: ../../source/async_version/index.rst:6
+msgid "ptba, pytba, pyTelegramBotAPI, asynctelebot, documentation"
+msgstr ""
+
+#: ../../source/async_version/index.rst:12
+msgid "AsyncTeleBot methods"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:1
+#: telebot.async_telebot.ExceptionHandler:1 telebot.async_telebot.Handler:1
+#: telebot.asyncio_filters.TextFilter:1
+#: telebot.asyncio_handler_backends.BaseMiddleware:1
+#: telebot.asyncio_handler_backends.CancelUpdate:1
+#: telebot.asyncio_handler_backends.ContinueHandling:1
+#: telebot.asyncio_handler_backends.SkipHandler:1
+#: telebot.asyncio_handler_backends.State:1
+#: telebot.asyncio_handler_backends.StatesGroup:1
+#: telebot.ext.aio.webhooks.AsyncWebhookListener:1
+msgid "Bases: :py:class:`object`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:1
+msgid "This is the main asynchronous class for Bot."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:3
+msgid "It allows you to add handlers for different kind of updates."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:5
+msgid "Usage:"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:7
+msgid "Using asynchronous implementation of TeleBot."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:16
+msgid ""
+"See more examples in examples/ directory: "
+"https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:21
+msgid "Install coloredlogs module to specify colorful_logs=True"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot
+#: telebot.async_telebot.AsyncTeleBot.add_custom_filter
+#: telebot.async_telebot.AsyncTeleBot.add_data
+#: telebot.async_telebot.AsyncTeleBot.add_sticker_to_set
+#: telebot.async_telebot.AsyncTeleBot.answer_callback_query
+#: telebot.async_telebot.AsyncTeleBot.answer_inline_query
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query
+#: telebot.async_telebot.AsyncTeleBot.answer_web_app_query
+#: telebot.async_telebot.AsyncTeleBot.approve_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.callback_query_handler
+#: telebot.async_telebot.AsyncTeleBot.channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_join_request_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.chosen_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.close_general_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.copy_message
+#: telebot.async_telebot.AsyncTeleBot.copy_messages
+#: telebot.async_telebot.AsyncTeleBot.create_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.create_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.create_invoice_link
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.delete_message
+#: telebot.async_telebot.AsyncTeleBot.delete_messages
+#: telebot.async_telebot.AsyncTeleBot.delete_my_commands
+#: telebot.async_telebot.AsyncTeleBot.delete_state
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_webhook
+#: telebot.async_telebot.AsyncTeleBot.download_file
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.edit_general_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.edit_message_caption
+#: telebot.async_telebot.AsyncTeleBot.edit_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler
+#: telebot.async_telebot.AsyncTeleBot.enable_saving_states
+#: telebot.async_telebot.AsyncTeleBot.export_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.forward_message
+#: telebot.async_telebot.AsyncTeleBot.forward_messages
+#: telebot.async_telebot.AsyncTeleBot.get_chat
+#: telebot.async_telebot.AsyncTeleBot.get_chat_administrators
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member_count
+#: telebot.async_telebot.AsyncTeleBot.get_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers
+#: telebot.async_telebot.AsyncTeleBot.get_file
+#: telebot.async_telebot.AsyncTeleBot.get_file_url
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores
+#: telebot.async_telebot.AsyncTeleBot.get_my_commands
+#: telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.get_my_description
+#: telebot.async_telebot.AsyncTeleBot.get_my_name
+#: telebot.async_telebot.AsyncTeleBot.get_my_short_description
+#: telebot.async_telebot.AsyncTeleBot.get_state
+#: telebot.async_telebot.AsyncTeleBot.get_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.get_updates
+#: telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts
+#: telebot.async_telebot.AsyncTeleBot.get_user_profile_photos
+#: telebot.async_telebot.AsyncTeleBot.get_webhook_info
+#: telebot.async_telebot.AsyncTeleBot.hide_general_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.infinity_polling
+#: telebot.async_telebot.AsyncTeleBot.inline_handler
+#: telebot.async_telebot.AsyncTeleBot.leave_chat
+#: telebot.async_telebot.AsyncTeleBot.message_handler
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_count_handler
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_handler
+#: telebot.async_telebot.AsyncTeleBot.my_chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.poll_answer_handler
+#: telebot.async_telebot.AsyncTeleBot.poll_handler
+#: telebot.async_telebot.AsyncTeleBot.polling
+#: telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler
+#: telebot.async_telebot.AsyncTeleBot.process_new_updates
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member
+#: telebot.async_telebot.AsyncTeleBot.register_callback_query_handler
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler
+#: telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.reopen_general_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.reply_to
+#: telebot.async_telebot.AsyncTeleBot.reset_data
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member
+#: telebot.async_telebot.AsyncTeleBot.retrieve_data
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.run_webhooks
+#: telebot.async_telebot.AsyncTeleBot.send_animation
+#: telebot.async_telebot.AsyncTeleBot.send_audio
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action
+#: telebot.async_telebot.AsyncTeleBot.send_contact
+#: telebot.async_telebot.AsyncTeleBot.send_dice
+#: telebot.async_telebot.AsyncTeleBot.send_document
+#: telebot.async_telebot.AsyncTeleBot.send_game
+#: telebot.async_telebot.AsyncTeleBot.send_invoice
+#: telebot.async_telebot.AsyncTeleBot.send_location
+#: telebot.async_telebot.AsyncTeleBot.send_media_group
+#: telebot.async_telebot.AsyncTeleBot.send_message
+#: telebot.async_telebot.AsyncTeleBot.send_photo
+#: telebot.async_telebot.AsyncTeleBot.send_poll
+#: telebot.async_telebot.AsyncTeleBot.send_sticker
+#: telebot.async_telebot.AsyncTeleBot.send_venue
+#: telebot.async_telebot.AsyncTeleBot.send_video
+#: telebot.async_telebot.AsyncTeleBot.send_video_note
+#: telebot.async_telebot.AsyncTeleBot.send_voice
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description
+#: telebot.async_telebot.AsyncTeleBot.set_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_game_score
+#: telebot.async_telebot.AsyncTeleBot.set_message_reaction
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands
+#: telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.set_my_description
+#: telebot.async_telebot.AsyncTeleBot.set_my_name
+#: telebot.async_telebot.AsyncTeleBot.set_my_short_description
+#: telebot.async_telebot.AsyncTeleBot.set_state
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_keywords
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title
+#: telebot.async_telebot.AsyncTeleBot.set_update_listener
+#: telebot.async_telebot.AsyncTeleBot.set_webhook
+#: telebot.async_telebot.AsyncTeleBot.setup_middleware
+#: telebot.async_telebot.AsyncTeleBot.shipping_query_handler
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.stop_poll
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.unhide_general_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.upload_sticker_file
+#: telebot.asyncio_filters.TextFilter
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:24
+msgid "Token of a bot, obtained from @BotFather"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:27
+msgid "Default parse mode, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:30
+msgid "Offset used in get_updates, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:33
+msgid ""
+"Exception handler, which will handle the exception occured, defaults to "
+"None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:36
+msgid "Storage for states, defaults to StateMemoryStorage()"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:39
+msgid "Default value for disable_web_page_preview, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:42
+msgid "Default value for disable_notification, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:45
+msgid "Default value for protect_content, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:48
+msgid "Default value for allow_sending_without_reply, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:51
+msgid "Outputs colorful logs"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_custom_filter:1
+msgid "Create custom filter."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_custom_filter:3
+msgid "Example on checking the text of a message"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_custom_filter:12
+msgid "Class with check(message) method."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_custom_filter
+#: telebot.async_telebot.AsyncTeleBot.add_data
+#: telebot.async_telebot.AsyncTeleBot.add_sticker_to_set
+#: telebot.async_telebot.AsyncTeleBot.answer_callback_query
+#: telebot.async_telebot.AsyncTeleBot.answer_inline_query
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query
+#: telebot.async_telebot.AsyncTeleBot.answer_web_app_query
+#: telebot.async_telebot.AsyncTeleBot.approve_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.callback_query_handler
+#: telebot.async_telebot.AsyncTeleBot.channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_join_request_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.chosen_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.close
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.copy_message
+#: telebot.async_telebot.AsyncTeleBot.copy_messages
+#: telebot.async_telebot.AsyncTeleBot.create_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.create_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.create_invoice_link
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.delete_message
+#: telebot.async_telebot.AsyncTeleBot.delete_messages
+#: telebot.async_telebot.AsyncTeleBot.delete_my_commands
+#: telebot.async_telebot.AsyncTeleBot.delete_state
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_webhook
+#: telebot.async_telebot.AsyncTeleBot.download_file
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.edit_message_caption
+#: telebot.async_telebot.AsyncTeleBot.edit_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler
+#: telebot.async_telebot.AsyncTeleBot.export_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.forward_message
+#: telebot.async_telebot.AsyncTeleBot.forward_messages
+#: telebot.async_telebot.AsyncTeleBot.get_chat
+#: telebot.async_telebot.AsyncTeleBot.get_chat_administrators
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member_count
+#: telebot.async_telebot.AsyncTeleBot.get_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers
+#: telebot.async_telebot.AsyncTeleBot.get_file
+#: telebot.async_telebot.AsyncTeleBot.get_file_url
+#: telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores
+#: telebot.async_telebot.AsyncTeleBot.get_my_commands
+#: telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.get_my_description
+#: telebot.async_telebot.AsyncTeleBot.get_my_name
+#: telebot.async_telebot.AsyncTeleBot.get_my_short_description
+#: telebot.async_telebot.AsyncTeleBot.get_state
+#: telebot.async_telebot.AsyncTeleBot.get_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.get_updates
+#: telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts
+#: telebot.async_telebot.AsyncTeleBot.get_user_profile_photos
+#: telebot.async_telebot.AsyncTeleBot.get_webhook_info
+#: telebot.async_telebot.AsyncTeleBot.infinity_polling
+#: telebot.async_telebot.AsyncTeleBot.inline_handler
+#: telebot.async_telebot.AsyncTeleBot.leave_chat
+#: telebot.async_telebot.AsyncTeleBot.log_out
+#: telebot.async_telebot.AsyncTeleBot.message_handler
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_count_handler
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_handler
+#: telebot.async_telebot.AsyncTeleBot.my_chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.poll_answer_handler
+#: telebot.async_telebot.AsyncTeleBot.poll_handler
+#: telebot.async_telebot.AsyncTeleBot.polling
+#: telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler
+#: telebot.async_telebot.AsyncTeleBot.process_new_updates
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member
+#: telebot.async_telebot.AsyncTeleBot.register_callback_query_handler
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler
+#: telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.reply_to
+#: telebot.async_telebot.AsyncTeleBot.reset_data
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member
+#: telebot.async_telebot.AsyncTeleBot.retrieve_data
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.run_webhooks
+#: telebot.async_telebot.AsyncTeleBot.send_animation
+#: telebot.async_telebot.AsyncTeleBot.send_audio
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action
+#: telebot.async_telebot.AsyncTeleBot.send_contact
+#: telebot.async_telebot.AsyncTeleBot.send_dice
+#: telebot.async_telebot.AsyncTeleBot.send_document
+#: telebot.async_telebot.AsyncTeleBot.send_game
+#: telebot.async_telebot.AsyncTeleBot.send_invoice
+#: telebot.async_telebot.AsyncTeleBot.send_location
+#: telebot.async_telebot.AsyncTeleBot.send_media_group
+#: telebot.async_telebot.AsyncTeleBot.send_message
+#: telebot.async_telebot.AsyncTeleBot.send_photo
+#: telebot.async_telebot.AsyncTeleBot.send_poll
+#: telebot.async_telebot.AsyncTeleBot.send_sticker
+#: telebot.async_telebot.AsyncTeleBot.send_venue
+#: telebot.async_telebot.AsyncTeleBot.send_video
+#: telebot.async_telebot.AsyncTeleBot.send_video_note
+#: telebot.async_telebot.AsyncTeleBot.send_voice
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description
+#: telebot.async_telebot.AsyncTeleBot.set_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_game_score
+#: telebot.async_telebot.AsyncTeleBot.set_message_reaction
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands
+#: telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.set_my_description
+#: telebot.async_telebot.AsyncTeleBot.set_my_name
+#: telebot.async_telebot.AsyncTeleBot.set_my_short_description
+#: telebot.async_telebot.AsyncTeleBot.set_state
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_keywords
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title
+#: telebot.async_telebot.AsyncTeleBot.set_update_listener
+#: telebot.async_telebot.AsyncTeleBot.set_webhook
+#: telebot.async_telebot.AsyncTeleBot.setup_middleware
+#: telebot.async_telebot.AsyncTeleBot.shipping_query_handler
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.stop_poll
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.upload_sticker_file
+#: telebot.asyncio_filters.TextFilter
+#: telebot.ext.aio.webhooks.AsyncWebhookListener.run_app
+msgid "Returns"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_custom_filter:15
+#: telebot.async_telebot.AsyncTeleBot.add_data:10
+#: telebot.async_telebot.AsyncTeleBot.callback_query_handler:9
+#: telebot.async_telebot.AsyncTeleBot.channel_post_handler:17
+#: telebot.async_telebot.AsyncTeleBot.chat_boost_handler:8
+#: telebot.async_telebot.AsyncTeleBot.chat_join_request_handler:10
+#: telebot.async_telebot.AsyncTeleBot.chat_member_handler:11
+#: telebot.async_telebot.AsyncTeleBot.chosen_inline_handler:10
+#: telebot.async_telebot.AsyncTeleBot.delete_state:9
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:22
+#: telebot.async_telebot.AsyncTeleBot.infinity_polling:35
+#: telebot.async_telebot.AsyncTeleBot.inline_handler:9
+#: telebot.async_telebot.AsyncTeleBot.my_chat_member_handler:10
+#: telebot.async_telebot.AsyncTeleBot.poll_answer_handler:10
+#: telebot.async_telebot.AsyncTeleBot.poll_handler:8
+#: telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler:9
+#: telebot.async_telebot.AsyncTeleBot.process_new_updates:8
+#: telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:23
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:13
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:26
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:26
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:13
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:14
+#: telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler:8
+#: telebot.async_telebot.AsyncTeleBot.reset_data:9
+#: telebot.async_telebot.AsyncTeleBot.set_state:18
+#: telebot.async_telebot.AsyncTeleBot.set_update_listener:15
+#: telebot.async_telebot.AsyncTeleBot.setup_middleware:10
+#: telebot.async_telebot.AsyncTeleBot.shipping_query_handler:9
+#: telebot.asyncio_filters.TextFilter:22
+#: telebot.ext.aio.webhooks.AsyncWebhookListener.run_app:4
+msgid "None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_data:1
+msgid "Add data to states."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_data:3
+#: telebot.async_telebot.AsyncTeleBot.delete_state:3
+#: telebot.async_telebot.AsyncTeleBot.get_state:4
+#: telebot.async_telebot.AsyncTeleBot.reset_data:3
+#: telebot.async_telebot.AsyncTeleBot.set_state:9
+msgid "User's identifier"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_data:6
+#: telebot.async_telebot.AsyncTeleBot.delete_state:6
+#: telebot.async_telebot.AsyncTeleBot.get_state:7
+#: telebot.async_telebot.AsyncTeleBot.reset_data:6
+#: telebot.async_telebot.AsyncTeleBot.set_state:15
+msgid "Chat's identifier"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_data:9
+msgid "Data to add"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:1
+msgid ""
+"Use this method to add a new sticker to a set created by the bot. The "
+"format of the added sticker must match the format of the other stickers "
+"in the set. Emoji sticker sets can have up to 200 stickers. Animated and "
+"video sticker sets can have up to 50 stickers. Static sticker sets can "
+"have up to 120 stickers. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:8
+msgid ""
+"**_sticker, mask_position, emojis parameters are deprecated, use stickers"
+" instead"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:10
+msgid "Telegram documentation: https://core.telegram.org/bots/api#addstickertoset"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:12
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:10
+msgid "User identifier of created sticker set owner"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:15
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set:3
+#: telebot.async_telebot.AsyncTeleBot.get_sticker_set:5
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail:4
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list:4
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:6
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title:4
+msgid "Sticker set name"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:18
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:21
+msgid "One or more emoji corresponding to the sticker"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:21
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:24
+msgid ""
+"PNG image with the sticker, must be up to 512 kilobytes in size, "
+"dimensions must not exceed 512px, and either width or height must be "
+"exactly 512px. Pass a file_id as a String to send a file that already "
+"exists on the Telegram servers, pass an HTTP URL as a String for Telegram"
+" to get a file from the Internet, or upload a new one using multipart"
+"/form-data."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:26
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:29
+msgid "TGS animation with the sticker, uploaded using multipart/form-data."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:29
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:32
+msgid "WebM animation with the sticker, uploaded using multipart/form-data."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:32
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:42
+msgid ""
+"A JSON-serialized object for position where the mask should be placed on "
+"faces"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:35
+msgid ""
+"A JSON-serialized list of 1-50 initial stickers to be added to the "
+"sticker set"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:38
+#: telebot.async_telebot.AsyncTeleBot.answer_callback_query:22
+#: telebot.async_telebot.AsyncTeleBot.answer_inline_query:38
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:21
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query:18
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic:13
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:56
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic:13
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set:6
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic:22
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:13
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_keywords:11
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:11
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:15
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:13
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages:11
+msgid "On success, True is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set
+#: telebot.async_telebot.AsyncTeleBot.answer_callback_query
+#: telebot.async_telebot.AsyncTeleBot.answer_inline_query
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query
+#: telebot.async_telebot.AsyncTeleBot.answer_web_app_query
+#: telebot.async_telebot.AsyncTeleBot.approve_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.copy_message
+#: telebot.async_telebot.AsyncTeleBot.copy_messages
+#: telebot.async_telebot.AsyncTeleBot.create_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.create_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.create_invoice_link
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.delete_message
+#: telebot.async_telebot.AsyncTeleBot.delete_my_commands
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_webhook
+#: telebot.async_telebot.AsyncTeleBot.download_file
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.edit_message_caption
+#: telebot.async_telebot.AsyncTeleBot.edit_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text
+#: telebot.async_telebot.AsyncTeleBot.export_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.forward_message
+#: telebot.async_telebot.AsyncTeleBot.forward_messages
+#: telebot.async_telebot.AsyncTeleBot.get_chat
+#: telebot.async_telebot.AsyncTeleBot.get_chat_administrators
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member_count
+#: telebot.async_telebot.AsyncTeleBot.get_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers
+#: telebot.async_telebot.AsyncTeleBot.get_file_url
+#: telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores
+#: telebot.async_telebot.AsyncTeleBot.get_my_commands
+#: telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.get_state
+#: telebot.async_telebot.AsyncTeleBot.get_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.get_updates
+#: telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts
+#: telebot.async_telebot.AsyncTeleBot.get_user_profile_photos
+#: telebot.async_telebot.AsyncTeleBot.get_webhook_info
+#: telebot.async_telebot.AsyncTeleBot.log_out
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.reply_to
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member
+#: telebot.async_telebot.AsyncTeleBot.retrieve_data
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.send_animation
+#: telebot.async_telebot.AsyncTeleBot.send_audio
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action
+#: telebot.async_telebot.AsyncTeleBot.send_contact
+#: telebot.async_telebot.AsyncTeleBot.send_dice
+#: telebot.async_telebot.AsyncTeleBot.send_document
+#: telebot.async_telebot.AsyncTeleBot.send_game
+#: telebot.async_telebot.AsyncTeleBot.send_invoice
+#: telebot.async_telebot.AsyncTeleBot.send_location
+#: telebot.async_telebot.AsyncTeleBot.send_media_group
+#: telebot.async_telebot.AsyncTeleBot.send_message
+#: telebot.async_telebot.AsyncTeleBot.send_photo
+#: telebot.async_telebot.AsyncTeleBot.send_poll
+#: telebot.async_telebot.AsyncTeleBot.send_sticker
+#: telebot.async_telebot.AsyncTeleBot.send_venue
+#: telebot.async_telebot.AsyncTeleBot.send_video
+#: telebot.async_telebot.AsyncTeleBot.send_video_note
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description
+#: telebot.async_telebot.AsyncTeleBot.set_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_game_score
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands
+#: telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_keywords
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title
+#: telebot.async_telebot.AsyncTeleBot.set_webhook
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.stop_poll
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.upload_sticker_file
+msgid "Return type"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:39
+#: telebot.async_telebot.AsyncTeleBot.answer_callback_query:23
+#: telebot.async_telebot.AsyncTeleBot.answer_inline_query:39
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:22
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query:19
+#: telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:15
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_member:25
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:17
+#: telebot.async_telebot.AsyncTeleBot.close:9
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic:14
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:57
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:15
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_photo:13
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set:11
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic:14
+#: telebot.async_telebot.AsyncTeleBot.delete_message:23
+#: telebot.async_telebot.AsyncTeleBot.delete_my_commands:17
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set:7
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set:7
+#: telebot.async_telebot.AsyncTeleBot.delete_webhook:13
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic:23
+#: telebot.async_telebot.AsyncTeleBot.leave_chat:8
+#: telebot.async_telebot.AsyncTeleBot.log_out:11
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message:19
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member:70
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:14
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member:61
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action:26
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:18
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description:14
+#: telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:15
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions:21
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo:16
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title:17
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail:11
+#: telebot.async_telebot.AsyncTeleBot.set_message_reaction:18
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands:18
+#: telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:18
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list:11
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_keywords:12
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position:12
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:12
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:16
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title:11
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member:20
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:15
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages:12
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:14
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages:12
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message:15
+msgid ":obj:`bool`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:1
+msgid ""
+"Use this method to send answers to callback queries sent from inline "
+"keyboards. The answer will be displayed to the user as a notification at "
+"the top of the chat screen or as an alert."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answercallbackquery"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:6
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:10
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query:5
+#: telebot.async_telebot.AsyncTeleBot.answer_web_app_query:8
+msgid "Unique identifier for the query to be answered"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:9
+msgid ""
+"Text of the notification. If not specified, nothing will be shown to the "
+"user, 0-200 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:12
+msgid ""
+"If True, an alert will be shown by the client instead of a notification "
+"at the top of the chat screen. Defaults to false."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:15
+msgid ""
+"URL that will be opened by the user's client. If you have created a Game "
+"and accepted the conditions via @BotFather, specify the URL that opens "
+"your game - note that this will only work if the query comes from a "
+"callback_game button."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:19
+msgid ""
+"The maximum amount of time in seconds that the result of the callback "
+"query may be cached client-side. Telegram apps will support caching "
+"starting in version 3.14. Defaults to 0."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:1
+msgid ""
+"Use this method to send answers to an inline query. On success, True is "
+"returned. No more than 50 results per query are allowed."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answerinlinequery"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:6
+msgid "Unique identifier for the answered query"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:9
+msgid "Array of results for the inline query"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:12
+msgid ""
+"The maximum amount of time in seconds that the result of the inline query"
+" may be cached on the server."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:16
+msgid ""
+"Pass True, if results may be cached on the server side only for the user "
+"that sent the query."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:20
+msgid ""
+"Pass the offset that a client should send in the next query with the same"
+" text to receive more results."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:24
+msgid ""
+"Deep-linking parameter for the /start message sent to the bot when user "
+"presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - "
+"are allowed. Example: An inline bot that sends YouTube videos can ask the"
+" user to connect the bot to their YouTube account to adapt search results"
+" accordingly. To do this, it displays a 'Connect your YouTube account' "
+"button above the results, or even before showing any. The user presses "
+"the button, switches to a private chat with the bot and, in doing so, "
+"passes a start parameter that instructs the bot to return an OAuth link. "
+"Once done, the bot can offer a switch_inline button so that the user can "
+"easily return to the chat where they wanted to use the bot's inline "
+"capabilities."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:32
+msgid ""
+"Parameter for the start message sent to the bot when user presses the "
+"switch button"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:35
+msgid ""
+"A JSON-serialized object describing a button to be shown above inline "
+"query results"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:1
+msgid ""
+"Once the user has confirmed their payment and shipping details, the Bot "
+"API sends the final confirmation in the form of an Update with the field "
+"pre_checkout_query. Use this method to respond to such pre-checkout "
+"queries. On success, True is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:6
+msgid ""
+"The Bot API must receive an answer within 10 seconds after the pre-"
+"checkout query was sent."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answerprecheckoutquery"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:13
+msgid ""
+"Specify True if everything is alright (goods are available, etc.) and the"
+" bot is ready to proceed with the order. Use False if there are any "
+"problems."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:16
+msgid ""
+"Required if ok is False. Error message in human readable form that "
+"explains the reason for failure to proceed with the checkout (e.g. "
+"\"Sorry, somebody just bought the last of our amazing black T-shirts "
+"while you were busy filling out your payment details. Please choose a "
+"different color or garment!\"). Telegram will display this message to the"
+" user."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_shipping_query:1
+msgid "Asks for an answer to a shipping question."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_shipping_query:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answershippingquery"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_shipping_query:8
+msgid ""
+"Specify True if delivery to the specified address is possible and False "
+"if there are any problems (for example, if delivery to the specified "
+"address is not possible)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_shipping_query:11
+msgid ""
+"Required if ok is True. A JSON-serialized array of available shipping "
+"options."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_shipping_query:14
+msgid ""
+"Required if ok is False. Error message in human readable form that "
+"explains why it is impossible to complete the order (e.g. \"Sorry, "
+"delivery to your desired address is unavailable'). Telegram will display "
+"this message to the user."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_web_app_query:1
+msgid ""
+"Use this method to set the result of an interaction with a Web App and "
+"send a corresponding message on behalf of the user to the chat from which"
+" the query originated. On success, a SentWebAppMessage object is "
+"returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_web_app_query:6
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#answerwebappquery"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_web_app_query:11
+msgid "A JSON-serialized object describing the message to be sent"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_web_app_query:14
+msgid "On success, a SentWebAppMessage object is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_web_app_query:15
+msgid ":class:`telebot.types.SentWebAppMessage`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:1
+msgid ""
+"Use this method to approve a chat join request. The bot must be an "
+"administrator in the chat for this to work and must have the "
+"can_invite_users administrator right. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#approvechatjoinrequest"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:7
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:7
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set:7
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member:5
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:6
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions:7
+#: telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:7
+msgid ""
+"Unique identifier for the target chat or username of the target "
+"supergroup (in the format @supergroupusername)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:11
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_member:12
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:11
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member:8
+#: telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:8
+#: telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:6
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member:11
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member:14
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:10
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member:13
+msgid "Unique identifier of the target user"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:14
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:16
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:14
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_photo:12
+#: telebot.async_telebot.AsyncTeleBot.delete_my_commands:16
+#: telebot.async_telebot.AsyncTeleBot.log_out:10
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message:18
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member:69
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:17
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description:13
+#: telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:14
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo:15
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title:16
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands:17
+#: telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:17
+#: telebot.async_telebot.AsyncTeleBot.set_my_description:12
+#: telebot.async_telebot.AsyncTeleBot.set_my_name:12
+#: telebot.async_telebot.AsyncTeleBot.set_my_short_description:12
+#: telebot.async_telebot.AsyncTeleBot.set_webhook:46
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:14
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages:11
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message:14
+msgid "True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:1
+msgid ""
+"Use this method to ban a user in a group, a supergroup or a channel. In "
+"the case of supergroups and channels, the user will not be able to return"
+" to the chat on their own using invite links, etc., unless unbanned "
+"first. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:6
+msgid "Telegram documentation: https://core.telegram.org/bots/api#banchatmember"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:8
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member:10
+msgid ""
+"Unique identifier for the target group or username of the target "
+"supergroup or channel (in the format @channelusername)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:15
+msgid ""
+"Date when the user will be unbanned, unix time. If user is banned for "
+"more than 366 days or less than 30 seconds from the current time they are"
+" considered to be banned forever"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:19
+msgid ""
+"Bool: Pass True to delete all messages from the chat for the user that is"
+" being removed. If False, the user will be able to see messages in the "
+"group that were sent before the user was removed. Always True for "
+"supergroups and channels."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:24
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set:10
+#: telebot.async_telebot.AsyncTeleBot.delete_message:22
+#: telebot.async_telebot.AsyncTeleBot.delete_messages:14
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set:6
+#: telebot.async_telebot.AsyncTeleBot.delete_webhook:12
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action:25
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail:10
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list:10
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position:11
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title:10
+msgid "Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:1
+msgid ""
+"Use this method to ban a channel chat in a supergroup or a channel. The "
+"owner of the chat will not be able to send messages and join live streams"
+" on behalf of the chat, unless it is unbanned first. The bot must be an "
+"administrator in the supergroup or channel for this to work and must have"
+" the appropriate administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#banchatsenderchat"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:10
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.close_general_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.copy_message:5
+#: telebot.async_telebot.AsyncTeleBot.copy_messages:3
+#: telebot.async_telebot.AsyncTeleBot.create_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.delete_message:13
+#: telebot.async_telebot.AsyncTeleBot.delete_messages:8
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.edit_general_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.edit_message_live_location:13
+#: telebot.async_telebot.AsyncTeleBot.forward_message:8
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:3
+#: telebot.async_telebot.AsyncTeleBot.hide_general_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message:7
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.reopen_general_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.send_animation:6
+#: telebot.async_telebot.AsyncTeleBot.send_audio:9
+#: telebot.async_telebot.AsyncTeleBot.send_dice:5
+#: telebot.async_telebot.AsyncTeleBot.send_document:5
+#: telebot.async_telebot.AsyncTeleBot.send_game:5
+#: telebot.async_telebot.AsyncTeleBot.send_location:5
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:6
+#: telebot.async_telebot.AsyncTeleBot.send_message:9
+#: telebot.async_telebot.AsyncTeleBot.send_photo:5
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:6
+#: telebot.async_telebot.AsyncTeleBot.send_video:5
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:6
+#: telebot.async_telebot.AsyncTeleBot.send_voice:7
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description:6
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title:9
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location:6
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:8
+#: telebot.async_telebot.AsyncTeleBot.unhide_general_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:7
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message:7
+msgid ""
+"Unique identifier for the target chat or username of the target channel "
+"(in the format @channelusername)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:13
+msgid "Unique identifier of the target sender chat"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.callback_query_handler:1
+msgid ""
+"Handles new incoming callback query. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.CallbackQuery` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.callback_query_handler:4
+#: telebot.async_telebot.AsyncTeleBot.channel_post_handler:10
+#: telebot.async_telebot.AsyncTeleBot.chat_boost_handler:4
+#: telebot.async_telebot.AsyncTeleBot.chat_join_request_handler:5
+#: telebot.async_telebot.AsyncTeleBot.chat_member_handler:6
+#: telebot.async_telebot.AsyncTeleBot.chosen_inline_handler:5
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:10
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:11
+#: telebot.async_telebot.AsyncTeleBot.inline_handler:4
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_count_handler:4
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_handler:4
+#: telebot.async_telebot.AsyncTeleBot.my_chat_member_handler:5
+#: telebot.async_telebot.AsyncTeleBot.poll_answer_handler:5
+#: telebot.async_telebot.AsyncTeleBot.poll_handler:4
+#: telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler:4
+#: telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:15
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:15
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:15
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:15
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:6
+#: telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler:4
+#: telebot.async_telebot.AsyncTeleBot.shipping_query_handler:4
+msgid "Function executed as a filter"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.callback_query_handler:7
+#: telebot.async_telebot.AsyncTeleBot.channel_post_handler:16
+#: telebot.async_telebot.AsyncTeleBot.chat_boost_handler:7
+#: telebot.async_telebot.AsyncTeleBot.chat_join_request_handler:8
+#: telebot.async_telebot.AsyncTeleBot.chat_member_handler:9
+#: telebot.async_telebot.AsyncTeleBot.chosen_inline_handler:8
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:16
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:20
+#: telebot.async_telebot.AsyncTeleBot.inline_handler:7
+#: telebot.async_telebot.AsyncTeleBot.message_handler:50
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_count_handler:7
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_handler:7
+#: telebot.async_telebot.AsyncTeleBot.my_chat_member_handler:8
+#: telebot.async_telebot.AsyncTeleBot.poll_answer_handler:8
+#: telebot.async_telebot.AsyncTeleBot.poll_handler:7
+#: telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler:7
+#: telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:21
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:11
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:21
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:24
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:24
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:11
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:11
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:12
+#: telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler:7
+#: telebot.async_telebot.AsyncTeleBot.shipping_query_handler:7
+msgid "Optional keyword arguments(custom filters)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.channel_post_handler:1
+msgid ""
+"Handles new incoming channel post of any kind - text, photo, sticker, "
+"etc. As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.channel_post_handler:4
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:4
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:5
+#: telebot.async_telebot.AsyncTeleBot.message_handler:34
+msgid "Optional list of strings (commands to handle)."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.channel_post_handler:7
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:7
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:8
+#: telebot.async_telebot.AsyncTeleBot.message_handler:37
+msgid "Optional regular expression."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.channel_post_handler:13
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:13
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:14
+#: telebot.async_telebot.AsyncTeleBot.message_handler:44
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:6
+msgid "Supported message content types. Must be a list. Defaults to ['text']."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.chat_boost_handler:1
+msgid ""
+"Handles new incoming chat boost state. it passes "
+":class:`telebot.types.ChatBoostUpdated` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.chat_join_request_handler:1
+msgid ""
+"Handles a request to join the chat has been sent. The bot must have the "
+"can_invite_users administrator right in the chat to receive these "
+"updates. As a parameter to the decorator function, it passes "
+":class:`telebot.types.ChatJoinRequest` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.chat_member_handler:1
+msgid ""
+"Handles update in a status of a user in a chat. The bot must be an "
+"administrator in the chat and must explicitly specify “chat_member” in "
+"the list of allowed_updates to receive these updates. As a parameter to "
+"the decorator function, it passes "
+":class:`telebot.types.ChatMemberUpdated` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.chosen_inline_handler:1
+msgid ""
+"The result of an inline query that was chosen by a user and sent to their"
+" chat partner. Please see our documentation on the feedback collecting "
+"for details on how to enable these updates for your bot. As a parameter "
+"to the decorator function, it passes "
+":class:`telebot.types.ChosenInlineResult` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.close:1
+msgid ""
+"Use this method to close the bot instance before moving it from one local"
+" server to another. You need to delete the webhook before calling this "
+"method to ensure that the bot isn't launched again after server restart. "
+"The method will return error 429 in the first 10 minutes after the bot is"
+" launched. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.close:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#close"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.close_forum_topic:1
+msgid ""
+"Use this method to close an open topic in a forum supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the can_manage_topics administrator rights, unless it is the creator of "
+"the topic. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.close_forum_topic:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#closeforumtopic"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.close_forum_topic:10
+msgid "Identifier of the topic to close"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.close_general_forum_topic:1
+msgid ""
+"Use this method to close the 'General' topic in a forum supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.close_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#closegeneralforumtopic"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.close_session:1
+msgid ""
+"Closes existing session of aiohttp. Use this function if you stop "
+"polling/webhooks."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:1
+#: telebot.async_telebot.AsyncTeleBot.copy_messages:1
+msgid "Use this method to copy messages of any kind."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#copymessage"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:8
+#: telebot.async_telebot.AsyncTeleBot.copy_messages:6
+#: telebot.async_telebot.AsyncTeleBot.forward_message:11
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:6
+msgid ""
+"Unique identifier for the chat where the original message was sent (or "
+"channel username in the format @channelusername)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:10
+#: telebot.async_telebot.AsyncTeleBot.forward_message:14
+msgid "Message identifier in the chat specified in from_chat_id"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:13
+msgid ""
+"New caption for media, 0-1024 characters after entities parsing. If not "
+"specified, the original caption is kept"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:16
+msgid "Mode for parsing entities in the new caption."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:19
+msgid ""
+"A JSON-serialized list of special entities that appear in the new "
+"caption, which can be specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:22
+#: telebot.async_telebot.AsyncTeleBot.send_animation:45
+#: telebot.async_telebot.AsyncTeleBot.send_audio:39
+#: telebot.async_telebot.AsyncTeleBot.send_contact:20
+#: telebot.async_telebot.AsyncTeleBot.send_dice:12
+#: telebot.async_telebot.AsyncTeleBot.send_document:26
+#: telebot.async_telebot.AsyncTeleBot.send_game:11
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:67
+#: telebot.async_telebot.AsyncTeleBot.send_location:25
+#: telebot.async_telebot.AsyncTeleBot.send_message:24
+#: telebot.async_telebot.AsyncTeleBot.send_photo:22
+#: telebot.async_telebot.AsyncTeleBot.send_poll:44
+#: telebot.async_telebot.AsyncTeleBot.send_venue:27
+#: telebot.async_telebot.AsyncTeleBot.send_video:35
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:27
+#: telebot.async_telebot.AsyncTeleBot.send_voice:31
+msgid ""
+"Sends the message silently. Users will receive a notification with no "
+"sound."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:25
+#: telebot.async_telebot.AsyncTeleBot.send_animation:34
+#: telebot.async_telebot.AsyncTeleBot.send_audio:57
+#: telebot.async_telebot.AsyncTeleBot.send_contact:38
+#: telebot.async_telebot.AsyncTeleBot.send_document:50
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:95
+#: telebot.async_telebot.AsyncTeleBot.send_location:43
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:15
+#: telebot.async_telebot.AsyncTeleBot.send_photo:25
+#: telebot.async_telebot.AsyncTeleBot.send_poll:64
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:30
+#: telebot.async_telebot.AsyncTeleBot.send_venue:51
+#: telebot.async_telebot.AsyncTeleBot.send_video:38
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:42
+#: telebot.async_telebot.AsyncTeleBot.send_voice:43
+msgid "Protects the contents of the sent message from forwarding and saving"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:28
+#: telebot.async_telebot.AsyncTeleBot.send_animation:37
+#: telebot.async_telebot.AsyncTeleBot.send_audio:29
+#: telebot.async_telebot.AsyncTeleBot.send_contact:23
+#: telebot.async_telebot.AsyncTeleBot.send_dice:15
+#: telebot.async_telebot.AsyncTeleBot.send_document:12
+#: telebot.async_telebot.AsyncTeleBot.send_game:14
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:70
+#: telebot.async_telebot.AsyncTeleBot.send_location:17
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:18
+#: telebot.async_telebot.AsyncTeleBot.send_message:30
+#: telebot.async_telebot.AsyncTeleBot.send_photo:28
+#: telebot.async_telebot.AsyncTeleBot.send_poll:47
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:13
+#: telebot.async_telebot.AsyncTeleBot.send_venue:30
+#: telebot.async_telebot.AsyncTeleBot.send_video:41
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:19
+#: telebot.async_telebot.AsyncTeleBot.send_voice:20
+msgid "If the message is a reply, ID of the original message"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:31
+#: telebot.async_telebot.AsyncTeleBot.send_animation:54
+#: telebot.async_telebot.AsyncTeleBot.send_audio:54
+#: telebot.async_telebot.AsyncTeleBot.send_dice:26
+#: telebot.async_telebot.AsyncTeleBot.send_document:38
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:84
+#: telebot.async_telebot.AsyncTeleBot.send_location:40
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:24
+#: telebot.async_telebot.AsyncTeleBot.send_message:33
+#: telebot.async_telebot.AsyncTeleBot.send_photo:31
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:27
+#: telebot.async_telebot.AsyncTeleBot.send_video:44
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:39
+#: telebot.async_telebot.AsyncTeleBot.send_voice:40
+msgid ""
+"Pass True, if the message should be sent even if the specified replied-to"
+" message is not found"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:34
+#: telebot.async_telebot.AsyncTeleBot.send_animation:40
+#: telebot.async_telebot.AsyncTeleBot.send_contact:26
+#: telebot.async_telebot.AsyncTeleBot.send_dice:18
+#: telebot.async_telebot.AsyncTeleBot.send_document:18
+#: telebot.async_telebot.AsyncTeleBot.send_game:17
+#: telebot.async_telebot.AsyncTeleBot.send_location:20
+#: telebot.async_telebot.AsyncTeleBot.send_message:36
+#: telebot.async_telebot.AsyncTeleBot.send_photo:34
+#: telebot.async_telebot.AsyncTeleBot.send_poll:53
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:16
+#: telebot.async_telebot.AsyncTeleBot.send_venue:33
+#: telebot.async_telebot.AsyncTeleBot.send_video:47
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:22
+#: telebot.async_telebot.AsyncTeleBot.send_voice:23
+msgid ""
+"Additional interface options. A JSON-serialized object for an inline "
+"keyboard, custom reply keyboard, instructions to remove reply keyboard or"
+" to force a reply from the user."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:39
+#: telebot.async_telebot.AsyncTeleBot.delete_message:19
+#: telebot.async_telebot.AsyncTeleBot.edit_message_live_location:23
+#: telebot.async_telebot.AsyncTeleBot.forward_message:20
+#: telebot.async_telebot.AsyncTeleBot.send_animation:48
+#: telebot.async_telebot.AsyncTeleBot.send_audio:42
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action:19
+#: telebot.async_telebot.AsyncTeleBot.send_contact:31
+#: telebot.async_telebot.AsyncTeleBot.send_dice:23
+#: telebot.async_telebot.AsyncTeleBot.send_document:29
+#: telebot.async_telebot.AsyncTeleBot.send_location:28
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:21
+#: telebot.async_telebot.AsyncTeleBot.send_message:40
+#: telebot.async_telebot.AsyncTeleBot.send_photo:39
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:24
+#: telebot.async_telebot.AsyncTeleBot.send_venue:38
+#: telebot.async_telebot.AsyncTeleBot.send_video:52
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:30
+#: telebot.async_telebot.AsyncTeleBot.send_voice:34
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location:19
+msgid "Timeout in seconds for the request."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:42
+#: telebot.async_telebot.AsyncTeleBot.send_audio:60
+#: telebot.async_telebot.AsyncTeleBot.send_document:53
+#: telebot.async_telebot.AsyncTeleBot.send_location:46
+#: telebot.async_telebot.AsyncTeleBot.send_photo:42
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:36
+#: telebot.async_telebot.AsyncTeleBot.send_voice:46
+msgid "Identifier of a message thread, in which the message will be sent"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:45
+#: telebot.async_telebot.AsyncTeleBot.send_animation:66
+#: telebot.async_telebot.AsyncTeleBot.send_audio:66
+#: telebot.async_telebot.AsyncTeleBot.send_contact:44
+#: telebot.async_telebot.AsyncTeleBot.send_dice:35
+#: telebot.async_telebot.AsyncTeleBot.send_document:59
+#: telebot.async_telebot.AsyncTeleBot.send_game:32
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:101
+#: telebot.async_telebot.AsyncTeleBot.send_location:49
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:30
+#: telebot.async_telebot.AsyncTeleBot.send_message:46
+#: telebot.async_telebot.AsyncTeleBot.send_photo:48
+#: telebot.async_telebot.AsyncTeleBot.send_poll:70
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:42
+#: telebot.async_telebot.AsyncTeleBot.send_venue:57
+#: telebot.async_telebot.AsyncTeleBot.send_video:67
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:51
+#: telebot.async_telebot.AsyncTeleBot.send_voice:49
+msgid "Reply parameters."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:48
+msgid "On success, the MessageId of the sent message is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:49
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:22
+msgid ":class:`telebot.types.MessageID`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:9
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:9
+msgid "Message identifiers in the chat specified in from_chat_id"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:12
+#: telebot.async_telebot.AsyncTeleBot.forward_message:5
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:12
+msgid ""
+"Sends the message silently. Users will receive a notification with no "
+"sound"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:15
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:15
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:27
+msgid "Identifier of a message thread, in which the messages will be sent"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:18
+#: telebot.async_telebot.AsyncTeleBot.forward_message:17
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:18
+msgid "Protects the contents of the forwarded message from forwarding and saving"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:21
+msgid "Pass True to copy the messages without their captions"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:24
+msgid "On success, an array of MessageId of the sent messages is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:25
+msgid ":obj:`list` of :class:`telebot.types.MessageID`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:1
+msgid ""
+"Use this method to create an additional invite link for a chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate administrator rights. The link can be revoked using the "
+"method revokeChatInviteLink. Returns the new invite link as "
+"ChatInviteLink object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createchatinvitelink"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:8
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:6
+#: telebot.async_telebot.AsyncTeleBot.export_chat_invite_link:6
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:7
+msgid ""
+"Id: Unique identifier for the target chat or username of the target "
+"channel (in the format @channelusername)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:12
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:10
+msgid "Invite link name; 0-32 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:15
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:16
+msgid "Point in time (Unix timestamp) when the link will expire"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:18
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:19
+msgid "Maximum number of users that can be members of the chat simultaneously"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:21
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:22
+msgid ""
+"True, if users joining the chat via the link need to be approved by chat "
+"administrators. If True, member_limit can't be specified"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:24
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:25
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:14
+msgid "Returns the new invite link as ChatInviteLink object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:25
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:26
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:15
+msgid ":class:`telebot.types.ChatInviteLink`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:1
+msgid ""
+"Use this method to create a topic in a forum supergroup chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"can_manage_topics administrator rights. Returns information about the "
+"created topic as a ForumTopic object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createforumtopic"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:10
+msgid "Name of the topic, 1-128 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:13
+msgid ""
+"Color of the topic icon in RGB format. Currently, must be one of "
+"0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:16
+msgid ""
+"Custom emoji for the topic icon. Must be an emoji of type “tgs” and must "
+"be exactly 1 character long"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:19
+msgid ""
+"On success, information about the created topic is returned as a "
+"ForumTopic object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:20
+msgid ":class:`telebot.types.ForumTopic`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:1
+msgid ""
+"Use this method to create a link for an invoice. Returns the created "
+"invoice link as String on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createinvoicelink"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:7
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:8
+msgid "Product name, 1-32 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:10
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:11
+msgid "Product description, 1-255 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:13
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:14
+msgid ""
+"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to "
+"the user, use for your internal processes."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:17
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:18
+msgid "Payments provider token, obtained via @Botfather"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:20
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:21
+msgid ""
+"Three-letter ISO 4217 currency code, see "
+"https://core.telegram.org/bots/payments#supported-currencies"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:24
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:25
+msgid ""
+"Price breakdown, a list of components (e.g. product price, tax, discount,"
+" delivery cost, delivery tax, bonus, etc.)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:28
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:87
+msgid "The maximum accepted amount for tips in the smallest units of the currency"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:31
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:90
+msgid ""
+"A JSON-serialized array of suggested amounts of tips in the smallest "
+"units of the currency. At most 4 suggested tip amounts can be specified."
+" The suggested tip amounts must be positive, passed in a strictly "
+"increased order and must not exceed max_tip_amount."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:36
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:77
+msgid ""
+"A JSON-serialized data about the invoice, which will be shared with the "
+"payment provider. A detailed description of required fields should be "
+"provided by the payment provider."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:40
+msgid ""
+"URL of the product photo for the invoice. Can be a photo of the goods or "
+"a photo of the invoice. People like it better when they see a photo of "
+"what they are paying for."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:44
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:37
+msgid "Photo size in bytes"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:47
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:40
+msgid "Photo width"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:50
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:43
+msgid "Photo height"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:53
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:46
+msgid "Pass True, if you require the user's full name to complete the order"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:56
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:49
+msgid "Pass True, if you require the user's phone number to complete the order"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:59
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:52
+msgid "Pass True, if you require the user's email to complete the order"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:62
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:55
+msgid ""
+"Pass True, if you require the user's shipping address to complete the "
+"order"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:65
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:61
+msgid "Pass True, if user's phone number should be sent to provider"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:68
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:64
+msgid "Pass True, if user's email address should be sent to provider"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:71
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:58
+msgid "Pass True, if the final price depends on the shipping method"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:74
+msgid "Created invoice link as String on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:75
+#: telebot.async_telebot.AsyncTeleBot.export_chat_invite_link:11
+#: telebot.async_telebot.AsyncTeleBot.get_file_url:7
+msgid ":obj:`str`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:1
+msgid ""
+"Use this method to create new sticker set owned by a user. The bot will "
+"be able to edit the created sticker set. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createnewstickerset"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:8
+msgid ""
+"Fields *_sticker are deprecated, pass a list of stickers to stickers "
+"parameter instead."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:13
+msgid ""
+"Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., "
+"animals). Can contain only English letters, digits and underscores. Must "
+"begin with a letter, can't contain consecutive underscores and must end "
+"in \"_by_\". is case insensitive. 1-64 "
+"characters."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:18
+msgid "Sticker set title, 1-64 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:35
+msgid ""
+"Pass True, if a set of mask stickers should be created. Deprecated since "
+"Bot API 6.2, use sticker_type instead."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:39
+msgid ""
+"Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. "
+"By default, a regular sticker set is created."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:45
+msgid ""
+"Pass True if stickers in the sticker set must be repainted to the color "
+"of text when used in messages, the accent color if used as emoji status, "
+"white on chat photos, or another appropriate color based on context; for "
+"custom emoji sticker sets only"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:50
+msgid "List of stickers to be added to the set"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:53
+msgid ""
+"Format of stickers in the set, must be one of “static”, “animated”, "
+"“video”"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:1
+msgid ""
+"Use this method to decline a chat join request. The bot must be an "
+"administrator in the chat for this to work and must have the "
+"can_invite_users administrator right. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#declinechatjoinrequest"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_chat_photo:1
+msgid ""
+"Use this method to delete a chat photo. Photos can't be changed for "
+"private chats. The bot must be an administrator in the chat for this to "
+"work and must have the appropriate admin rights. Returns True on success."
+" Note: In regular groups (non-supergroups), this method will only work if"
+" the ‘All Members Are Admins’ setting is off in the target group."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_chat_photo:6
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletechatphoto"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_chat_photo:8
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo:9
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages:7
+msgid ""
+"Int or Str: Unique identifier for the target chat or username of the "
+"target channel (in the format @channelusername)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set:1
+msgid ""
+"Use this method to delete a group sticker set from a supergroup. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate admin rights. Use the field can_set_sticker_set optionally "
+"returned in getChat requests to check if the bot can use this method. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletechatstickerset"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_forum_topic:1
+msgid ""
+"Use this method to delete a topic in a forum supergroup chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"can_manage_topics administrator rights, unless it is the creator of the "
+"topic. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deleteforumtopic"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_forum_topic:10
+msgid "Identifier of the topic to delete"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_message:1
+msgid ""
+"Use this method to delete a message, including service messages, with the"
+" following limitations: - A message can only be deleted if it was sent "
+"less than 48 hours ago. - A dice message in a private chat can only be "
+"deleted if it was sent more than 24 hours ago. - Bots can delete outgoing"
+" messages in private chats, groups, and supergroups. - Bots can delete "
+"incoming messages in private chats. - Bots granted can_post_messages "
+"permissions can delete outgoing messages in channels. - If the bot is an "
+"administrator of a group, it can delete any message there. - If the bot "
+"has can_delete_messages permission in a supergroup or a channel, it can "
+"delete any message there. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_message:11
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletemessage"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_message:16
+msgid "Identifier of the message to delete"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_messages:1
+msgid ""
+"Use this method to delete multiple messages in a chat. The number of "
+"messages to be deleted must not exceed 100. If the chat is a private "
+"chat, the user must be an administrator of the chat for this to work and "
+"must have the appropriate admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_messages:6
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletemessages"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_messages:11
+msgid "Identifiers of the messages to be deleted"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_my_commands:1
+msgid ""
+"Use this method to delete the list of the bot's commands for the given "
+"scope and user language. After deletion, higher level commands will be "
+"shown to affected users. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_my_commands:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletemycommands"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_my_commands:7
+#: telebot.async_telebot.AsyncTeleBot.get_my_commands:6
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands:8
+msgid ""
+"The scope of users for which the commands are relevant. Defaults to "
+"BotCommandScopeDefault."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_my_commands:11
+#: telebot.async_telebot.AsyncTeleBot.get_my_commands:10
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands:12
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, commands will be applied "
+"to all users from the given scope, for whose language there are no "
+"dedicated commands"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_state:1
+msgid "Delete the current state of a user."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set:1
+msgid ""
+"Use this method to delete a sticker from a set created by the bot. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletestickerfromset"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set:5
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:5
+msgid "File identifier of the sticker"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_sticker_set:1
+msgid "Use this method to delete a sticker set. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_webhook:1
+msgid ""
+"Use this method to remove webhook integration if you decide to switch "
+"back to getUpdates. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_webhook:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletewebhook"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_webhook:6
+#: telebot.async_telebot.AsyncTeleBot.set_webhook:36
+msgid "Pass True to drop all pending updates, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_webhook:9
+msgid "Request connection timeout, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.download_file:1
+msgid "Downloads file."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.download_file:3
+msgid "Path where the file should be downloaded."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.download_file:6
+msgid "bytes"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.download_file:7
+msgid ":obj:`bytes`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:1
+msgid ""
+"Use this method to edit a non-primary invite link created by the bot. The"
+" bot must be an administrator in the chat for this to work and must have "
+"the appropriate admin rights."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editchatinvitelink"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:13
+msgid "The invite link to edit"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_forum_topic:1
+msgid ""
+"Use this method to edit name and icon of a topic in a forum supergroup "
+"chat. The bot must be an administrator in the chat for this to work and "
+"must have can_manage_topics administrator rights, unless it is the "
+"creator of the topic. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_forum_topic:5
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#editforumtopic"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_forum_topic:10
+msgid "Identifier of the topic to edit"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_forum_topic:13
+msgid ""
+"Optional, New name of the topic, 1-128 characters. If not specififed or "
+"empty, the current name of the topic will be kept"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_forum_topic:17
+msgid ""
+"Optional, New unique identifier of the custom emoji shown as the topic "
+"icon. Use getForumTopicIconStickers to get all allowed custom emoji "
+"identifiers. Pass an empty string to remove the icon. If not specified, "
+"the current icon will be kept"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_general_forum_topic:1
+msgid ""
+"Use this method to edit the name of the 'General' topic in a forum "
+"supergroup chat. The bot must be an administrator in the chat for this to"
+" work and must have can_manage_topics administrator rights. Returns True "
+"on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editgeneralforumtopic"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_general_forum_topic:10
+msgid "New topic name, 1-128 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:1
+msgid "Use this method to edit captions of messages."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagecaption"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:5
+msgid "New caption of the message"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:8
+msgid ""
+"Required if inline_message_id is not specified. Unique identifier for the"
+" target chat or username of the target channel"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:11
+msgid "Required if inline_message_id is not specified."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:14
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the inline "
+"message."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:17
+msgid "New caption of the message, 0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:20
+msgid ""
+"A JSON-serialized array of objects that describe how the caption should "
+"be parsed."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:23
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media:19
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:14
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:26
+msgid "A JSON-serialized object for an inline keyboard."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:26
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media:22
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:17
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:32
+msgid ""
+"On success, if edited message is sent by the bot, the edited Message is "
+"returned, otherwise True is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:27
+msgid ":obj:`types.Message` | :obj:`bool`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:3
+msgid ""
+"Use this method to edit live location messages. A location can be edited "
+"until its live_period expires or editing is explicitly"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:2
+msgid ""
+"disabled by a call to stopMessageLiveLocation. On success, if the edited "
+"message is not an inline message, the edited Message is returned, "
+"otherwise True is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagelivelocation"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:7
+msgid "Latitude of new location"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:10
+msgid "Longitude of new location"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:16
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the message"
+" to edit"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:19
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location:15
+msgid "A JSON-serialized object for a new inline keyboard."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:26
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media:16
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:11
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:14
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores:19
+#: telebot.async_telebot.AsyncTeleBot.set_game_score:20
+msgid ""
+"Required if chat_id and message_id are not specified. Identifier of the "
+"inline message"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:29
+#: telebot.async_telebot.AsyncTeleBot.send_location:31
+msgid "The radius of uncertainty for the location, measured in meters; 0-1500"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:32
+msgid ""
+"Direction in which the user is moving, in degrees. Must be between 1 and "
+"360 if specified."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:35
+msgid ""
+"The maximum distance for proximity alerts about approaching another chat "
+"member, in meters. Must be between 1 and 100000 if specified."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:38
+msgid ""
+"On success, if the edited message is not an inline message, the edited "
+"Message is returned, otherwise True is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:39
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location:23
+msgid ":class:`telebot.types.Message` or bool"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:1
+msgid ""
+"Use this method to edit animation, audio, document, photo, or video "
+"messages. If a message is a part of a message album, then it can be "
+"edited only to a photo or a video. Otherwise, message type can be changed"
+" arbitrarily. When inline message is edited, new file can't be uploaded. "
+"Use previously uploaded file via its file_id or specify a URL."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagemedia"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:8
+msgid "A JSON-serialized object for a new media content of the message"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:10
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:5
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:8
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores:13
+#: telebot.async_telebot.AsyncTeleBot.set_game_score:14
+msgid ""
+"Required if inline_message_id is not specified. Unique identifier for the"
+" target chat or username of the target channel (in the format "
+"@channelusername)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:13
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:8
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:11
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores:16
+#: telebot.async_telebot.AsyncTeleBot.set_game_score:17
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the sent "
+"message"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:23
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:18
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:33
+#: telebot.async_telebot.AsyncTeleBot.set_game_score:27
+msgid ":obj:`types.Message` or :obj:`bool`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:1
+msgid "Use this method to edit only the reply markup of messages."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagereplymarkup"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:1
+msgid "Use this method to edit text and game messages."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#editmessagetext"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:5
+msgid "New text of the message, 1-4096 characters after entities parsing"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:17
+#: telebot.async_telebot.AsyncTeleBot.send_message:15
+msgid "Mode for parsing entities in the message text."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:20
+msgid ""
+"List of special entities that appear in the message text, which can be "
+"specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:23
+#: telebot.async_telebot.AsyncTeleBot.send_message:21
+msgid "Disables link previews for links in this message"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:29
+msgid ""
+"A JSON-serialized object for options used to automatically generate "
+"Telegram link previews for messages."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:1
+msgid ""
+"Handles new version of a channel post that is known to the bot and was "
+"edited. As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edited_message_handler:1
+msgid "Handles new version of a message that is known to the bot and was edited."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edited_message_handler:3
+msgid ""
+"As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edited_message_handler:17
+#: telebot.async_telebot.AsyncTeleBot.message_handler:47
+msgid "list of chat types"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.enable_saving_states:1
+msgid "Enable saving states (by default saving disabled)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.enable_saving_states:4
+msgid ""
+"It is recommended to pass a "
+":class:`~telebot.asyncio_storage.StatePickleStorage` instance as "
+"state_storage to TeleBot class."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.enable_saving_states:7
+msgid "Filename of saving file, defaults to \"./.state-save/states.pkl\""
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.export_chat_invite_link:1
+msgid ""
+"Use this method to export an invite link to a supergroup or a channel. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.export_chat_invite_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#exportchatinvitelink"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.export_chat_invite_link:10
+msgid "exported invite link as String on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.forward_message:1
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:1
+msgid "Use this method to forward messages of any kind."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.forward_message:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#forwardmessage"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.forward_message:23
+#: telebot.async_telebot.AsyncTeleBot.send_message:43
+msgid ""
+"Unique identifier for the target message thread (topic) of the forum; for"
+" forum supergroups only"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.forward_message:26
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:21
+#: telebot.async_telebot.AsyncTeleBot.reply_to:11
+#: telebot.async_telebot.AsyncTeleBot.send_animation:69
+#: telebot.async_telebot.AsyncTeleBot.send_audio:69
+#: telebot.async_telebot.AsyncTeleBot.send_contact:47
+#: telebot.async_telebot.AsyncTeleBot.send_dice:38
+#: telebot.async_telebot.AsyncTeleBot.send_document:62
+#: telebot.async_telebot.AsyncTeleBot.send_game:35
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:104
+#: telebot.async_telebot.AsyncTeleBot.send_location:52
+#: telebot.async_telebot.AsyncTeleBot.send_message:52
+#: telebot.async_telebot.AsyncTeleBot.send_photo:51
+#: telebot.async_telebot.AsyncTeleBot.send_poll:73
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:45
+#: telebot.async_telebot.AsyncTeleBot.send_venue:60
+#: telebot.async_telebot.AsyncTeleBot.send_video:70
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:54
+#: telebot.async_telebot.AsyncTeleBot.send_voice:52
+msgid "On success, the sent Message is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.forward_message:27
+#: telebot.async_telebot.AsyncTeleBot.reply_to:12
+#: telebot.async_telebot.AsyncTeleBot.send_animation:70
+#: telebot.async_telebot.AsyncTeleBot.send_audio:70
+#: telebot.async_telebot.AsyncTeleBot.send_contact:48
+#: telebot.async_telebot.AsyncTeleBot.send_dice:39
+#: telebot.async_telebot.AsyncTeleBot.send_document:63
+#: telebot.async_telebot.AsyncTeleBot.send_location:53
+#: telebot.async_telebot.AsyncTeleBot.send_message:53
+#: telebot.async_telebot.AsyncTeleBot.send_photo:52
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:46
+#: telebot.async_telebot.AsyncTeleBot.send_venue:61
+#: telebot.async_telebot.AsyncTeleBot.send_video:71
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:55
+msgid ":class:`telebot.types.Message`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat:1
+msgid ""
+"Use this method to get up to date information about the chat (current "
+"name of the user for one-on-one conversations, current username of a "
+"user, group or channel, etc.). Returns a Chat object on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getchat"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat:6
+#: telebot.async_telebot.AsyncTeleBot.get_chat_administrators:7
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member_count:5
+#: telebot.async_telebot.AsyncTeleBot.leave_chat:5
+#: telebot.async_telebot.AsyncTeleBot.set_message_reaction:5
+msgid ""
+"Unique identifier for the target chat or username of the target "
+"supergroup or channel (in the format @channelusername)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat:9
+msgid "Chat information"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat:10
+msgid ":class:`telebot.types.Chat`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_administrators:1
+msgid ""
+"Use this method to get a list of administrators in a chat. On success, "
+"returns an Array of ChatMember objects that contains information about "
+"all chat administrators except other bots."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_administrators:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getchatadministrators"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_administrators:9
+msgid "List made of ChatMember objects."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_administrators:10
+msgid ":obj:`list` of :class:`telebot.types.ChatMember`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member:1
+msgid ""
+"Use this method to get information about a member of a chat. Returns a "
+"ChatMember object on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getchatmember"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member:11
+msgid "Returns ChatMember object on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member:12
+msgid ":class:`telebot.types.ChatMember`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member_count:1
+msgid "Use this method to get the number of members in a chat."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member_count:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getchatmembercount"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member_count:8
+msgid "Number of members in the chat."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member_count:9
+msgid ":obj:`int`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_menu_button:1
+msgid ""
+"Use this method to get the current value of the bot's menu button in a "
+"private chat, or the default menu button. Returns MenuButton on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_menu_button:5
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#getchatmenubutton"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_menu_button:7
+msgid ""
+"Unique identifier for the target private chat. If not specified, default "
+"bot's menu button will be returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_menu_button:11
+msgid "types.MenuButton"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_menu_button:12
+msgid ":class:`telebot.types.MenuButton`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers:1
+msgid ""
+"Use this method to get information about custom emoji stickers by their "
+"identifiers. Returns an Array of Sticker objects."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers:4
+msgid ""
+"List of custom emoji identifiers. At most 200 custom emoji identifiers "
+"can be specified."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers:7
+msgid "Returns an Array of Sticker objects."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers:8
+msgid ":obj:`list` of :class:`telebot.types.Sticker`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file:1
+msgid ""
+"Use this method to get basic info about a file and prepare it for "
+"downloading. For the moment, bots can download files of up to 20MB in "
+"size. On success, a File object is returned. It is guaranteed that the "
+"link will be valid for at least 1 hour. When the link expires, a new one "
+"can be requested by calling get_file again."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getfile"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file:9
+msgid "File identifier"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file:12
+#: telebot.async_telebot.AsyncTeleBot.upload_sticker_file:21
+msgid ":class:`telebot.types.File`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file_url:1
+msgid "Get a valid URL for downloading a file."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file_url:3
+msgid "File identifier to get download URL for."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file_url:6
+msgid "URL for downloading the file."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers:1
+msgid ""
+"Use this method to get custom emoji stickers, which can be used as a "
+"forum topic icon by any user. Requires no parameters. Returns an Array of"
+" Sticker objects."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getforumtopiciconstickers"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers:6
+msgid "On success, a list of StickerSet objects is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers:7
+msgid "List[:class:`telebot.types.StickerSet`]"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_game_high_scores:1
+msgid ""
+"Use this method to get data for high score tables. Will return the score "
+"of the specified user and several of their neighbors in a game. On "
+"success, returns an Array of GameHighScore objects."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_game_high_scores:4
+msgid ""
+"This method will currently return scores for the target user, plus two of"
+" their closest neighbors on each side. Will also return the top three "
+"users if the user and their neighbors are not among them. Please note "
+"that this behavior is subject to change."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_game_high_scores:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getgamehighscores"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_game_high_scores:10
+#: telebot.async_telebot.AsyncTeleBot.retrieve_data:3
+#: telebot.async_telebot.AsyncTeleBot.set_game_score:5
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:9
+msgid "User identifier"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_game_high_scores:22
+msgid "On success, returns an Array of GameHighScore objects."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_me:1
+msgid "Returns basic information about the bot in form of a User object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_me:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getme"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_commands:1
+msgid ""
+"Use this method to get the current list of the bot's commands. Returns "
+"List of BotCommand on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_commands:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getmycommands"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_commands:15
+msgid "List of BotCommand on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_commands:16
+msgid ":obj:`list` of :class:`telebot.types.BotCommand`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights:1
+msgid ""
+"Use this method to get the current default administrator rights of the "
+"bot. Returns ChatAdministratorRights on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getmydefaultadministratorrights"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights:6
+msgid ""
+"Pass True to get the default administrator rights of the bot in channels."
+" Otherwise, the default administrator rights of the bot for groups and "
+"supergroups will be returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights:9
+msgid "Returns ChatAdministratorRights on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights:10
+msgid ":class:`telebot.types.ChatAdministratorRights`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_description:1
+msgid ""
+"Use this method to get the current bot description for the given user "
+"language. Returns BotDescription on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_description:4
+#: telebot.async_telebot.AsyncTeleBot.get_my_short_description:4
+msgid "A two-letter ISO 639-1 language code or an empty string"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_description:7
+msgid ":class:`telebot.types.BotDescription`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_name:1
+msgid ""
+"Use this method to get the current bot name for the given user language. "
+"Returns BotName on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_name:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getmyname"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_name:6
+msgid "Optional. A two-letter ISO 639-1 language code or an empty string"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_name:9
+msgid ":class:`telebot.types.BotName`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_short_description:1
+msgid ""
+"Use this method to get the current bot short description for the given "
+"user language. Returns BotShortDescription on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_short_description:7
+msgid ":class:`telebot.types.BotShortDescription`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_state:1
+msgid ""
+"Gets current state of a user. Not recommended to use this method. But it "
+"is ok for debugging."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_state:10
+msgid "state of a user"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_state:11
+msgid ":obj:`int` or :obj:`str` or :class:`telebot.types.State`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_sticker_set:1
+msgid ""
+"Use this method to get a sticker set. On success, a StickerSet object is "
+"returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_sticker_set:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getstickerset"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_sticker_set:8
+msgid "On success, a StickerSet object is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_sticker_set:9
+#: telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:14
+msgid ":class:`telebot.types.StickerSet`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:1
+msgid ""
+"Use this method to receive incoming updates using long polling (wiki). An"
+" Array of Update objects is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getupdates"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:6
+msgid ""
+"Identifier of the first update to be returned. Must be greater by one "
+"than the highest among the identifiers of previously received updates. By"
+" default, updates starting with the earliest unconfirmed update are "
+"returned. An update is considered confirmed as soon as getUpdates is "
+"called with an offset higher than its update_id. The negative offset can "
+"be specified to retrieve updates starting from -offset update from the "
+"end of the updates queue. All previous updates will forgotten."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:12
+msgid ""
+"Limits the number of updates to be retrieved. Values between 1-100 are "
+"accepted. Defaults to 100."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:15
+#: telebot.async_telebot.AsyncTeleBot.get_webhook_info:6
+#: telebot.async_telebot.AsyncTeleBot.polling:26
+msgid "Request connection timeout"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:18
+msgid "Array of string. List the types of updates you want your bot to receive."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:21
+msgid "Timeout in seconds for request."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:24
+msgid "An Array of Update objects is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:25
+msgid ":obj:`list` of :class:`telebot.types.Update`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:1
+msgid ""
+"Use this method to get the list of boosts added to a chat by a user. "
+"Requires administrator rights in the chat. Returns a UserChatBoosts "
+"object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getuserchatboosts"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:5
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action:10
+#: telebot.async_telebot.AsyncTeleBot.send_contact:5
+#: telebot.async_telebot.AsyncTeleBot.send_poll:6
+#: telebot.async_telebot.AsyncTeleBot.send_venue:5
+#: telebot.async_telebot.AsyncTeleBot.stop_poll:5
+msgid "Unique identifier for the target chat or username of the target channel"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:11
+msgid "On success, a UserChatBoosts object is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:12
+msgid ":class:`telebot.types.UserChatBoosts`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:1
+msgid ""
+"Use this method to get a list of profile pictures for a user. Returns a "
+":class:`telebot.types.UserProfilePhotos` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getuserprofilephotos"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:9
+msgid ""
+"Sequential number of the first photo to be returned. By default, all "
+"photos are returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:12
+msgid ""
+"Limits the number of photos to be retrieved. Values between 1-100 are "
+"accepted. Defaults to 100."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:15
+msgid ""
+"`UserProfilePhotos "
+"`_"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:16
+msgid ":class:`telebot.types.UserProfilePhotos`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_webhook_info:1
+msgid ""
+"Use this method to get current webhook status. Requires no parameters. On"
+" success, returns a WebhookInfo object. If the bot is using getUpdates, "
+"will return an object with the url field empty."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_webhook_info:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getwebhookinfo"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_webhook_info:9
+msgid "On success, returns a WebhookInfo object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_webhook_info:10
+msgid ":class:`telebot.types.WebhookInfo`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.hide_general_forum_topic:1
+msgid ""
+"Use this method to hide the 'General' topic in a forum supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.hide_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#hidegeneralforumtopic"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:1
+msgid ""
+"Wrap polling with infinite loop and exception handling to avoid bot stops"
+" polling."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:4
+#: telebot.async_telebot.AsyncTeleBot.polling:15
+msgid "Install watchdog and psutil before using restart_on_change option."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:6
+#: telebot.async_telebot.AsyncTeleBot.polling:29
+msgid "Timeout in seconds for get_updates(Defaults to None)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:9
+#: telebot.async_telebot.AsyncTeleBot.polling:20
+msgid "skip old updates"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:12
+msgid "Aiohttp's request timeout. Defaults to 5 minutes(aiohttp.ClientTimeout)."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:15
+msgid ""
+"Custom logging level for infinity_polling logging. Use logger levels from"
+" logging as a value. None/NOTSET = no error logging"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:19
+#: telebot.async_telebot.AsyncTeleBot.polling:32
+msgid ""
+"A list of the update types you want your bot to receive. For example, "
+"specify [“message”, “edited_channel_post”, “callback_query”] to only "
+"receive updates of these types. See util.update_types for a complete list"
+" of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used. Please note that this parameter doesn't affect "
+"updates created before the call to the get_updates, so unwanted updates "
+"may be received for a short period of time."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:19
+#: telebot.async_telebot.AsyncTeleBot.polling:32
+msgid ""
+"A list of the update types you want your bot to receive. For example, "
+"specify [“message”, “edited_channel_post”, “callback_query”] to only "
+"receive updates of these types. See util.update_types for a complete list"
+" of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:25
+#: telebot.async_telebot.AsyncTeleBot.polling:38
+msgid ""
+"Please note that this parameter doesn't affect updates created before the"
+" call to the get_updates, so unwanted updates may be received for a short"
+" period of time."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:29
+msgid "Restart a file on file(s) change. Defaults to False"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:32
+#: telebot.async_telebot.AsyncTeleBot.polling:48
+msgid "Path to watch for changes. Defaults to current directory"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.inline_handler:1
+msgid ""
+"Handles new incoming inline query. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.InlineQuery` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.kick_chat_member:1
+msgid "This function is deprecated. Use `ban_chat_member` instead"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.leave_chat:1
+msgid ""
+"Use this method for your bot to leave a group, supergroup or channel. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.leave_chat:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#leavechat"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.log_out:1
+msgid ""
+"Use this method to log out from the cloud Bot API server before launching"
+" the bot locally. You MUST log out the bot before running it locally, "
+"otherwise there is no guarantee that the bot will receive updates. After "
+"a successful call, you can immediately log in on a local server, but will"
+" not be able to log in back to the cloud Bot API server for 10 minutes. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.log_out:8
+msgid "Telegram documentation: https://core.telegram.org/bots/api#logout"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.message_handler:1
+msgid ""
+"Handles ew incoming message of any kind - text, photo, sticker, etc. As a"
+" parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object. All message handlers are tested in"
+" the order they were added."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.message_handler:5
+msgid "Example:"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.message_handler:7
+msgid "Usage of message_handler"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.message_handler:40
+msgid ""
+"Optional lambda function. The lambda receives the message to test as the "
+"first parameter. It must return True if the command should handle the "
+"message."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.message_handler:52
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:23
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:13
+msgid "decorated function"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.message_reaction_count_handler:1
+msgid ""
+"Handles new incoming message reaction count. As a parameter to the "
+"decorator function, it passes "
+":class:`telebot.types.MessageReactionCountUpdated` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.message_reaction_handler:1
+msgid ""
+"Handles new incoming message reaction. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.MessageReactionUpdated` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.my_chat_member_handler:1
+msgid ""
+"Handles update in a status of a bot. For private chats, this update is "
+"received only when the bot is blocked or unblocked by the user. As a "
+"parameter to the decorator function, it passes "
+":class:`telebot.types.ChatMemberUpdated` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.pin_chat_message:1
+msgid ""
+"Use this method to pin a message in a supergroup. The bot must be an "
+"administrator in the chat for this to work and must have the appropriate "
+"admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.pin_chat_message:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#pinchatmessage"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.pin_chat_message:11
+msgid "Identifier of a message to pin"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.pin_chat_message:14
+msgid ""
+"Pass True, if it is not necessary to send a notification to all group "
+"members about the new pinned message"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.poll_answer_handler:1
+msgid ""
+"Handles change of user's answer in a non-anonymous poll(when user changes"
+" the vote). Bots receive new votes only in polls that were sent by the "
+"bot itself. As a parameter to the decorator function, it passes "
+":class:`telebot.types.PollAnswer` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.poll_handler:1
+msgid ""
+"Handles new state of a poll. Bots receive only updates about stopped "
+"polls and polls, which are sent by the bot As a parameter to the "
+"decorator function, it passes :class:`telebot.types.Poll` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:1
+msgid ""
+"Runs bot in long-polling mode in a main loop. This allows the bot to "
+"retrieve Updates automagically and notify listeners and message handlers "
+"accordingly."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:4
+msgid "Warning: Do not call this function more than once!"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:6
+msgid "Always gets updates."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:10
+msgid ""
+"Set non_stop=True if you want your bot to continue receiving updates if "
+"there is an error."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:17
+msgid "Do not stop polling when an ApiException occurs."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:23
+msgid "Delay between two update retrivals"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:42
+msgid "Deprecated, use non_stop. Old typo, kept for backward compatibility."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:45
+msgid "Restart a file on file(s) change. Defaults to False."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler:1
+msgid ""
+"New incoming pre-checkout query. Contains full information about "
+"checkout. As a parameter to the decorator function, it passes "
+":class:`telebot.types.PreCheckoutQuery` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.process_new_updates:1
+msgid ""
+"Process new updates. Just pass list of updates - each update should be "
+"instance of Update object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.process_new_updates:5
+msgid "list of updates"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:1
+msgid ""
+"Use this method to promote or demote a user in a supergroup or a channel."
+" The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights. Pass False for all boolean parameters "
+"to demote a user."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#promotechatmember"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:7
+msgid ""
+"Unique identifier for the target chat or username of the target channel ("
+" in the format @channelusername)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:14
+msgid ""
+"Pass True, if the administrator can change chat title, photo and other "
+"settings"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:17
+msgid "Pass True, if the administrator can create channel posts, channels only"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:20
+msgid ""
+"Pass True, if the administrator can edit messages of other users, "
+"channels only"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:23
+msgid "Pass True, if the administrator can delete messages of other users"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:26
+msgid "Pass True, if the administrator can invite new users to the chat"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:29
+msgid "Pass True, if the administrator can restrict, ban or unban chat members"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:32
+msgid "Pass True, if the administrator can pin messages, supergroups only"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:35
+msgid ""
+"Pass True, if the administrator can add new administrators with a subset "
+"of his own privileges or demote administrators that he has promoted, "
+"directly or indirectly (promoted by administrators that were appointed by"
+" him)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:40
+msgid "Pass True, if the administrator's presence in the chat is hidden"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:43
+msgid ""
+"Pass True, if the administrator can access the chat event log, chat "
+"statistics, message statistics in channels, see channel members, see "
+"anonymous administrators in supergroups and ignore slow mode. Implied by "
+"any other administrator privilege"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:49
+msgid ""
+"Pass True, if the administrator can manage voice chats For now, bots can "
+"use this privilege only for passing to other administrators."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:53
+msgid "Deprecated, use can_manage_video_chats."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:56
+msgid ""
+"Pass True if the user is allowed to create, rename, close, and reopen "
+"forum topics, supergroups only"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:60
+msgid "Pass True if the administrator can create the channel's stories"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:63
+msgid "Pass True if the administrator can edit the channel's stories"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:66
+msgid "Pass True if the administrator can delete the channel's stories"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:1
+msgid "Registers callback query handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:3
+msgid "function to be called"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:18
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:18
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:21
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:21
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:8
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:9
+msgid ""
+"True if you need to pass TeleBot instance to handler(useful for "
+"separating handlers into different files)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:1
+msgid "Registers channel post message handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:9
+msgid "list of commands"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:12
+msgid "Regular expression"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:1
+msgid "Registers chat boost handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:1
+msgid "Registers chat join request handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:1
+msgid "Registers chat member handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:14
+msgid ":return:None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:1
+msgid "Registers chosen inline handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:1
+msgid "Registers edited channel post message handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:1
+msgid "Registers edited message handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:18
+msgid "True for private chat"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_inline_handler:1
+msgid "Registers inline handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_message_handler:1
+msgid "Registers message handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_message_handler:18
+msgid "List of chat types"
+msgstr ""
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:1
+msgid "Registers message reaction count handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:1
+msgid "Registers message reaction handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:1
+msgid "Registers my chat member handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:1
+msgid "Registers poll answer handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_poll_handler:1
+msgid "Registers poll handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:1
+msgid "Registers pre-checkout request handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:1
+msgid "Registers removed chat boost handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:1
+msgid "Registers shipping query handler."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.remove_webhook:1
+msgid "Alternative for delete_webhook but uses set_webhook"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler:1
+msgid ""
+"Handles new incoming chat boost state. it passes "
+":class:`telebot.types.ChatBoostRemoved` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:1
+msgid ""
+"Use this method to reopen a closed topic in a forum supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the can_manage_topics administrator rights, unless it is the creator of "
+"the topic. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reopenforumtopic"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:10
+msgid "Identifier of the topic to reopen"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.reopen_general_forum_topic:1
+msgid ""
+"Use this method to reopen the 'General' topic in a forum supergroup chat."
+" The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.reopen_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reopengeneralforumtopic"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.reply_to:1
+msgid ""
+"Convenience function for `send_message(message.chat.id, text, "
+"reply_to_message_id=message.message_id, **kwargs)`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.reply_to:3
+msgid "Instance of :class:`telebot.types.Message`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.reply_to:6
+msgid "Text of the message."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.reply_to:9
+msgid ""
+"Additional keyword arguments which are passed to "
+":meth:`telebot.TeleBot.send_message`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.reset_data:1
+msgid "Reset data for a user in chat."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:1
+msgid ""
+"Use this method to restrict a user in a supergroup. The bot must be an "
+"administrator in the supergroup for this to work and must have the "
+"appropriate admin rights. Pass True for all boolean parameters to lift "
+"restrictions from a user."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#restrictchatmember"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:8
+msgid ""
+"Individual parameters are deprecated and will be removed, use "
+"'permissions' instead"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:17
+msgid ""
+"Date when restrictions will be lifted for the user, unix time. If user is"
+" restricted for more than 366 days or less than 30 seconds from the "
+"current time, they are considered to be restricted forever"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:22
+msgid ""
+"Pass True, if the user can send text messages, contacts, locations and "
+"venues"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:25
+msgid ""
+"Pass True, if the user can send audios, documents, photos, videos, video "
+"notes and voice notes, implies can_send_messages"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:29
+msgid "Pass True, if the user is allowed to send polls, implies can_send_messages"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:32
+msgid ""
+"Pass True, if the user can send animations, games, stickers and use "
+"inline bots, implies can_send_media_messages"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:35
+msgid ""
+"Pass True, if the user may add web page previews to their messages, "
+"implies can_send_media_messages"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:39
+msgid ""
+"Pass True, if the user is allowed to change the chat title, photo and "
+"other settings. Ignored in public supergroups"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:43
+msgid ""
+"Pass True, if the user is allowed to invite new users to the chat, "
+"implies can_invite_users"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:47
+msgid ""
+"Pass True, if the user is allowed to pin messages. Ignored in public "
+"supergroups"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:50
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions:14
+msgid ""
+"Pass True if chat permissions are set independently. Otherwise, the "
+"can_send_other_messages and can_add_web_page_previews permissions will "
+"imply the can_send_messages, can_send_audios, can_send_documents, "
+"can_send_photos, can_send_videos, can_send_video_notes, and "
+"can_send_voice_notes permissions; the can_send_polls permission will "
+"imply the can_send_messages permission."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:56
+msgid ""
+"Pass ChatPermissions object to set all permissions at once. Use this "
+"parameter instead of passing all boolean parameters to avoid backward "
+"compatibility problems in future."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:60
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions:20
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member:19
+msgid "True on success"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.retrieve_data:1
+msgid "Returns context manager with data for a user in chat."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.retrieve_data:6
+msgid "Chat's unique identifier, defaults to user_id"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.retrieve_data:9
+msgid "Context manager with data for a user in chat"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:1
+msgid ""
+"Use this method to revoke an invite link created by the bot. Note: If the"
+" primary link is revoked, a new link is automatically generated The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate admin rights."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#revokechatinvitelink"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:11
+msgid "The invite link to revoke"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:1
+msgid "This class sets webhooks and listens to a given url and port."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:3
+msgid "IP address to listen to. Defaults to 0.0.0.0"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:4
+msgid "A port which will be used to listen to webhooks."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:5
+msgid "Path to the webhook. Defaults to /token"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:6
+msgid "Path to the certificate file."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:7
+msgid "Path to the certificate key file."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:8
+msgid "Webhook URL."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:9
+msgid ""
+"Maximum allowed number of simultaneous HTTPS connections to the webhook "
+"for update delivery, 1-100. Defaults to 40. Use lower values to limit the"
+" load on your bot's server, and higher values to increase your bot's "
+"throughput."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:10
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all updates "
+"regardless of type (default). If not specified, the previous setting will"
+" be used."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:11
+msgid ""
+"The fixed IP address which will be used to send webhook requests instead "
+"of the IP address resolved through DNS"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:12
+msgid "Pass True to drop all pending updates"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:13
+msgid "Integer. Request connection timeout"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:14
+msgid "Secret token to be used to verify the webhook request."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:15
+msgid "Length of a secret token, defaults to 20"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:16
+msgid "Debug mode, defaults to False"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:1
+msgid ""
+"Use this method to send animation files (GIF or H.264/MPEG-4 AVC video "
+"without sound). On success, the sent Message is returned. Bots can "
+"currently send animation files of up to 50 MB in size, this limit may be "
+"changed in the future."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendanimation"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:9
+msgid ""
+"Animation to send. Pass a file_id as String to send an animation that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get an animation from the Internet, or upload a "
+"new animation using multipart/form-data."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:13
+msgid "Duration of sent animation in seconds"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:16
+msgid "Animation width"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:19
+msgid "Animation height"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:22
+#: telebot.async_telebot.AsyncTeleBot.send_video:20
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:33
+msgid ""
+"Thumbnail of the file sent; can be ignored if thumbnail generation for "
+"the file is supported server-side. The thumbnail should be in JPEG format"
+" and less than 200 kB in size. A thumbnail's width and height should not "
+"exceed 320. Ignored if the file is not uploaded using multipart/form-"
+"data. Thumbnails can't be reused and can be only uploaded as a new file, "
+"so you can pass “attach://” if the thumbnail was "
+"uploaded using multipart/form-data under ."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:28
+msgid ""
+"Animation caption (may also be used when resending animation by file_id),"
+" 0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:31
+msgid "Mode for parsing entities in the animation caption"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:51
+#: telebot.async_telebot.AsyncTeleBot.send_video:29
+msgid ""
+"List of special entities that appear in the caption, which can be "
+"specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:57
+#: telebot.async_telebot.AsyncTeleBot.send_video:58
+msgid "Identifier of a message thread, in which the video will be sent"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:60
+msgid "Pass True, if the animation should be sent as a spoiler"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:63
+#: telebot.async_telebot.AsyncTeleBot.send_audio:63
+#: telebot.async_telebot.AsyncTeleBot.send_document:56
+#: telebot.async_telebot.AsyncTeleBot.send_video:64
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:48
+msgid "Deprecated. Use thumbnail instead"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:1
+msgid ""
+"Use this method to send audio files, if you want Telegram clients to "
+"display them in the music player. Your audio must be in the .MP3 or .M4A "
+"format. On success, the sent Message is returned. Bots can currently send"
+" audio files of up to 50 MB in size, this limit may be changed in the "
+"future."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:5
+msgid "For sending voice messages, use the send_voice method instead."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendaudio"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:12
+msgid ""
+"Audio file to send. Pass a file_id as String to send an audio file that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get an audio file from the Internet, or upload a "
+"new one using multipart/form-data. Audio must be in the .MP3 or .M4A "
+"format."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:17
+msgid "Audio caption, 0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:20
+msgid "Duration of the audio in seconds"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:23
+msgid "Performer"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:26
+msgid "Track name"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:36
+msgid ""
+"Mode for parsing entities in the audio caption. See formatting options "
+"for more details."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:45
+msgid ""
+"Thumbnail of the file sent; can be ignored if thumbnail generation for "
+"the file is supported server-side. The thumbnail should be in JPEG format"
+" and less than 200 kB in size. A thumbnail's width and height should not "
+"exceed 320. Ignored if the file is not uploaded using multipart/form-"
+"data. Thumbnails can't be reused and can be only uploaded as a new file, "
+"so you can pass “attach://” if the thumbnail was "
+"uploaded using multipart/form-data under "
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:51
+#: telebot.async_telebot.AsyncTeleBot.send_document:35
+#: telebot.async_telebot.AsyncTeleBot.send_photo:19
+#: telebot.async_telebot.AsyncTeleBot.send_voice:37
+msgid ""
+"A JSON-serialized list of special entities that appear in the caption, "
+"which can be specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_chat_action:1
+msgid ""
+"Use this method when you need to tell the user that something is "
+"happening on the bot's side. The status is set for 5 seconds or less "
+"(when a message arrives from your bot, Telegram clients clear its typing "
+"status). Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_chat_action:5
+msgid ""
+"Example: The ImageBot needs some time to process a request and upload the"
+" image. Instead of sending a text message along the lines of “Retrieving "
+"image, please wait…”, the bot may use sendChatAction with action = "
+"upload_photo. The user will see a “sending photo” status for the bot."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_chat_action:8
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendchataction"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_chat_action:13
+msgid ""
+"Type of action to broadcast. Choose one, depending on what the user is "
+"about to receive: typing for text messages, upload_photo for photos, "
+"record_video or upload_video for videos, record_voice or upload_voice for"
+" voice notes, upload_document for general files, choose_sticker for "
+"stickers, find_location for location data, record_video_note or "
+"upload_video_note for video notes."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_chat_action:22
+msgid "The thread to which the message will be sent(supergroups only)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:1
+msgid ""
+"Use this method to send phone contacts. On success, the sent Message is "
+"returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendcontact"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:8
+msgid "Contact's phone number"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:11
+msgid "Contact's first name"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:14
+msgid "Contact's last name"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:17
+msgid "Additional data about the contact in the form of a vCard, 0-2048 bytes"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:34
+#: telebot.async_telebot.AsyncTeleBot.send_game:23
+#: telebot.async_telebot.AsyncTeleBot.send_venue:41
+msgid ""
+"Pass True, if the message should be sent even if one of the specified "
+"replied-to messages is not found."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:41
+#: telebot.async_telebot.AsyncTeleBot.send_venue:54
+msgid "The thread to which the message will be sent"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_dice:1
+msgid ""
+"Use this method to send an animated emoji that will display a random "
+"value. On success, the sent Message is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_dice:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#senddice"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_dice:8
+msgid ""
+"Emoji on which the dice throw animation is based. Currently, must be one "
+"of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯”"
+" and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults "
+"to “🎲”"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_dice:29
+msgid "Protects the contents of the sent message from forwarding"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_dice:32
+msgid ""
+"The identifier of a message thread, unique within the chat to which the "
+"message with the thread identifier belongs"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:1
+msgid "Use this method to send general files."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#senddocument"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:8
+msgid ""
+"(document) File to send. Pass a file_id as String to send a file that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get a file from the Internet, or upload a new one "
+"using multipart/form-data"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:15
+msgid ""
+"Document caption (may also be used when resending documents by file_id), "
+"0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:23
+msgid "Mode for parsing entities in the document caption"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:32
+msgid ""
+"InputFile or String : Thumbnail of the file sent; can be ignored if "
+"thumbnail generation for the file is supported server-side. The thumbnail"
+" should be in JPEG format and less than 200 kB in size. A thumbnail's "
+"width and height should not exceed 320. Ignored if the file is not "
+"uploaded using multipart/form-data. Thumbnails can't be reused and can be"
+" only uploaded as a new file, so you can pass "
+"“attach://” if the thumbnail was uploaded using "
+"multipart/form-data under "
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:41
+msgid ""
+"allows to define file name that will be visible in the Telegram instead "
+"of original file name"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:44
+msgid ""
+"Disables automatic server-side content type detection for files uploaded "
+"using multipart/form-data"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:47
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:33
+#: telebot.async_telebot.AsyncTeleBot.send_video:55
+msgid "function typo miss compatibility: do not use it"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:1
+msgid "Used to send the game."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendgame"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:8
+msgid ""
+"Short name of the game, serves as the unique identifier for the game. Set"
+" up your games via @BotFather."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:20
+msgid "Timeout in seconds for waiting for a response from the bot."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:26
+msgid ""
+"Pass True, if content of the message needs to be protected from being "
+"viewed by the bot."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:29
+msgid "Identifier of the thread to which the message will be sent."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:36
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:105
+#: telebot.async_telebot.AsyncTeleBot.send_poll:74
+msgid ":obj:`types.Message`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:1
+msgid "Sends invoice."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendinvoice"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:5
+msgid "Unique identifier for the target private chat"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:29
+msgid ""
+"Unique deep-linking parameter that can be used to generate this invoice "
+"when used as a start parameter"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:33
+msgid ""
+"URL of the product photo for the invoice. Can be a photo of the goods or "
+"a marketing image for a service. People like it better when they see what"
+" they are paying for."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:73
+msgid ""
+"A JSON-serialized object for an inline keyboard. If empty, one 'Pay total"
+" price' button will be shown. If not empty, the first button must be a "
+"Pay button"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:81
+#: telebot.async_telebot.AsyncTeleBot.set_webhook:39
+msgid "Timeout of a request, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:98
+msgid ""
+"The identifier of a message thread, in which the invoice message will be "
+"sent"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:1
+msgid ""
+"Use this method to send point on the map. On success, the sent Message is"
+" returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendlocation"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:8
+msgid "Latitude of the location"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:11
+msgid "Longitude of the location"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:14
+msgid ""
+"Period in seconds for which the location will be updated (see Live "
+"Locations, should be between 60 and 86400."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:34
+msgid ""
+"For live locations, a direction in which the user is moving, in degrees. "
+"Must be between 1 and 360 if specified."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:37
+msgid ""
+"For live locations, a maximum distance for proximity alerts about "
+"approaching another chat member, in meters. Must be between 1 and 100000 "
+"if specified."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_media_group:1
+msgid ""
+"Use this method to send a group of photos, videos, documents or audios as"
+" an album. Documents and audio files can be only grouped in an album with"
+" messages of the same type. On success, an array of Messages that were "
+"sent is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_media_group:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendmediagroup"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_media_group:9
+msgid ""
+"A JSON-serialized array describing messages to be sent, must include 2-10"
+" items"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_media_group:12
+msgid ""
+"Sends the messages silently. Users will receive a notification with no "
+"sound."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_media_group:33
+msgid "On success, an array of Messages that were sent is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:1
+msgid "Use this method to send text messages."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:3
+msgid ""
+"Warning: Do not send more than about 4096 characters each message, "
+"otherwise you'll risk an HTTP 414 error. If you must send more than 4096 "
+"characters, use the `split_string` or `smart_split` function in util.py."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendmessage"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:12
+msgid "Text of the message to be sent"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:18
+msgid ""
+"List of special entities that appear in message text, which can be "
+"specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:27
+msgid ""
+"If True, the message content will be hidden for all users except for the "
+"target user"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:49
+msgid "Options for previewing links."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:1
+msgid "Use this method to send photos. On success, the sent Message is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendphoto"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:8
+msgid ""
+"Photo to send. Pass a file_id as String to send a photo that exists on "
+"the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a photo from the Internet, or upload a new photo using "
+"multipart/form-data. The photo must be at most 10 MB in size. The photo's"
+" width and height must not exceed 10000 in total. Width and height ratio "
+"must be at most 20."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:13
+msgid ""
+"Photo caption (may also be used when resending photos by file_id), 0-1024"
+" characters after entities parsing"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:16
+msgid "Mode for parsing entities in the photo caption."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:45
+msgid "Pass True, if the photo should be sent as a spoiler"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:1
+msgid ""
+"Use this method to send a native poll. On success, the sent Message is "
+"returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendpoll"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:9
+msgid "Poll question, 1-300 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:12
+msgid ""
+"A JSON-serialized list of answer options, 2-10 strings 1-100 characters "
+"each"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:15
+msgid "True, if the poll needs to be anonymous, defaults to True"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:18
+msgid "Poll type, “quiz” or “regular”, defaults to “regular”"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:21
+msgid ""
+"True, if the poll allows multiple answers, ignored for polls in quiz "
+"mode, defaults to False"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:24
+msgid ""
+"0-based identifier of the correct answer option. Available only for polls"
+" in quiz mode, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:28
+msgid ""
+"Text that is shown when a user chooses an incorrect answer or taps on the"
+" lamp icon in a quiz-style poll, 0-200 characters with at most 2 line "
+"feeds after entities parsing"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:32
+msgid ""
+"Mode for parsing entities in the explanation. See formatting options for "
+"more details."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:35
+msgid ""
+"Amount of time in seconds the poll will be active after creation, 5-600. "
+"Can't be used together with close_date."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:38
+msgid "Point in time (Unix timestamp) when the poll will be automatically closed."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:41
+msgid ""
+"Pass True, if the poll needs to be immediately closed. This can be useful"
+" for poll preview."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:50
+msgid "Pass True, if the poll allows multiple options to be voted simultaneously."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:57
+msgid "Timeout in seconds for waiting for a response from the user."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:60
+msgid ""
+"A JSON-serialized list of special entities that appear in the "
+"explanation, which can be specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:67
+msgid "The identifier of a message thread, in which the poll will be sent"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_sticker:1
+msgid ""
+"Use this method to send static .WEBP, animated .TGS, or video .WEBM "
+"stickers. On success, the sent Message is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_sticker:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendsticker"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_sticker:9
+msgid ""
+"Sticker to send. Pass a file_id as String to send a file that exists on "
+"the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a .webp file from the Internet, or upload a new one using"
+" multipart/form-data."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_sticker:21
+msgid "to disable the notification"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_sticker:39
+msgid "Emoji associated with the sticker; only for just uploaded stickers"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:1
+msgid ""
+"Use this method to send information about a venue. On success, the sent "
+"Message is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvenue"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:8
+msgid "Latitude of the venue"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:11
+msgid "Longitude of the venue"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:14
+msgid "Name of the venue"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:17
+msgid "Address of the venue"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:20
+msgid "Foursquare identifier of the venue"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:23
+msgid ""
+"Foursquare type of the venue, if known. (For example, "
+"“arts_entertainment/default”, “arts_entertainment/aquarium” or "
+"“food/icecream”.)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:45
+msgid "Google Places identifier of the venue"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:48
+msgid "Google Places type of the venue."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:1
+msgid ""
+"Use this method to send video files, Telegram clients support mp4 videos "
+"(other formats may be sent as Document)."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvideo"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:8
+msgid ""
+"Video to send. You can either pass a file_id as String to resend a video "
+"that is already on the Telegram servers, or upload a new video file using"
+" multipart/form-data."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:11
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:13
+msgid "Duration of sent video in seconds"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:14
+msgid "Video width"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:17
+msgid "Video height"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:23
+msgid ""
+"Video caption (may also be used when resending videos by file_id), 0-1024"
+" characters after entities parsing"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:26
+msgid "Mode for parsing entities in the video caption"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:32
+msgid "Pass True, if the uploaded video is suitable for streaming"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:61
+msgid "Pass True, if the video should be sent as a spoiler"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video_note:1
+msgid ""
+"As of v.4.0, Telegram clients support rounded square MPEG4 videos of up "
+"to 1 minute long. Use this method to send video messages. On success, the"
+" sent Message is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video_note:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvideonote"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video_note:9
+msgid ""
+"Video note to send. Pass a file_id as String to send a video note that "
+"exists on the Telegram servers (recommended) or upload a new video using "
+"multipart/form-data. Sending video notes by a URL is currently "
+"unsupported"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video_note:16
+msgid "Video width and height, i.e. diameter of the video message"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video_note:45
+msgid "Identifier of a message thread, in which the video note will be sent"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:1
+msgid ""
+"Use this method to send audio files, if you want Telegram clients to "
+"display the file as a playable voice message. For this to work, your "
+"audio must be in an .OGG file encoded with OPUS (other formats may be "
+"sent as Audio or Document). On success, the sent Message is returned. "
+"Bots can currently send voice messages of up to 50 MB in size, this limit"
+" may be changed in the future."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvoice"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:10
+msgid ""
+"Audio file to send. Pass a file_id as String to send a file that exists "
+"on the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a file from the Internet, or upload a new one using "
+"multipart/form-data."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:14
+msgid "Voice message caption, 0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:17
+msgid "Duration of the voice message in seconds"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:28
+msgid ""
+"Mode for parsing entities in the voice message caption. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:1
+msgid ""
+"Use this method to set a custom title for an administrator in a "
+"supergroup promoted by the bot. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatadministratorcustomtitle"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:13
+msgid ""
+"New custom title for the administrator; 0-16 characters, emoji are not "
+"allowed"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_description:1
+msgid ""
+"Use this method to change the description of a supergroup or a channel. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_description:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatdescription"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_description:10
+msgid "Str: New chat description, 0-255 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:1
+msgid ""
+"Use this method to change the bot's menu button in a private chat, or the"
+" default menu button. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatmenubutton"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:7
+msgid ""
+"Unique identifier for the target private chat. If not specified, default "
+"bot's menu button will be changed."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:11
+msgid ""
+"A JSON-serialized object for the new bot's menu button. Defaults to "
+"MenuButtonDefault"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_permissions:1
+msgid ""
+"Use this method to set default chat permissions for all members. The bot "
+"must be an administrator in the group or a supergroup for this to work "
+"and must have the can_restrict_members admin rights."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_permissions:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatpermissions"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_permissions:11
+msgid "New default chat permissions"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_photo:1
+msgid ""
+"Use this method to set a new profile photo for the chat. Photos can't be "
+"changed for private chats. The bot must be an administrator in the chat "
+"for this to work and must have the appropriate admin rights. Returns True"
+" on success. Note: In regular groups (non-supergroups), this method will "
+"only work if the ‘All Members Are Admins’ setting is off in the target "
+"group."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_photo:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setchatphoto"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_photo:13
+msgid "InputFile: New chat photo, uploaded using multipart/form-data"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:1
+msgid ""
+"Use this method to set a new group sticker set for a supergroup. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate administrator rights. Use the field can_set_sticker_set "
+"optionally returned in getChat requests to check if the bot can use this "
+"method. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatstickerset"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:10
+msgid "Name of the sticker set to be set as the group sticker set"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:13
+msgid "StickerSet object"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_title:1
+msgid ""
+"Use this method to change the title of a chat. Titles can't be changed "
+"for private chats. The bot must be an administrator in the chat for this "
+"to work and must have the appropriate admin rights. Returns True on "
+"success. Note: In regular groups (non-supergroups), this method will only"
+" work if the ‘All Members Are Admins’ setting is off in the target group."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_title:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setchattitle"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_title:13
+msgid "New chat title, 1-255 characters"
+msgstr ""
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail:1
+msgid ""
+"Use this method to set the thumbnail of a custom emoji sticker set. "
+"Returns True on success."
+msgstr ""
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail:7
+msgid ""
+"Custom emoji identifier of a sticker from the sticker set; pass an empty "
+"string to drop the thumbnail and use the first sticker as the thumbnail."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:1
+msgid "Sets the value of points in the game to a specific user."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setgamescore"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:8
+msgid "New score, must be non-negative"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:11
+msgid ""
+"Pass True, if the high score is allowed to decrease. This can be useful "
+"when fixing mistakes or banning cheaters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:23
+msgid ""
+"Pass True, if the game message should not be automatically edited to "
+"include the current scoreboard"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:26
+msgid ""
+"On success, if the message was sent by the bot, returns the edited "
+"Message, otherwise returns True."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_message_reaction:1
+msgid ""
+"Use this method to set a reaction to a message in a chat. The bot must be"
+" an administrator in the chat for this to work and must have the "
+"appropriate admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_message_reaction:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmessagereaction"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_message_reaction:8
+msgid "Identifier of the message to set reaction to"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_message_reaction:11
+msgid ""
+"New list of reaction types to set on the message. Currently, as non-"
+"premium users, bots can set up to one reaction per message. A custom "
+"emoji reaction can be used if it is either already present on the message"
+" or explicitly allowed by chat administrators."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_message_reaction:15
+msgid "Pass True to set the reaction with a big animation"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_commands:1
+msgid "Use this method to change the list of the bot's commands."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_commands:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setmycommands"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_commands:5
+msgid "List of BotCommand. At most 100 commands can be specified."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:1
+msgid ""
+"Use this method to change the default administrator rights requested by "
+"the bot when it's added as an administrator to groups or channels. These "
+"rights will be suggested to users, but they are are free to modify the "
+"list before adding the bot. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:7
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmydefaultadministratorrights"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:9
+msgid ""
+"A JSON-serialized object describing new default administrator rights. If "
+"not specified, the default administrator rights will be cleared."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:13
+msgid ""
+"Pass True to change the default administrator rights of the bot in "
+"channels. Otherwise, the default administrator rights of the bot for "
+"groups and supergroups will be changed."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_description:1
+msgid ""
+"Use this method to change the bot's description, which is shown in the "
+"chat with the bot if the chat is empty. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_description:5
+msgid ""
+"New bot description; 0-512 characters. Pass an empty string to remove the"
+" dedicated description for the given language."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_description:8
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, the description will be "
+"applied to all users for whose language there is no dedicated "
+"description."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_name:1
+msgid "Use this method to change the bot's name. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_name:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setmyname"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_name:5
+msgid ""
+"Optional. New bot name; 0-64 characters. Pass an empty string to remove "
+"the dedicated name for the given language."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_name:8
+msgid ""
+"Optional. A two-letter ISO 639-1 language code. If empty, the name will "
+"be shown to all users for whose language there is no dedicated name."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_short_description:1
+msgid ""
+"Use this method to change the bot's short description, which is shown on "
+"the bot's profile page and is sent together with the link when users "
+"share the bot. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_short_description:5
+msgid ""
+"New short description for the bot; 0-120 characters. Pass an empty string"
+" to remove the dedicated short description for the given language."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_short_description:8
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, the short description "
+"will be applied to all users for whose language there is no dedicated "
+"short description."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_state:1
+msgid "Sets a new state of a user."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_state:5
+msgid ""
+"You should set both user id and chat id in order to set state for a user "
+"in a chat. Otherwise, if you only set user_id, chat_id will equal to "
+"user_id, this means that state will be set for the user in his private "
+"chat with a bot."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_state:12
+msgid "new state. can be string, integer, or :class:`telebot.types.State`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list:1
+msgid ""
+"Use this method to set the emoji list of a sticker set. Returns True on "
+"success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list:7
+msgid "List of emojis"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_keywords:1
+msgid ""
+"Use this method to change search keywords assigned to a regular or custom"
+" emoji sticker. The sticker must belong to a sticker set created by the "
+"bot. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_keywords:5
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position:5
+msgid "File identifier of the sticker."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_keywords:8
+msgid ""
+"A JSON-serialized list of 0-20 search keywords for the sticker with total"
+" length of up to 64 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position:1
+msgid ""
+"Use this method to change the mask position of a mask sticker. The "
+"sticker must belong to a sticker set that was created by the bot. Returns"
+" True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position:8
+msgid ""
+"A JSON-serialized object for position where the mask should be placed on "
+"faces."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:1
+msgid ""
+"Use this method to move a sticker in a set created by the bot to a "
+"specific position . Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setstickerpositioninset"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:8
+msgid "New sticker position in the set, zero-based"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:1
+msgid ""
+"Use this method to set the thumbnail of a sticker set. Animated "
+"thumbnails can be set for animated sticker sets only. Returns True on "
+"success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setstickersetthumb"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:12
+msgid ""
+"A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in "
+"size and have a width and height of exactly 100px, or a .TGS animation "
+"with a thumbnail up to 32 kilobytes in size (see "
+"https://core.telegram.org/stickers#animated-sticker-requirements for "
+"animated sticker technical requirements), or a WEBM video with the "
+"thumbnail up to 32 kilobytes in size; see "
+"https://core.telegram.org/stickers#video-sticker-requirements for video "
+"sticker technical requirements. Pass a file_id as a String to send a file"
+" that already exists on the Telegram servers, pass an HTTP URL as a "
+"String for Telegram to get a file from the Internet, or upload a new one "
+"using multipart/form-data. More information on Sending Files ». Animated "
+"and video sticker set thumbnails can't be uploaded via HTTP URL. If "
+"omitted, then the thumbnail is dropped and the first sticker is used as "
+"the thumbnail."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_set_title:1
+msgid ""
+"Use this method to set the title of a created sticker set. Returns True "
+"on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_set_title:7
+msgid "New sticker set title"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_update_listener:1
+msgid "Update listener is a function that gets any update."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_update_listener:3
+msgid "function that should get update."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_update_listener:6
+msgid "Example on asynchronous update listeners."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:1
+msgid ""
+"Use this method to specify a URL and receive incoming updates via an "
+"outgoing webhook. Whenever there is an update for the bot, we will send "
+"an HTTPS POST request to the specified URL, containing a JSON-serialized "
+"Update. In case of an unsuccessful request, we will give up after a "
+"reasonable amount of attempts. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:6
+msgid ""
+"If you'd like to make sure that the webhook was set by you, you can "
+"specify secret data in the parameter secret_token. If specified, the "
+"request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the "
+"secret token as content."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:9
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#setwebhook"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:11
+msgid ""
+"HTTPS URL to send updates to. Use an empty string to remove webhook "
+"integration, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:14
+msgid ""
+"Upload your public key certificate so that the root certificate in use "
+"can be checked, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:17
+msgid ""
+"The maximum allowed number of simultaneous HTTPS connections to the "
+"webhook for update delivery, 1-100. Defaults to 40. Use lower values to "
+"limit the load on your bot's server, and higher values to increase your "
+"bot's throughput, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:22
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used. Please note that this parameter doesn't affect "
+"updates created before the call to the setWebhook, so unwanted updates "
+"may be received for a short period of time. Defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:22
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:27
+msgid ""
+"Please note that this parameter doesn't affect updates created before the"
+" call to the setWebhook, so unwanted updates may be received for a short "
+"period of time. Defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:32
+msgid ""
+"The fixed IP address which will be used to send webhook requests instead "
+"of the IP address resolved through DNS, defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:42
+msgid ""
+"A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” "
+"in every webhook request, 1-256 characters. Only characters A-Z, a-z, "
+"0-9, _ and - are allowed. The header is useful to ensure that the request"
+" comes from a webhook set by you. Defaults to None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:47
+msgid ":obj:`bool` if the request was successful."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.setup_middleware:1
+msgid "Setup middleware."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.setup_middleware:5
+msgid ""
+"Take a look at the "
+":class:`telebot.asyncio_handler_backends.BaseMiddleware` section for "
+"more."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.setup_middleware:7
+msgid "Middleware-class."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.shipping_query_handler:1
+msgid ""
+"Handles new incoming shipping query. Only for invoices with flexible "
+"price. As a parameter to the decorator function, it passes "
+":class:`telebot.types.ShippingQuery` object."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.skip_updates:1
+msgid "Skip existing updates. Only last update will remain on server."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_message_live_location:1
+msgid ""
+"Use this method to stop updating a live location message before "
+"live_period expires. On success, if the message is not an inline message,"
+" the edited Message is returned, otherwise True is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_message_live_location:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#stopmessagelivelocation"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_message_live_location:9
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the message"
+" with live location to stop"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_message_live_location:12
+msgid ""
+"Required if chat_id and message_id are not specified. Identifier of the "
+"inline message with live location to stop"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_message_live_location:22
+msgid ""
+"On success, if the message is not an inline message, the edited Message "
+"is returned, otherwise True is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:1
+msgid ""
+"Use this method to stop a poll which was sent by the bot. On success, the"
+" stopped Poll is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#stoppoll"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:8
+msgid "Identifier of the original message with the poll"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:11
+msgid "A JSON-serialized object for a new message markup."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:14
+msgid "On success, the stopped Poll is returned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:15
+msgid ":obj:`types.Poll`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_member:1
+msgid ""
+"Use this method to unban a previously kicked user in a supergroup or "
+"channel. The user will not return to the group or channel automatically, "
+"but will be able to join via link, etc. The bot must be an administrator "
+"for this to work. By default, this method guarantees that after the call "
+"the user is not a member of the chat, but will be able to join it. So if "
+"the user is a member of the chat they will also be removed from the chat."
+" If you don't want this, use the parameter only_if_banned."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_member:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#unbanchatmember"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_member:9
+msgid ""
+"Unique identifier for the target group or username of the target "
+"supergroup or channel (in the format @username)"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_member:16
+msgid "Do nothing if the user is not banned"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:1
+msgid ""
+"Use this method to unban a previously banned channel chat in a supergroup"
+" or channel. The bot must be an administrator for this to work and must "
+"have the appropriate administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unbanchatsenderchat"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:11
+msgid "Unique identifier of the target sender chat."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unhide_general_forum_topic:1
+msgid ""
+"Use this method to unhide the 'General' topic in a forum supergroup chat."
+" The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unhide_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unhidegeneralforumtopic"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages:1
+msgid ""
+"Use this method to unpin a all pinned messages in a supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the appropriate admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinallchatmessages"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:1
+msgid ""
+"Use this method to clear the list of pinned messages in a forum topic. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the can_pin_messages administrator right in the supergroup. Returns "
+"True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinallforumtopicmessages"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:10
+msgid "Identifier of the topic"
+msgstr ""
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages:1
+msgid ""
+"Use this method to clear the list of pinned messages in a General forum "
+"topic. The bot must be an administrator in the chat for this to work and "
+"must have the can_pin_messages administrator right in the supergroup. "
+"Returns True on success."
+msgstr ""
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinAllGeneralForumTopicMessages"
+msgstr ""
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages:8
+msgid "Unique identifier for the target chat or username of chat"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_chat_message:1
+msgid ""
+"Use this method to unpin specific pinned message in a supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_chat_message:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinchatmessage"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_chat_message:11
+msgid "Int: Identifier of a message to unpin"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:1
+msgid ""
+"Use this method to upload a .png file with a sticker for later use in "
+"createNewStickerSet and addStickerToSet methods (can be used multiple "
+"times). Returns the uploaded File on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#uploadstickerfile"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:6
+msgid "User identifier of sticker set owner"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:9
+msgid ""
+"DEPRECATED: PNG image with the sticker, must be up to 512 kilobytes in "
+"size, dimensions must not exceed 512px, and either width or height must "
+"be exactly 512px."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:13
+msgid ""
+"A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See "
+"https://core.telegram.org/stickers for technical requirements. More "
+"information on Sending Files »"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:17
+msgid "One of \"static\", \"animated\", \"video\"."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:20
+msgid "On success, the sent file is returned."
+msgstr ""
+
+#: of telebot.async_telebot.ExceptionHandler:1
+msgid "Class for handling exceptions while Polling"
+msgstr ""
+
+#: of telebot.async_telebot.Handler:1
+msgid "Class for (next step|reply) handlers"
+msgstr ""
+
+#: ../../source/async_version/index.rst:22
+msgid "Asyncio filters"
+msgstr ""
+
+#: of telebot.asyncio_filters.AdvancedCustomFilter:1
+#: telebot.asyncio_filters.SimpleCustomFilter:1
+msgid "Bases: :py:class:`abc.ABC`"
+msgstr ""
+
+#: of telebot.asyncio_filters.AdvancedCustomFilter:1
+msgid ""
+"Advanced Custom Filter base class. Create child class with check() "
+"method. Accepts two parameters, returns bool: True - filter passed, False"
+" - filter failed. message: Message class text: Filter value given in "
+"handler"
+msgstr ""
+
+#: of telebot.asyncio_filters.AdvancedCustomFilter:7
+#: telebot.asyncio_filters.SimpleCustomFilter:5
+msgid "Child classes should have .key property."
+msgstr ""
+
+#: of telebot.asyncio_filters.AdvancedCustomFilter:9
+msgid "Example on creating an advanced custom filter."
+msgstr ""
+
+#: of telebot.asyncio_filters.AdvancedCustomFilter.check:1
+#: telebot.asyncio_filters.SimpleCustomFilter.check:1
+msgid "Perform a check."
+msgstr ""
+
+#: of telebot.asyncio_filters.ChatFilter:1
+#: telebot.asyncio_filters.LanguageFilter:1
+#: telebot.asyncio_filters.StateFilter:1
+#: telebot.asyncio_filters.TextContainsFilter:1
+#: telebot.asyncio_filters.TextMatchFilter:1
+#: telebot.asyncio_filters.TextStartsFilter:1
+msgid "Bases: :py:class:`telebot.asyncio_filters.AdvancedCustomFilter`"
+msgstr ""
+
+#: of telebot.asyncio_filters.ChatFilter:1
+msgid "Check whether chat_id corresponds to given chat_id."
+msgstr ""
+
+#: of telebot.asyncio_filters.ChatFilter:3
+#: telebot.asyncio_filters.ForwardFilter:3
+#: telebot.asyncio_filters.IsAdminFilter:3
+#: telebot.asyncio_filters.IsDigitFilter:3
+#: telebot.asyncio_filters.IsReplyFilter:3
+#: telebot.asyncio_filters.LanguageFilter:3
+#: telebot.asyncio_filters.StateFilter:3
+#: telebot.asyncio_filters.TextContainsFilter:5
+#: telebot.asyncio_filters.TextMatchFilter:3
+#: telebot.asyncio_filters.TextStartsFilter:3
+msgid "Example on using this filter:"
+msgstr ""
+
+#: of telebot.asyncio_filters.ForwardFilter:1
+#: telebot.asyncio_filters.IsAdminFilter:1
+#: telebot.asyncio_filters.IsDigitFilter:1
+#: telebot.asyncio_filters.IsReplyFilter:1
+msgid "Bases: :py:class:`telebot.asyncio_filters.SimpleCustomFilter`"
+msgstr ""
+
+#: of telebot.asyncio_filters.ForwardFilter:1
+msgid "Check whether message was forwarded from channel or group."
+msgstr ""
+
+#: of telebot.asyncio_filters.IsAdminFilter:1
+msgid "Check whether the user is administrator / owner of the chat."
+msgstr ""
+
+#: of telebot.asyncio_filters.IsDigitFilter:1
+msgid "Filter to check whether the string is made up of only digits."
+msgstr ""
+
+#: of telebot.asyncio_filters.IsReplyFilter:1
+msgid "Check whether message is a reply."
+msgstr ""
+
+#: of telebot.asyncio_filters.LanguageFilter:1
+msgid "Check users language_code."
+msgstr ""
+
+#: of telebot.asyncio_filters.SimpleCustomFilter:1
+msgid ""
+"Simple Custom Filter base class. Create child class with check() method. "
+"Accepts only message, returns bool value, that is compared with given in "
+"handler."
+msgstr ""
+
+#: of telebot.asyncio_filters.SimpleCustomFilter:7
+msgid "Example on creating a simple custom filter."
+msgstr ""
+
+#: of telebot.asyncio_filters.StateFilter:1
+msgid "Filter to check state."
+msgstr ""
+
+#: of telebot.asyncio_filters.TextContainsFilter:1
+msgid "Filter to check Text message. key: text"
+msgstr ""
+
+#: of telebot.asyncio_filters.TextFilter:1
+msgid ""
+"Advanced text filter to check (types.Message, types.CallbackQuery, "
+"types.InlineQuery, types.Poll)"
+msgstr ""
+
+#: of telebot.asyncio_filters.TextFilter:3
+msgid ""
+"example of usage is in "
+"examples/asynchronous_telebot/custom_filters/advanced_text_filter.py"
+msgstr ""
+
+#: of telebot.asyncio_filters.TextFilter:5
+msgid "string, True if object's text is equal to passed string"
+msgstr ""
+
+#: of telebot.asyncio_filters.TextFilter:8
+msgid "list[str] or tuple[str], True if any string element of iterable is in text"
+msgstr ""
+
+#: of telebot.asyncio_filters.TextFilter:11
+#: telebot.asyncio_filters.TextFilter:14
+msgid "string, True if object's text starts with passed string"
+msgstr ""
+
+#: of telebot.asyncio_filters.TextFilter:17
+msgid "bool (default False), case insensitive"
+msgstr ""
+
+#: of telebot.asyncio_filters.TextFilter
+msgid "Raises"
+msgstr ""
+
+#: of telebot.asyncio_filters.TextFilter:20
+msgid "if incorrect value for a parameter was supplied"
+msgstr ""
+
+#: of telebot.asyncio_filters.TextMatchFilter:1
+msgid "Filter to check Text message."
+msgstr ""
+
+#: of telebot.asyncio_filters.TextStartsFilter:1
+msgid "Filter to check whether message starts with some text."
+msgstr ""
+
+#: ../../source/async_version/index.rst:30
+msgid "Asyncio handler backends"
+msgstr ""
+
+#: of telebot.asyncio_handler_backends:1
+msgid "File with all middleware classes, states."
+msgstr ""
+
+#: of telebot.asyncio_handler_backends.BaseMiddleware:1
+msgid ""
+"Base class for middleware. Your middlewares should be inherited from this"
+" class."
+msgstr ""
+
+#: of telebot.asyncio_handler_backends.BaseMiddleware:4
+msgid ""
+"Set update_sensitive=True if you want to get different updates on "
+"different functions. For example, if you want to handle pre_process for "
+"message update, then you will have to create pre_process_message "
+"function, and so on. Same applies to post_process."
+msgstr ""
+
+#: of telebot.asyncio_handler_backends.BaseMiddleware:9
+msgid "Example of class-based middlewares"
+msgstr ""
+
+#: of telebot.asyncio_handler_backends.CancelUpdate:1
+msgid ""
+"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."
+msgstr ""
+
+#: of telebot.asyncio_handler_backends.ContinueHandling:1
+msgid ""
+"Class for continue updates in handlers. Just return instance of this "
+"class in handlers to continue process."
+msgstr ""
+
+#: of telebot.asyncio_handler_backends.ContinueHandling:5
+msgid "Example of using ContinueHandling"
+msgstr ""
+
+#: of telebot.asyncio_handler_backends.SkipHandler:1
+msgid ""
+"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."
+msgstr ""
+
+#: of telebot.asyncio_handler_backends.State:1
+msgid "Class representing a state."
+msgstr ""
+
+#: of telebot.asyncio_handler_backends.StatesGroup:1
+msgid "Class representing common states."
+msgstr ""
+
+#: ../../source/async_version/index.rst:41
+msgid "Extensions"
+msgstr ""
+
+#: of telebot.ext.aio.webhooks:1
+msgid "This file is used by AsyncTeleBot.run_webhooks() function."
+msgstr ""
+
+#: of telebot.ext.aio.webhooks:3
+msgid "Fastapi and starlette(0.20.2+) libraries are required to run this script."
+msgstr ""
+
+#: of telebot.ext.aio.webhooks.AsyncWebhookListener.run_app:1
+msgid ""
+"Run app with the given parameters to init. Not supposed to be used "
+"manually by user."
+msgstr ""
+
+#~ msgid "New name of the topic, 1-128 characters"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "New custom emoji for the topic "
+#~ "icon. Must be an emoji of type "
+#~ "“tgs” and must be exactly 1 "
+#~ "character long"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Use this method to add a new "
+#~ "sticker to a set created by the"
+#~ " bot. It's required to pass "
+#~ "`png_sticker` or `tgs_sticker`. Returns True"
+#~ " on success."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional, Type of stickers in the "
+#~ "set, pass “regular” or “mask”. Custom"
+#~ " emoji sticker sets can't be created"
+#~ " via the Bot API at the moment."
+#~ " By default, a regular sticker set"
+#~ " is created."
+#~ msgstr ""
+
+#~ msgid "Timeout in seconds for long polling."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "PNG image with the sticker, must "
+#~ "be up to 512 kilobytes in size,"
+#~ " dimensions must not exceed 512px, "
+#~ "and either width or height must be"
+#~ " exactly 512px."
+#~ msgstr ""
+
diff --git a/docs/source/locales/en/LC_MESSAGES/calldata.po b/docs/source/locales/en/LC_MESSAGES/calldata.po
new file mode 100644
index 000000000..03484e874
--- /dev/null
+++ b/docs/source/locales/en/LC_MESSAGES/calldata.po
@@ -0,0 +1,127 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-11-29 14:44+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../calldata.rst:4
+msgid "Callback data factory"
+msgstr ""
+
+#: ../../calldata.rst:6
+msgid "Callback data factory in pyTelegramBotAPI"
+msgstr ""
+
+#: ../../calldata.rst:6
+msgid ""
+"ptba, pytba, pyTelegramBotAPI, callbackdatafactory, guide, callbackdata, "
+"factory"
+msgstr ""
+
+#: ../../calldata.rst:12
+msgid "callback\\_data file"
+msgstr ""
+
+#: of telebot.callback_data:1
+msgid "Callback data factory's file."
+msgstr ""
+
+#: of telebot.callback_data.CallbackData:1
+#: telebot.callback_data.CallbackDataFilter:1
+msgid "Bases: :py:class:`object`"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData:1
+msgid "Callback data factory This class will help you to work with CallbackQuery"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.filter:1
+msgid "Generate filter"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.filter
+#: telebot.callback_data.CallbackData.new
+#: telebot.callback_data.CallbackData.parse
+#: telebot.callback_data.CallbackDataFilter.check
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.filter:3
+msgid "specified named parameters will be checked with CallbackQuery.data"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.filter
+#: telebot.callback_data.CallbackData.new
+#: telebot.callback_data.CallbackData.parse
+#: telebot.callback_data.CallbackDataFilter.check
+msgid "Returns"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.filter:4
+msgid "CallbackDataFilter class"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.new:1
+msgid "Generate callback data"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.new:3
+msgid "positional parameters of CallbackData instance parts"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.new:4
+msgid "named parameters"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.new:5
+msgid "str"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.parse:1
+msgid "Parse data from the callback data"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.parse:3
+msgid ""
+"string, use to telebot.types.CallbackQuery to parse it from string to a "
+"dict"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.parse:4
+msgid "dict parsed from callback data"
+msgstr ""
+
+#: of telebot.callback_data.CallbackDataFilter:1
+msgid "Filter for CallbackData."
+msgstr ""
+
+#: of telebot.callback_data.CallbackDataFilter.check:1
+msgid "Checks if query.data appropriates to specified config"
+msgstr ""
+
+#: of telebot.callback_data.CallbackDataFilter.check:3
+msgid "telebot.types.CallbackQuery"
+msgstr ""
+
+#: of telebot.callback_data.CallbackDataFilter.check:6
+msgid "True if query.data appropriates to specified config"
+msgstr ""
+
+#: of telebot.callback_data.CallbackDataFilter.check
+msgid "Return type"
+msgstr ""
+
diff --git a/docs/source/locales/en/LC_MESSAGES/formatting.po b/docs/source/locales/en/LC_MESSAGES/formatting.po
new file mode 100644
index 000000000..0f6eff001
--- /dev/null
+++ b/docs/source/locales/en/LC_MESSAGES/formatting.po
@@ -0,0 +1,251 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-11-29 14:44+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../formatting.rst:3
+msgid "Formatting options"
+msgstr ""
+
+#: ../../formatting.rst:5
+msgid "Formatting options in pyTelegramBotAPI"
+msgstr ""
+
+#: ../../formatting.rst:5
+msgid "html, markdown, parse_mode, formatting, ptba, pytba, pyTelegramBotAPI"
+msgstr ""
+
+#: of telebot.formatting:1
+msgid "Markdown & HTML formatting functions."
+msgstr ""
+
+#: of telebot.formatting.escape_html:1
+msgid "Escapes HTML characters in a string of HTML."
+msgstr ""
+
+#: of telebot.formatting.escape_html telebot.formatting.escape_markdown
+#: telebot.formatting.format_text telebot.formatting.hbold
+#: telebot.formatting.hcode telebot.formatting.hide_link
+#: telebot.formatting.hitalic telebot.formatting.hlink telebot.formatting.hpre
+#: telebot.formatting.hspoiler telebot.formatting.hstrikethrough
+#: telebot.formatting.hunderline telebot.formatting.mbold
+#: telebot.formatting.mcode telebot.formatting.mitalic telebot.formatting.mlink
+#: telebot.formatting.mspoiler telebot.formatting.mstrikethrough
+#: telebot.formatting.munderline
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.formatting.escape_html:3
+msgid "The string of HTML to escape."
+msgstr ""
+
+#: of telebot.formatting.escape_html telebot.formatting.escape_markdown
+#: telebot.formatting.format_text telebot.formatting.hbold
+#: telebot.formatting.hcode telebot.formatting.hide_link
+#: telebot.formatting.hitalic telebot.formatting.hlink telebot.formatting.hpre
+#: telebot.formatting.hspoiler telebot.formatting.hstrikethrough
+#: telebot.formatting.hunderline telebot.formatting.mbold
+#: telebot.formatting.mcode telebot.formatting.mitalic telebot.formatting.mlink
+#: telebot.formatting.mspoiler telebot.formatting.mstrikethrough
+#: telebot.formatting.munderline
+msgid "Returns"
+msgstr ""
+
+#: of telebot.formatting.escape_html:6 telebot.formatting.escape_markdown:8
+msgid "The escaped string."
+msgstr ""
+
+#: of telebot.formatting.escape_html telebot.formatting.escape_markdown
+#: telebot.formatting.format_text telebot.formatting.hbold
+#: telebot.formatting.hcode telebot.formatting.hide_link
+#: telebot.formatting.hitalic telebot.formatting.hlink telebot.formatting.hpre
+#: telebot.formatting.hspoiler telebot.formatting.hstrikethrough
+#: telebot.formatting.hunderline telebot.formatting.mbold
+#: telebot.formatting.mcode telebot.formatting.mitalic telebot.formatting.mlink
+#: telebot.formatting.mspoiler telebot.formatting.mstrikethrough
+#: telebot.formatting.munderline
+msgid "Return type"
+msgstr ""
+
+#: of telebot.formatting.escape_html:7 telebot.formatting.escape_markdown:9
+#: telebot.formatting.format_text:17 telebot.formatting.hbold:10
+#: telebot.formatting.hcode:10 telebot.formatting.hide_link:7
+#: telebot.formatting.hitalic:10 telebot.formatting.hlink:13
+#: telebot.formatting.hpre:10 telebot.formatting.hspoiler:10
+#: telebot.formatting.hstrikethrough:10 telebot.formatting.hunderline:10
+#: telebot.formatting.mbold:10 telebot.formatting.mcode:10
+#: telebot.formatting.mitalic:10 telebot.formatting.mlink:13
+#: telebot.formatting.mspoiler:10 telebot.formatting.mstrikethrough:10
+#: telebot.formatting.munderline:10
+msgid ":obj:`str`"
+msgstr ""
+
+#: of telebot.formatting.escape_markdown:1
+msgid "Escapes Markdown characters in a string of Markdown."
+msgstr ""
+
+#: of telebot.formatting.escape_markdown:3
+msgid "Credits to: simonsmh"
+msgstr ""
+
+#: of telebot.formatting.escape_markdown:5
+msgid "The string of Markdown to escape."
+msgstr ""
+
+#: of telebot.formatting.format_text:1
+msgid "Formats a list of strings into a single string."
+msgstr ""
+
+#: of telebot.formatting.format_text:10
+msgid "Strings to format."
+msgstr ""
+
+#: of telebot.formatting.format_text:13
+msgid "The separator to use between each string."
+msgstr ""
+
+#: of telebot.formatting.format_text:16 telebot.formatting.hbold:9
+#: telebot.formatting.hcode:9 telebot.formatting.hitalic:9
+#: telebot.formatting.hlink:12 telebot.formatting.hpre:9
+#: telebot.formatting.hspoiler:9 telebot.formatting.hstrikethrough:9
+#: telebot.formatting.hunderline:9 telebot.formatting.mbold:9
+#: telebot.formatting.mcode:9 telebot.formatting.mitalic:9
+#: telebot.formatting.mlink:12 telebot.formatting.mspoiler:9
+#: telebot.formatting.mstrikethrough:9 telebot.formatting.munderline:9
+msgid "The formatted string."
+msgstr ""
+
+#: of telebot.formatting.hbold:1
+msgid "Returns an HTML-formatted bold string."
+msgstr ""
+
+#: of telebot.formatting.hbold:3 telebot.formatting.mbold:3
+msgid "The string to bold."
+msgstr ""
+
+#: of telebot.formatting.hbold:6 telebot.formatting.hcode:6
+#: telebot.formatting.hitalic:6 telebot.formatting.hlink:9
+#: telebot.formatting.hpre:6 telebot.formatting.hspoiler:6
+#: telebot.formatting.hstrikethrough:6 telebot.formatting.hunderline:6
+#: telebot.formatting.mbold:6 telebot.formatting.mcode:6
+#: telebot.formatting.mitalic:6 telebot.formatting.mlink:9
+#: telebot.formatting.mspoiler:6 telebot.formatting.mstrikethrough:6
+#: telebot.formatting.munderline:6
+msgid "True if you need to escape special characters. Defaults to True."
+msgstr ""
+
+#: of telebot.formatting.hcode:1
+msgid "Returns an HTML-formatted code string."
+msgstr ""
+
+#: of telebot.formatting.hcode:3 telebot.formatting.mcode:3
+msgid "The string to code."
+msgstr ""
+
+#: of telebot.formatting.hide_link:1
+msgid "Hide url of an image."
+msgstr ""
+
+#: of telebot.formatting.hide_link:3
+msgid "The url of the image."
+msgstr ""
+
+#: of telebot.formatting.hide_link:6
+msgid "The hidden url."
+msgstr ""
+
+#: of telebot.formatting.hitalic:1
+msgid "Returns an HTML-formatted italic string."
+msgstr ""
+
+#: of telebot.formatting.hitalic:3 telebot.formatting.mitalic:3
+msgid "The string to italicize."
+msgstr ""
+
+#: of telebot.formatting.hlink:1
+msgid "Returns an HTML-formatted link string."
+msgstr ""
+
+#: of telebot.formatting.hlink:3 telebot.formatting.mlink:3
+msgid "The string to link."
+msgstr ""
+
+#: of telebot.formatting.hlink:6 telebot.formatting.mlink:6
+msgid "The URL to link to."
+msgstr ""
+
+#: of telebot.formatting.hpre:1
+msgid "Returns an HTML-formatted preformatted string."
+msgstr ""
+
+#: of telebot.formatting.hpre:3
+msgid "The string to preformatted."
+msgstr ""
+
+#: of telebot.formatting.hspoiler:1
+msgid "Returns an HTML-formatted spoiler string."
+msgstr ""
+
+#: of telebot.formatting.hspoiler:3 telebot.formatting.mspoiler:3
+msgid "The string to spoiler."
+msgstr ""
+
+#: of telebot.formatting.hstrikethrough:1
+msgid "Returns an HTML-formatted strikethrough string."
+msgstr ""
+
+#: of telebot.formatting.hstrikethrough:3 telebot.formatting.mstrikethrough:3
+msgid "The string to strikethrough."
+msgstr ""
+
+#: of telebot.formatting.hunderline:1
+msgid "Returns an HTML-formatted underline string."
+msgstr ""
+
+#: of telebot.formatting.hunderline:3 telebot.formatting.munderline:3
+msgid "The string to underline."
+msgstr ""
+
+#: of telebot.formatting.mbold:1
+msgid "Returns a Markdown-formatted bold string."
+msgstr ""
+
+#: of telebot.formatting.mcode:1
+msgid "Returns a Markdown-formatted code string."
+msgstr ""
+
+#: of telebot.formatting.mitalic:1
+msgid "Returns a Markdown-formatted italic string."
+msgstr ""
+
+#: of telebot.formatting.mlink:1
+msgid "Returns a Markdown-formatted link string."
+msgstr ""
+
+#: of telebot.formatting.mspoiler:1
+msgid "Returns a Markdown-formatted spoiler string."
+msgstr ""
+
+#: of telebot.formatting.mstrikethrough:1
+msgid "Returns a Markdown-formatted strikethrough string."
+msgstr ""
+
+#: of telebot.formatting.munderline:1
+msgid "Returns a Markdown-formatted underline string."
+msgstr ""
+
diff --git a/docs/source/locales/en/LC_MESSAGES/index.po b/docs/source/locales/en/LC_MESSAGES/index.po
new file mode 100644
index 000000000..38a49544f
--- /dev/null
+++ b/docs/source/locales/en/LC_MESSAGES/index.po
@@ -0,0 +1,120 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-11-29 14:44+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../index.rst:8
+msgid "Welcome to pyTelegramBotAPI's documentation!"
+msgstr ""
+
+#: ../../index.rst:10
+msgid "Official documentation of pyTelegramBotAPI"
+msgstr ""
+
+#: ../../index.rst:10
+msgid "ptba, pytba, pyTelegramBotAPI, documentation, guide"
+msgstr ""
+
+#: ../../index.rst:17
+msgid "TeleBot"
+msgstr ""
+
+#: ../../index.rst:18
+msgid ""
+"TeleBot is synchronous and asynchronous implementation of `Telegram Bot "
+"API `_."
+msgstr ""
+
+#: ../../index.rst:21
+msgid "Chats"
+msgstr ""
+
+#: ../../index.rst:22
+msgid ""
+"English chat: `Private chat "
+"`__"
+msgstr ""
+
+#: ../../index.rst:24
+msgid ""
+"Russian chat: `@pytelegrambotapi_talks_ru "
+"`__"
+msgstr ""
+
+#: ../../index.rst:26
+msgid "News: `@pyTelegramBotAPI `__"
+msgstr ""
+
+#: ../../index.rst:28
+msgid "Pypi: `Pypi `__"
+msgstr ""
+
+#: ../../index.rst:30
+msgid ""
+"Source: `Github repository "
+"`__"
+msgstr ""
+
+#: ../../index.rst:33
+msgid "Some features:"
+msgstr ""
+
+#: ../../index.rst:34
+msgid "Easy to learn and use."
+msgstr ""
+
+#: ../../index.rst:36
+msgid "Easy to understand."
+msgstr ""
+
+#: ../../index.rst:38
+msgid "Both sync and async."
+msgstr ""
+
+#: ../../index.rst:40
+msgid "Examples on features."
+msgstr ""
+
+#: ../../index.rst:42
+msgid "States"
+msgstr ""
+
+#: ../../index.rst:44
+msgid "And more..."
+msgstr ""
+
+#: ../../index.rst:47
+msgid "Content"
+msgstr ""
+
+#: ../../index.rst:63
+msgid "Indices and tables"
+msgstr ""
+
+#: ../../index.rst:65
+msgid ":ref:`genindex`"
+msgstr ""
+
+#: ../../index.rst:66
+msgid ":ref:`modindex`"
+msgstr ""
+
+#: ../../index.rst:67
+msgid ":ref:`search`"
+msgstr ""
+
diff --git a/docs/source/locales/en/LC_MESSAGES/install.po b/docs/source/locales/en/LC_MESSAGES/install.po
new file mode 100644
index 000000000..0f4a3b386
--- /dev/null
+++ b/docs/source/locales/en/LC_MESSAGES/install.po
@@ -0,0 +1,58 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-11-29 14:44+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../install.rst:3
+msgid "Installation Guide"
+msgstr ""
+
+#: ../../install.rst:5
+msgid "Installation of pyTelegramBotAPI"
+msgstr ""
+
+#: ../../install.rst:5
+msgid "ptba, pytba, pyTelegramBotAPI, installation, guide"
+msgstr ""
+
+#: ../../install.rst:11
+msgid "Using PIP"
+msgstr ""
+
+#: ../../install.rst:17
+msgid "Using pipenv"
+msgstr ""
+
+#: ../../install.rst:23
+msgid "By cloning repository"
+msgstr ""
+
+#: ../../install.rst:31
+msgid "Directly using pip"
+msgstr ""
+
+#: ../../install.rst:37
+msgid "It is generally recommended to use the first option."
+msgstr ""
+
+#: ../../install.rst:39
+msgid ""
+"While the API is production-ready, it is still under development and it "
+"has regular updates, do not forget to update it regularly by calling:"
+msgstr ""
+
diff --git a/docs/source/locales/en/LC_MESSAGES/quick_start.po b/docs/source/locales/en/LC_MESSAGES/quick_start.po
new file mode 100644
index 000000000..9e7c22fbb
--- /dev/null
+++ b/docs/source/locales/en/LC_MESSAGES/quick_start.po
@@ -0,0 +1,40 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-11-29 14:44+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../quick_start.rst:4
+msgid "Quick start"
+msgstr ""
+
+#: ../../quick_start.rst:6
+msgid "Quickstart guide"
+msgstr ""
+
+#: ../../quick_start.rst:6
+msgid "ptba, pytba, pyTelegramBotAPI, quickstart, guide"
+msgstr ""
+
+#: ../../quick_start.rst:11
+msgid "Synchronous TeleBot"
+msgstr ""
+
+#: ../../quick_start.rst:16
+msgid "Asynchronous TeleBot"
+msgstr ""
+
diff --git a/docs/source/locales/en/LC_MESSAGES/sync_version.po b/docs/source/locales/en/LC_MESSAGES/sync_version.po
new file mode 100644
index 000000000..30d0fb92f
--- /dev/null
+++ b/docs/source/locales/en/LC_MESSAGES/sync_version.po
@@ -0,0 +1,5659 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-01-05 22:16+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../source/sync_version/index.rst:3
+msgid "TeleBot version"
+msgstr ""
+
+#: ../../source/sync_version/index.rst:5
+msgid "Synchronous pyTelegramBotAPI documentation"
+msgstr ""
+
+#: ../../source/sync_version/index.rst:5
+msgid "ptba, pytba, pyTelegramBotAPI, methods, guide, files, sync"
+msgstr ""
+
+#: ../../source/sync_version/index.rst:10
+msgid "TeleBot methods"
+msgstr ""
+
+#: of telebot.ExceptionHandler:1 telebot.Handler:1 telebot.TeleBot:1
+#: telebot.custom_filters.TextFilter:1
+#: telebot.ext.sync.webhooks.SyncWebhookListener:1
+#: telebot.handler_backends.BaseMiddleware:1
+#: telebot.handler_backends.CancelUpdate:1
+#: telebot.handler_backends.ContinueHandling:1
+#: telebot.handler_backends.SkipHandler:1 telebot.handler_backends.State:1
+#: telebot.handler_backends.StatesGroup:1
+msgid "Bases: :py:class:`object`"
+msgstr ""
+
+#: of telebot.ExceptionHandler:1
+msgid "Class for handling exceptions while Polling"
+msgstr ""
+
+#: of telebot.Handler:1
+msgid "Class for (next step|reply) handlers."
+msgstr ""
+
+#: ../../docstring of telebot.REPLY_MARKUP_TYPES:1
+msgid "telebot"
+msgstr ""
+
+#: ../../docstring of telebot.REPLY_MARKUP_TYPES
+msgid "type"
+msgstr ""
+
+#: ../../docstring of telebot.REPLY_MARKUP_TYPES:3
+msgid "Module"
+msgstr ""
+
+#: of telebot.TeleBot:1
+msgid "This is the main synchronous class for Bot."
+msgstr ""
+
+#: of telebot.TeleBot:3
+msgid "It allows you to add handlers for different kind of updates."
+msgstr ""
+
+#: of telebot.TeleBot:5
+msgid "Usage:"
+msgstr ""
+
+#: of telebot.TeleBot:7
+msgid "Creating instance of TeleBot"
+msgstr ""
+
+#: of telebot.TeleBot:15
+msgid ""
+"See more examples in examples/ directory: "
+"https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples"
+msgstr ""
+
+#: of telebot.TeleBot:20
+msgid "Install coloredlogs module to specify colorful_logs=True"
+msgstr ""
+
+#: of telebot.TeleBot telebot.TeleBot.add_custom_filter
+#: telebot.TeleBot.add_data telebot.TeleBot.add_sticker_to_set
+#: telebot.TeleBot.answer_callback_query telebot.TeleBot.answer_inline_query
+#: telebot.TeleBot.answer_pre_checkout_query
+#: telebot.TeleBot.answer_shipping_query telebot.TeleBot.answer_web_app_query
+#: telebot.TeleBot.approve_chat_join_request telebot.TeleBot.ban_chat_member
+#: telebot.TeleBot.ban_chat_sender_chat telebot.TeleBot.callback_query_handler
+#: telebot.TeleBot.channel_post_handler telebot.TeleBot.chat_boost_handler
+#: telebot.TeleBot.chat_join_request_handler
+#: telebot.TeleBot.chat_member_handler telebot.TeleBot.chosen_inline_handler
+#: telebot.TeleBot.clear_reply_handlers
+#: telebot.TeleBot.clear_reply_handlers_by_message_id
+#: telebot.TeleBot.clear_step_handler
+#: telebot.TeleBot.clear_step_handler_by_chat_id
+#: telebot.TeleBot.close_forum_topic telebot.TeleBot.close_general_forum_topic
+#: telebot.TeleBot.copy_message telebot.TeleBot.copy_messages
+#: telebot.TeleBot.create_chat_invite_link telebot.TeleBot.create_forum_topic
+#: telebot.TeleBot.create_invoice_link telebot.TeleBot.create_new_sticker_set
+#: telebot.TeleBot.decline_chat_join_request telebot.TeleBot.delete_chat_photo
+#: telebot.TeleBot.delete_chat_sticker_set telebot.TeleBot.delete_forum_topic
+#: telebot.TeleBot.delete_message telebot.TeleBot.delete_messages
+#: telebot.TeleBot.delete_my_commands telebot.TeleBot.delete_state
+#: telebot.TeleBot.delete_sticker_from_set telebot.TeleBot.delete_sticker_set
+#: telebot.TeleBot.delete_webhook telebot.TeleBot.download_file
+#: telebot.TeleBot.edit_chat_invite_link telebot.TeleBot.edit_forum_topic
+#: telebot.TeleBot.edit_general_forum_topic
+#: telebot.TeleBot.edit_message_caption
+#: telebot.TeleBot.edit_message_live_location
+#: telebot.TeleBot.edit_message_media telebot.TeleBot.edit_message_reply_markup
+#: telebot.TeleBot.edit_message_text
+#: telebot.TeleBot.edited_channel_post_handler
+#: telebot.TeleBot.edited_message_handler
+#: telebot.TeleBot.enable_save_next_step_handlers
+#: telebot.TeleBot.enable_save_reply_handlers
+#: telebot.TeleBot.enable_saving_states telebot.TeleBot.export_chat_invite_link
+#: telebot.TeleBot.forward_message telebot.TeleBot.forward_messages
+#: telebot.TeleBot.get_chat telebot.TeleBot.get_chat_administrators
+#: telebot.TeleBot.get_chat_member telebot.TeleBot.get_chat_member_count
+#: telebot.TeleBot.get_chat_menu_button
+#: telebot.TeleBot.get_custom_emoji_stickers telebot.TeleBot.get_file
+#: telebot.TeleBot.get_file_url telebot.TeleBot.get_game_high_scores
+#: telebot.TeleBot.get_my_commands
+#: telebot.TeleBot.get_my_default_administrator_rights
+#: telebot.TeleBot.get_my_description telebot.TeleBot.get_my_name
+#: telebot.TeleBot.get_my_short_description telebot.TeleBot.get_state
+#: telebot.TeleBot.get_sticker_set telebot.TeleBot.get_updates
+#: telebot.TeleBot.get_user_chat_boosts telebot.TeleBot.get_user_profile_photos
+#: telebot.TeleBot.get_webhook_info telebot.TeleBot.hide_general_forum_topic
+#: telebot.TeleBot.infinity_polling telebot.TeleBot.inline_handler
+#: telebot.TeleBot.leave_chat telebot.TeleBot.load_next_step_handlers
+#: telebot.TeleBot.load_reply_handlers telebot.TeleBot.message_handler
+#: telebot.TeleBot.message_reaction_count_handler
+#: telebot.TeleBot.message_reaction_handler telebot.TeleBot.middleware_handler
+#: telebot.TeleBot.my_chat_member_handler telebot.TeleBot.pin_chat_message
+#: telebot.TeleBot.poll_answer_handler telebot.TeleBot.poll_handler
+#: telebot.TeleBot.polling telebot.TeleBot.pre_checkout_query_handler
+#: telebot.TeleBot.process_new_updates telebot.TeleBot.promote_chat_member
+#: telebot.TeleBot.register_callback_query_handler
+#: telebot.TeleBot.register_channel_post_handler
+#: telebot.TeleBot.register_chat_boost_handler
+#: telebot.TeleBot.register_chat_join_request_handler
+#: telebot.TeleBot.register_chat_member_handler
+#: telebot.TeleBot.register_chosen_inline_handler
+#: telebot.TeleBot.register_edited_channel_post_handler
+#: telebot.TeleBot.register_edited_message_handler
+#: telebot.TeleBot.register_for_reply
+#: telebot.TeleBot.register_for_reply_by_message_id
+#: telebot.TeleBot.register_inline_handler
+#: telebot.TeleBot.register_message_handler
+#: telebot.TeleBot.register_message_reaction_count_handler
+#: telebot.TeleBot.register_message_reaction_handler
+#: telebot.TeleBot.register_middleware_handler
+#: telebot.TeleBot.register_my_chat_member_handler
+#: telebot.TeleBot.register_next_step_handler
+#: telebot.TeleBot.register_next_step_handler_by_chat_id
+#: telebot.TeleBot.register_poll_answer_handler
+#: telebot.TeleBot.register_poll_handler
+#: telebot.TeleBot.register_pre_checkout_query_handler
+#: telebot.TeleBot.register_removed_chat_boost_handler
+#: telebot.TeleBot.register_shipping_query_handler
+#: telebot.TeleBot.removed_chat_boost_handler
+#: telebot.TeleBot.reopen_forum_topic
+#: telebot.TeleBot.reopen_general_forum_topic telebot.TeleBot.reply_to
+#: telebot.TeleBot.reset_data telebot.TeleBot.restrict_chat_member
+#: telebot.TeleBot.retrieve_data telebot.TeleBot.revoke_chat_invite_link
+#: telebot.TeleBot.run_webhooks telebot.TeleBot.send_animation
+#: telebot.TeleBot.send_audio telebot.TeleBot.send_chat_action
+#: telebot.TeleBot.send_contact telebot.TeleBot.send_dice
+#: telebot.TeleBot.send_document telebot.TeleBot.send_game
+#: telebot.TeleBot.send_invoice telebot.TeleBot.send_location
+#: telebot.TeleBot.send_media_group telebot.TeleBot.send_message
+#: telebot.TeleBot.send_photo telebot.TeleBot.send_poll
+#: telebot.TeleBot.send_sticker telebot.TeleBot.send_venue
+#: telebot.TeleBot.send_video telebot.TeleBot.send_video_note
+#: telebot.TeleBot.send_voice
+#: telebot.TeleBot.set_chat_administrator_custom_title
+#: telebot.TeleBot.set_chat_description telebot.TeleBot.set_chat_menu_button
+#: telebot.TeleBot.set_chat_permissions telebot.TeleBot.set_chat_photo
+#: telebot.TeleBot.set_chat_sticker_set telebot.TeleBot.set_chat_title
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.TeleBot.set_game_score telebot.TeleBot.set_message_reaction
+#: telebot.TeleBot.set_my_commands
+#: telebot.TeleBot.set_my_default_administrator_rights
+#: telebot.TeleBot.set_my_description telebot.TeleBot.set_my_name
+#: telebot.TeleBot.set_my_short_description telebot.TeleBot.set_state
+#: telebot.TeleBot.set_sticker_emoji_list telebot.TeleBot.set_sticker_keywords
+#: telebot.TeleBot.set_sticker_mask_position
+#: telebot.TeleBot.set_sticker_position_in_set
+#: telebot.TeleBot.set_sticker_set_thumbnail
+#: telebot.TeleBot.set_sticker_set_title telebot.TeleBot.set_update_listener
+#: telebot.TeleBot.set_webhook telebot.TeleBot.setup_middleware
+#: telebot.TeleBot.shipping_query_handler
+#: telebot.TeleBot.stop_message_live_location telebot.TeleBot.stop_poll
+#: telebot.TeleBot.unban_chat_member telebot.TeleBot.unban_chat_sender_chat
+#: telebot.TeleBot.unhide_general_forum_topic
+#: telebot.TeleBot.unpin_all_chat_messages
+#: telebot.TeleBot.unpin_all_forum_topic_messages
+#: telebot.TeleBot.unpin_all_general_forum_topic_messages
+#: telebot.TeleBot.unpin_chat_message telebot.TeleBot.upload_sticker_file
+#: telebot.custom_filters.TextFilter
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.TeleBot:23
+msgid "Token of a bot, should be obtained from @BotFather"
+msgstr ""
+
+#: of telebot.TeleBot:26
+msgid "Default parse mode, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot:29
+msgid "Threaded or not, defaults to True"
+msgstr ""
+
+#: of telebot.TeleBot:32
+msgid "Skips pending updates, defaults to False"
+msgstr ""
+
+#: of telebot.TeleBot:35
+msgid "Number of maximum parallel threads, defaults to 2"
+msgstr ""
+
+#: of telebot.TeleBot:38
+msgid "Next step backend class, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot:41
+msgid "Reply step handler class, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot:44
+msgid "Exception handler to handle errors, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot:47
+msgid "Last update's id, defaults to 0"
+msgstr ""
+
+#: of telebot.TeleBot:50
+msgid "Supress middleware exceptions, defaults to False"
+msgstr ""
+
+#: of telebot.TeleBot:53
+msgid "Storage for states, defaults to StateMemoryStorage()"
+msgstr ""
+
+#: of telebot.TeleBot:56
+msgid "Use class middlewares, defaults to False"
+msgstr ""
+
+#: of telebot.TeleBot:59
+msgid "Default value for disable_web_page_preview, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot:62
+msgid "Default value for disable_notification, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot:65
+msgid "Default value for protect_content, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot:68
+msgid "Default value for allow_sending_without_reply, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot:72
+msgid "Outputs colorful logs"
+msgstr ""
+
+#: of telebot.TeleBot.add_custom_filter:1
+msgid "Create custom filter."
+msgstr ""
+
+#: of telebot.TeleBot.add_custom_filter:3
+msgid "Example on checking the text of a message"
+msgstr ""
+
+#: of telebot.TeleBot.add_custom_filter:12
+msgid "Class with check(message) method."
+msgstr ""
+
+#: of telebot.TeleBot.add_custom_filter:13
+msgid "Custom filter class with key."
+msgstr ""
+
+#: of telebot.TeleBot.add_data:1
+msgid "Add data to states."
+msgstr ""
+
+#: of telebot.TeleBot.add_data:3 telebot.TeleBot.delete_state:3
+#: telebot.TeleBot.get_state:4 telebot.TeleBot.reset_data:3
+#: telebot.TeleBot.set_state:9
+msgid "User's identifier"
+msgstr ""
+
+#: of telebot.TeleBot.add_data:6 telebot.TeleBot.delete_state:6
+#: telebot.TeleBot.get_state:7 telebot.TeleBot.reset_data:6
+#: telebot.TeleBot.set_state:15
+msgid "Chat's identifier"
+msgstr ""
+
+#: of telebot.TeleBot.add_data:9
+msgid "Data to add"
+msgstr ""
+
+#: of telebot.TeleBot.add_data telebot.TeleBot.add_sticker_to_set
+#: telebot.TeleBot.answer_callback_query telebot.TeleBot.answer_inline_query
+#: telebot.TeleBot.answer_pre_checkout_query
+#: telebot.TeleBot.answer_shipping_query telebot.TeleBot.answer_web_app_query
+#: telebot.TeleBot.approve_chat_join_request telebot.TeleBot.ban_chat_member
+#: telebot.TeleBot.ban_chat_sender_chat telebot.TeleBot.callback_query_handler
+#: telebot.TeleBot.channel_post_handler telebot.TeleBot.chat_boost_handler
+#: telebot.TeleBot.chat_join_request_handler
+#: telebot.TeleBot.chat_member_handler telebot.TeleBot.chosen_inline_handler
+#: telebot.TeleBot.clear_reply_handlers
+#: telebot.TeleBot.clear_reply_handlers_by_message_id
+#: telebot.TeleBot.clear_step_handler
+#: telebot.TeleBot.clear_step_handler_by_chat_id telebot.TeleBot.close
+#: telebot.TeleBot.close_forum_topic telebot.TeleBot.copy_message
+#: telebot.TeleBot.copy_messages telebot.TeleBot.create_chat_invite_link
+#: telebot.TeleBot.create_forum_topic telebot.TeleBot.create_invoice_link
+#: telebot.TeleBot.create_new_sticker_set
+#: telebot.TeleBot.decline_chat_join_request telebot.TeleBot.delete_chat_photo
+#: telebot.TeleBot.delete_chat_sticker_set telebot.TeleBot.delete_forum_topic
+#: telebot.TeleBot.delete_message telebot.TeleBot.delete_messages
+#: telebot.TeleBot.delete_my_commands telebot.TeleBot.delete_state
+#: telebot.TeleBot.delete_sticker_from_set telebot.TeleBot.delete_sticker_set
+#: telebot.TeleBot.delete_webhook telebot.TeleBot.download_file
+#: telebot.TeleBot.edit_chat_invite_link telebot.TeleBot.edit_forum_topic
+#: telebot.TeleBot.edit_message_caption
+#: telebot.TeleBot.edit_message_live_location
+#: telebot.TeleBot.edit_message_media telebot.TeleBot.edit_message_reply_markup
+#: telebot.TeleBot.edit_message_text
+#: telebot.TeleBot.edited_channel_post_handler
+#: telebot.TeleBot.edited_message_handler
+#: telebot.TeleBot.enable_save_next_step_handlers
+#: telebot.TeleBot.export_chat_invite_link telebot.TeleBot.forward_message
+#: telebot.TeleBot.forward_messages telebot.TeleBot.get_chat
+#: telebot.TeleBot.get_chat_administrators telebot.TeleBot.get_chat_member
+#: telebot.TeleBot.get_chat_member_count telebot.TeleBot.get_chat_menu_button
+#: telebot.TeleBot.get_custom_emoji_stickers telebot.TeleBot.get_file
+#: telebot.TeleBot.get_file_url telebot.TeleBot.get_forum_topic_icon_stickers
+#: telebot.TeleBot.get_game_high_scores telebot.TeleBot.get_my_commands
+#: telebot.TeleBot.get_my_default_administrator_rights
+#: telebot.TeleBot.get_my_description telebot.TeleBot.get_my_name
+#: telebot.TeleBot.get_my_short_description telebot.TeleBot.get_state
+#: telebot.TeleBot.get_sticker_set telebot.TeleBot.get_updates
+#: telebot.TeleBot.get_user_chat_boosts telebot.TeleBot.get_user_profile_photos
+#: telebot.TeleBot.get_webhook_info telebot.TeleBot.infinity_polling
+#: telebot.TeleBot.inline_handler telebot.TeleBot.leave_chat
+#: telebot.TeleBot.log_out telebot.TeleBot.message_handler
+#: telebot.TeleBot.message_reaction_count_handler
+#: telebot.TeleBot.message_reaction_handler telebot.TeleBot.middleware_handler
+#: telebot.TeleBot.my_chat_member_handler telebot.TeleBot.pin_chat_message
+#: telebot.TeleBot.poll_answer_handler telebot.TeleBot.poll_handler
+#: telebot.TeleBot.polling telebot.TeleBot.pre_checkout_query_handler
+#: telebot.TeleBot.promote_chat_member
+#: telebot.TeleBot.register_callback_query_handler
+#: telebot.TeleBot.register_channel_post_handler
+#: telebot.TeleBot.register_chat_boost_handler
+#: telebot.TeleBot.register_chat_join_request_handler
+#: telebot.TeleBot.register_chosen_inline_handler
+#: telebot.TeleBot.register_edited_channel_post_handler
+#: telebot.TeleBot.register_edited_message_handler
+#: telebot.TeleBot.register_for_reply
+#: telebot.TeleBot.register_for_reply_by_message_id
+#: telebot.TeleBot.register_inline_handler
+#: telebot.TeleBot.register_message_handler
+#: telebot.TeleBot.register_message_reaction_count_handler
+#: telebot.TeleBot.register_message_reaction_handler
+#: telebot.TeleBot.register_middleware_handler
+#: telebot.TeleBot.register_my_chat_member_handler
+#: telebot.TeleBot.register_next_step_handler
+#: telebot.TeleBot.register_next_step_handler_by_chat_id
+#: telebot.TeleBot.register_poll_answer_handler
+#: telebot.TeleBot.register_poll_handler
+#: telebot.TeleBot.register_pre_checkout_query_handler
+#: telebot.TeleBot.register_removed_chat_boost_handler
+#: telebot.TeleBot.register_shipping_query_handler
+#: telebot.TeleBot.remove_webhook telebot.TeleBot.removed_chat_boost_handler
+#: telebot.TeleBot.reopen_forum_topic telebot.TeleBot.reply_to
+#: telebot.TeleBot.reset_data telebot.TeleBot.restrict_chat_member
+#: telebot.TeleBot.retrieve_data telebot.TeleBot.revoke_chat_invite_link
+#: telebot.TeleBot.send_animation telebot.TeleBot.send_audio
+#: telebot.TeleBot.send_chat_action telebot.TeleBot.send_contact
+#: telebot.TeleBot.send_dice telebot.TeleBot.send_document
+#: telebot.TeleBot.send_game telebot.TeleBot.send_invoice
+#: telebot.TeleBot.send_location telebot.TeleBot.send_media_group
+#: telebot.TeleBot.send_message telebot.TeleBot.send_photo
+#: telebot.TeleBot.send_poll telebot.TeleBot.send_sticker
+#: telebot.TeleBot.send_venue telebot.TeleBot.send_video
+#: telebot.TeleBot.send_video_note telebot.TeleBot.send_voice
+#: telebot.TeleBot.set_chat_administrator_custom_title
+#: telebot.TeleBot.set_chat_description telebot.TeleBot.set_chat_menu_button
+#: telebot.TeleBot.set_chat_permissions telebot.TeleBot.set_chat_photo
+#: telebot.TeleBot.set_chat_sticker_set telebot.TeleBot.set_chat_title
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.TeleBot.set_game_score telebot.TeleBot.set_message_reaction
+#: telebot.TeleBot.set_my_commands
+#: telebot.TeleBot.set_my_default_administrator_rights
+#: telebot.TeleBot.set_my_description telebot.TeleBot.set_my_name
+#: telebot.TeleBot.set_my_short_description telebot.TeleBot.set_state
+#: telebot.TeleBot.set_sticker_emoji_list telebot.TeleBot.set_sticker_keywords
+#: telebot.TeleBot.set_sticker_mask_position
+#: telebot.TeleBot.set_sticker_position_in_set
+#: telebot.TeleBot.set_sticker_set_thumbnail
+#: telebot.TeleBot.set_sticker_set_title telebot.TeleBot.set_webhook
+#: telebot.TeleBot.setup_middleware telebot.TeleBot.shipping_query_handler
+#: telebot.TeleBot.stop_message_live_location telebot.TeleBot.stop_poll
+#: telebot.TeleBot.unban_chat_member telebot.TeleBot.unban_chat_sender_chat
+#: telebot.TeleBot.unpin_all_chat_messages
+#: telebot.TeleBot.unpin_all_forum_topic_messages
+#: telebot.TeleBot.unpin_all_general_forum_topic_messages
+#: telebot.TeleBot.unpin_chat_message telebot.TeleBot.upload_sticker_file
+#: telebot.TeleBot.user telebot.custom_filters.TextFilter
+#: telebot.ext.sync.webhooks.SyncWebhookListener.run_app
+msgid "Returns"
+msgstr ""
+
+#: of telebot.TeleBot.add_data:10 telebot.TeleBot.callback_query_handler:9
+#: telebot.TeleBot.channel_post_handler:18 telebot.TeleBot.chat_boost_handler:8
+#: telebot.TeleBot.chat_join_request_handler:10
+#: telebot.TeleBot.chat_member_handler:11
+#: telebot.TeleBot.chosen_inline_handler:10
+#: telebot.TeleBot.clear_reply_handlers:6
+#: telebot.TeleBot.clear_reply_handlers_by_message_id:6
+#: telebot.TeleBot.clear_step_handler:6
+#: telebot.TeleBot.clear_step_handler_by_chat_id:6
+#: telebot.TeleBot.delete_state:9 telebot.TeleBot.edited_message_handler:21
+#: telebot.TeleBot.enable_save_next_step_handlers:13
+#: telebot.TeleBot.inline_handler:9 telebot.TeleBot.my_chat_member_handler:10
+#: telebot.TeleBot.poll_answer_handler:10 telebot.TeleBot.poll_handler:8
+#: telebot.TeleBot.pre_checkout_query_handler:9
+#: telebot.TeleBot.register_callback_query_handler:14
+#: telebot.TeleBot.register_channel_post_handler:23
+#: telebot.TeleBot.register_chat_boost_handler:13
+#: telebot.TeleBot.register_chat_join_request_handler:14
+#: telebot.TeleBot.register_chosen_inline_handler:14
+#: telebot.TeleBot.register_edited_message_handler:26
+#: telebot.TeleBot.register_for_reply:15
+#: telebot.TeleBot.register_for_reply_by_message_id:15
+#: telebot.TeleBot.register_message_handler:26
+#: telebot.TeleBot.register_message_reaction_count_handler:14
+#: telebot.TeleBot.register_message_reaction_handler:14
+#: telebot.TeleBot.register_middleware_handler:18
+#: telebot.TeleBot.register_my_chat_member_handler:14
+#: telebot.TeleBot.register_next_step_handler:15
+#: telebot.TeleBot.register_next_step_handler_by_chat_id:15
+#: telebot.TeleBot.register_poll_answer_handler:14
+#: telebot.TeleBot.register_poll_handler:14
+#: telebot.TeleBot.register_removed_chat_boost_handler:13
+#: telebot.TeleBot.register_shipping_query_handler:14
+#: telebot.TeleBot.removed_chat_boost_handler:8 telebot.TeleBot.reset_data:9
+#: telebot.TeleBot.set_state:18 telebot.TeleBot.setup_middleware:5
+#: telebot.TeleBot.shipping_query_handler:9
+#: telebot.custom_filters.TextFilter:22
+#: telebot.ext.sync.webhooks.SyncWebhookListener.run_app:4
+msgid "None"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:1
+msgid ""
+"Use this method to add a new sticker to a set created by the bot. The "
+"format of the added sticker must match the format of the other stickers "
+"in the set. Emoji sticker sets can have up to 200 stickers. Animated and "
+"video sticker sets can have up to 50 stickers. Static sticker sets can "
+"have up to 120 stickers. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#addstickertoset"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:10
+msgid ""
+"**_sticker, mask_position, emojis parameters are deprecated, use stickers"
+" instead"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:12
+#: telebot.TeleBot.create_new_sticker_set:10
+msgid "User identifier of created sticker set owner"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:15
+#: telebot.TeleBot.delete_sticker_set:3 telebot.TeleBot.get_sticker_set:5
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail:4
+#: telebot.TeleBot.set_sticker_set_thumbnail:6
+#: telebot.TeleBot.set_sticker_set_title:4
+msgid "Sticker set name"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:18
+#: telebot.TeleBot.create_new_sticker_set:21
+msgid "One or more emoji corresponding to the sticker"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:21
+#: telebot.TeleBot.create_new_sticker_set:24
+msgid ""
+"PNG image with the sticker, must be up to 512 kilobytes in size, "
+"dimensions must not exceed 512px, and either width or height must be "
+"exactly 512px. Pass a file_id as a String to send a file that already "
+"exists on the Telegram servers, pass an HTTP URL as a String for Telegram"
+" to get a file from the Internet, or upload a new one using multipart"
+"/form-data."
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:26
+#: telebot.TeleBot.create_new_sticker_set:29
+msgid "TGS animation with the sticker, uploaded using multipart/form-data."
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:29
+#: telebot.TeleBot.create_new_sticker_set:32
+msgid "WebM animation with the sticker, uploaded using multipart/form-data."
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:32
+#: telebot.TeleBot.create_new_sticker_set:42
+msgid ""
+"A JSON-serialized object for position where the mask should be placed on "
+"faces"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:35
+msgid ""
+"A JSON-serialized list of 1-50 initial stickers to be added to the "
+"sticker set"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:38
+#: telebot.TeleBot.answer_callback_query:22
+#: telebot.TeleBot.answer_inline_query:38
+#: telebot.TeleBot.answer_pre_checkout_query:21
+#: telebot.TeleBot.answer_shipping_query:18
+#: telebot.TeleBot.close_forum_topic:13
+#: telebot.TeleBot.create_new_sticker_set:56
+#: telebot.TeleBot.delete_forum_topic:13
+#: telebot.TeleBot.delete_sticker_from_set:6
+#: telebot.TeleBot.edit_forum_topic:22 telebot.TeleBot.reopen_forum_topic:13
+#: telebot.TeleBot.set_sticker_keywords:11
+#: telebot.TeleBot.set_sticker_position_in_set:11
+#: telebot.TeleBot.set_sticker_set_thumbnail:15
+#: telebot.TeleBot.unpin_all_forum_topic_messages:13
+#: telebot.TeleBot.unpin_all_general_forum_topic_messages:11
+msgid "On success, True is returned."
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set telebot.TeleBot.answer_callback_query
+#: telebot.TeleBot.answer_inline_query
+#: telebot.TeleBot.answer_pre_checkout_query
+#: telebot.TeleBot.answer_shipping_query telebot.TeleBot.answer_web_app_query
+#: telebot.TeleBot.approve_chat_join_request telebot.TeleBot.ban_chat_member
+#: telebot.TeleBot.ban_chat_sender_chat telebot.TeleBot.close_forum_topic
+#: telebot.TeleBot.copy_message telebot.TeleBot.copy_messages
+#: telebot.TeleBot.create_chat_invite_link telebot.TeleBot.create_forum_topic
+#: telebot.TeleBot.create_invoice_link telebot.TeleBot.create_new_sticker_set
+#: telebot.TeleBot.decline_chat_join_request telebot.TeleBot.delete_chat_photo
+#: telebot.TeleBot.delete_chat_sticker_set telebot.TeleBot.delete_forum_topic
+#: telebot.TeleBot.delete_message telebot.TeleBot.delete_my_commands
+#: telebot.TeleBot.delete_sticker_from_set telebot.TeleBot.delete_sticker_set
+#: telebot.TeleBot.delete_webhook telebot.TeleBot.download_file
+#: telebot.TeleBot.edit_chat_invite_link telebot.TeleBot.edit_forum_topic
+#: telebot.TeleBot.edit_message_caption
+#: telebot.TeleBot.edit_message_live_location
+#: telebot.TeleBot.edit_message_media telebot.TeleBot.edit_message_reply_markup
+#: telebot.TeleBot.edit_message_text telebot.TeleBot.export_chat_invite_link
+#: telebot.TeleBot.forward_message telebot.TeleBot.forward_messages
+#: telebot.TeleBot.get_chat telebot.TeleBot.get_chat_administrators
+#: telebot.TeleBot.get_chat_member telebot.TeleBot.get_chat_member_count
+#: telebot.TeleBot.get_chat_menu_button
+#: telebot.TeleBot.get_custom_emoji_stickers telebot.TeleBot.get_file_url
+#: telebot.TeleBot.get_forum_topic_icon_stickers
+#: telebot.TeleBot.get_game_high_scores telebot.TeleBot.get_my_commands
+#: telebot.TeleBot.get_my_default_administrator_rights
+#: telebot.TeleBot.get_state telebot.TeleBot.get_sticker_set
+#: telebot.TeleBot.get_updates telebot.TeleBot.get_user_chat_boosts
+#: telebot.TeleBot.get_user_profile_photos telebot.TeleBot.get_webhook_info
+#: telebot.TeleBot.log_out telebot.TeleBot.pin_chat_message
+#: telebot.TeleBot.promote_chat_member telebot.TeleBot.remove_webhook
+#: telebot.TeleBot.reopen_forum_topic telebot.TeleBot.reply_to
+#: telebot.TeleBot.restrict_chat_member telebot.TeleBot.retrieve_data
+#: telebot.TeleBot.revoke_chat_invite_link telebot.TeleBot.send_animation
+#: telebot.TeleBot.send_audio telebot.TeleBot.send_chat_action
+#: telebot.TeleBot.send_contact telebot.TeleBot.send_dice
+#: telebot.TeleBot.send_document telebot.TeleBot.send_game
+#: telebot.TeleBot.send_invoice telebot.TeleBot.send_location
+#: telebot.TeleBot.send_media_group telebot.TeleBot.send_message
+#: telebot.TeleBot.send_photo telebot.TeleBot.send_poll
+#: telebot.TeleBot.send_sticker telebot.TeleBot.send_venue
+#: telebot.TeleBot.send_video telebot.TeleBot.send_video_note
+#: telebot.TeleBot.set_chat_administrator_custom_title
+#: telebot.TeleBot.set_chat_description telebot.TeleBot.set_chat_menu_button
+#: telebot.TeleBot.set_chat_permissions telebot.TeleBot.set_chat_photo
+#: telebot.TeleBot.set_chat_sticker_set telebot.TeleBot.set_chat_title
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.TeleBot.set_game_score telebot.TeleBot.set_my_commands
+#: telebot.TeleBot.set_my_default_administrator_rights
+#: telebot.TeleBot.set_sticker_emoji_list telebot.TeleBot.set_sticker_keywords
+#: telebot.TeleBot.set_sticker_mask_position
+#: telebot.TeleBot.set_sticker_position_in_set
+#: telebot.TeleBot.set_sticker_set_thumbnail
+#: telebot.TeleBot.set_sticker_set_title telebot.TeleBot.set_webhook
+#: telebot.TeleBot.stop_message_live_location telebot.TeleBot.stop_poll
+#: telebot.TeleBot.unban_chat_member telebot.TeleBot.unban_chat_sender_chat
+#: telebot.TeleBot.unpin_all_chat_messages
+#: telebot.TeleBot.unpin_all_forum_topic_messages
+#: telebot.TeleBot.unpin_all_general_forum_topic_messages
+#: telebot.TeleBot.unpin_chat_message telebot.TeleBot.upload_sticker_file
+#: telebot.TeleBot.user
+msgid "Return type"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:39
+#: telebot.TeleBot.answer_callback_query:23
+#: telebot.TeleBot.answer_inline_query:39
+#: telebot.TeleBot.answer_pre_checkout_query:22
+#: telebot.TeleBot.answer_shipping_query:19
+#: telebot.TeleBot.approve_chat_join_request:15
+#: telebot.TeleBot.ban_chat_member:25 telebot.TeleBot.ban_chat_sender_chat:17
+#: telebot.TeleBot.close:9 telebot.TeleBot.close_forum_topic:14
+#: telebot.TeleBot.create_new_sticker_set:57
+#: telebot.TeleBot.decline_chat_join_request:15
+#: telebot.TeleBot.delete_chat_photo:13
+#: telebot.TeleBot.delete_chat_sticker_set:11
+#: telebot.TeleBot.delete_forum_topic:14 telebot.TeleBot.delete_message:23
+#: telebot.TeleBot.delete_my_commands:17
+#: telebot.TeleBot.delete_sticker_from_set:7
+#: telebot.TeleBot.delete_sticker_set:7 telebot.TeleBot.delete_webhook:13
+#: telebot.TeleBot.edit_forum_topic:23 telebot.TeleBot.leave_chat:8
+#: telebot.TeleBot.log_out:11 telebot.TeleBot.pin_chat_message:19
+#: telebot.TeleBot.promote_chat_member:70 telebot.TeleBot.remove_webhook:4
+#: telebot.TeleBot.reopen_forum_topic:14
+#: telebot.TeleBot.restrict_chat_member:61 telebot.TeleBot.send_chat_action:26
+#: telebot.TeleBot.set_chat_administrator_custom_title:18
+#: telebot.TeleBot.set_chat_description:14
+#: telebot.TeleBot.set_chat_menu_button:15
+#: telebot.TeleBot.set_chat_permissions:21 telebot.TeleBot.set_chat_photo:16
+#: telebot.TeleBot.set_chat_title:17
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail:11
+#: telebot.TeleBot.set_message_reaction:18 telebot.TeleBot.set_my_commands:18
+#: telebot.TeleBot.set_my_default_administrator_rights:18
+#: telebot.TeleBot.set_sticker_emoji_list:11
+#: telebot.TeleBot.set_sticker_keywords:12
+#: telebot.TeleBot.set_sticker_mask_position:12
+#: telebot.TeleBot.set_sticker_position_in_set:12
+#: telebot.TeleBot.set_sticker_set_thumbnail:16
+#: telebot.TeleBot.set_sticker_set_title:11
+#: telebot.TeleBot.unban_chat_member:20
+#: telebot.TeleBot.unban_chat_sender_chat:15
+#: telebot.TeleBot.unpin_all_chat_messages:12
+#: telebot.TeleBot.unpin_all_forum_topic_messages:14
+#: telebot.TeleBot.unpin_all_general_forum_topic_messages:12
+#: telebot.TeleBot.unpin_chat_message:15
+msgid ":obj:`bool`"
+msgstr ""
+
+#: of telebot.TeleBot.answer_callback_query:1
+msgid ""
+"Use this method to send answers to callback queries sent from inline "
+"keyboards. The answer will be displayed to the user as a notification at "
+"the top of the chat screen or as an alert."
+msgstr ""
+
+#: of telebot.TeleBot.answer_callback_query:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answercallbackquery"
+msgstr ""
+
+#: of telebot.TeleBot.answer_callback_query:6
+#: telebot.TeleBot.answer_pre_checkout_query:10
+#: telebot.TeleBot.answer_shipping_query:5
+#: telebot.TeleBot.answer_web_app_query:8
+msgid "Unique identifier for the query to be answered"
+msgstr ""
+
+#: of telebot.TeleBot.answer_callback_query:9
+msgid ""
+"Text of the notification. If not specified, nothing will be shown to the "
+"user, 0-200 characters"
+msgstr ""
+
+#: of telebot.TeleBot.answer_callback_query:12
+msgid ""
+"If True, an alert will be shown by the client instead of a notification "
+"at the top of the chat screen. Defaults to false."
+msgstr ""
+
+#: of telebot.TeleBot.answer_callback_query:15
+msgid ""
+"URL that will be opened by the user's client. If you have created a Game "
+"and accepted the conditions via @BotFather, specify the URL that opens "
+"your game - note that this will only work if the query comes from a "
+"callback_game button."
+msgstr ""
+
+#: of telebot.TeleBot.answer_callback_query:19
+msgid ""
+"The maximum amount of time in seconds that the result of the callback "
+"query may be cached client-side. Telegram apps will support caching "
+"starting in version 3.14. Defaults to 0."
+msgstr ""
+
+#: of telebot.TeleBot.answer_inline_query:1
+msgid ""
+"Use this method to send answers to an inline query. On success, True is "
+"returned. No more than 50 results per query are allowed."
+msgstr ""
+
+#: of telebot.TeleBot.answer_inline_query:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answerinlinequery"
+msgstr ""
+
+#: of telebot.TeleBot.answer_inline_query:6
+msgid "Unique identifier for the answered query"
+msgstr ""
+
+#: of telebot.TeleBot.answer_inline_query:9
+msgid "Array of results for the inline query"
+msgstr ""
+
+#: of telebot.TeleBot.answer_inline_query:12
+msgid ""
+"The maximum amount of time in seconds that the result of the inline query"
+" may be cached on the server."
+msgstr ""
+
+#: of telebot.TeleBot.answer_inline_query:16
+msgid ""
+"Pass True, if results may be cached on the server side only for the user "
+"that sent the query."
+msgstr ""
+
+#: of telebot.TeleBot.answer_inline_query:20
+msgid ""
+"Pass the offset that a client should send in the next query with the same"
+" text to receive more results."
+msgstr ""
+
+#: of telebot.TeleBot.answer_inline_query:24
+msgid ""
+"Deep-linking parameter for the /start message sent to the bot when user "
+"presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - "
+"are allowed. Example: An inline bot that sends YouTube videos can ask the"
+" user to connect the bot to their YouTube account to adapt search results"
+" accordingly. To do this, it displays a 'Connect your YouTube account' "
+"button above the results, or even before showing any. The user presses "
+"the button, switches to a private chat with the bot and, in doing so, "
+"passes a start parameter that instructs the bot to return an OAuth link. "
+"Once done, the bot can offer a switch_inline button so that the user can "
+"easily return to the chat where they wanted to use the bot's inline "
+"capabilities."
+msgstr ""
+
+#: of telebot.TeleBot.answer_inline_query:32
+msgid ""
+"Parameter for the start message sent to the bot when user presses the "
+"switch button"
+msgstr ""
+
+#: of telebot.TeleBot.answer_inline_query:35
+msgid ""
+"A JSON-serialized object describing a button to be shown above inline "
+"query results"
+msgstr ""
+
+#: of telebot.TeleBot.answer_pre_checkout_query:1
+msgid ""
+"Once the user has confirmed their payment and shipping details, the Bot "
+"API sends the final confirmation in the form of an Update with the field "
+"pre_checkout_query. Use this method to respond to such pre-checkout "
+"queries. On success, True is returned."
+msgstr ""
+
+#: of telebot.TeleBot.answer_pre_checkout_query:6
+msgid ""
+"The Bot API must receive an answer within 10 seconds after the pre-"
+"checkout query was sent."
+msgstr ""
+
+#: of telebot.TeleBot.answer_pre_checkout_query:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answerprecheckoutquery"
+msgstr ""
+
+#: of telebot.TeleBot.answer_pre_checkout_query:13
+msgid ""
+"Specify True if everything is alright (goods are available, etc.) and the"
+" bot is ready to proceed with the order. Use False if there are any "
+"problems."
+msgstr ""
+
+#: of telebot.TeleBot.answer_pre_checkout_query:16
+msgid ""
+"Required if ok is False. Error message in human readable form that "
+"explains the reason for failure to proceed with the checkout (e.g. "
+"\"Sorry, somebody just bought the last of our amazing black T-shirts "
+"while you were busy filling out your payment details. Please choose a "
+"different color or garment!\"). Telegram will display this message to the"
+" user."
+msgstr ""
+
+#: of telebot.TeleBot.answer_shipping_query:1
+msgid "Asks for an answer to a shipping question."
+msgstr ""
+
+#: of telebot.TeleBot.answer_shipping_query:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answershippingquery"
+msgstr ""
+
+#: of telebot.TeleBot.answer_shipping_query:8
+msgid ""
+"Specify True if delivery to the specified address is possible and False "
+"if there are any problems (for example, if delivery to the specified "
+"address is not possible)"
+msgstr ""
+
+#: of telebot.TeleBot.answer_shipping_query:11
+msgid ""
+"Required if ok is True. A JSON-serialized array of available shipping "
+"options."
+msgstr ""
+
+#: of telebot.TeleBot.answer_shipping_query:14
+msgid ""
+"Required if ok is False. Error message in human readable form that "
+"explains why it is impossible to complete the order (e.g. \"Sorry, "
+"delivery to your desired address is unavailable'). Telegram will display "
+"this message to the user."
+msgstr ""
+
+#: of telebot.TeleBot.answer_web_app_query:1
+msgid ""
+"Use this method to set the result of an interaction with a Web App and "
+"send a corresponding message on behalf of the user to the chat from which"
+" the query originated. On success, a SentWebAppMessage object is "
+"returned."
+msgstr ""
+
+#: of telebot.TeleBot.answer_web_app_query:6
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#answerwebappquery"
+msgstr ""
+
+#: of telebot.TeleBot.answer_web_app_query:11
+msgid "A JSON-serialized object describing the message to be sent"
+msgstr ""
+
+#: of telebot.TeleBot.answer_web_app_query:14
+msgid "On success, a SentWebAppMessage object is returned."
+msgstr ""
+
+#: of telebot.TeleBot.answer_web_app_query:15
+msgid ":class:`telebot.types.SentWebAppMessage`"
+msgstr ""
+
+#: of telebot.TeleBot.approve_chat_join_request:1
+msgid ""
+"Use this method to approve a chat join request. The bot must be an "
+"administrator in the chat for this to work and must have the "
+"can_invite_users administrator right. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.approve_chat_join_request:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#approvechatjoinrequest"
+msgstr ""
+
+#: of telebot.TeleBot.approve_chat_join_request:7
+#: telebot.TeleBot.decline_chat_join_request:7
+#: telebot.TeleBot.delete_chat_sticker_set:7 telebot.TeleBot.get_chat_member:5
+#: telebot.TeleBot.set_chat_administrator_custom_title:6
+#: telebot.TeleBot.set_chat_permissions:7
+#: telebot.TeleBot.set_chat_sticker_set:7
+msgid ""
+"Unique identifier for the target chat or username of the target "
+"supergroup (in the format @supergroupusername)"
+msgstr ""
+
+#: of telebot.TeleBot.approve_chat_join_request:11
+#: telebot.TeleBot.ban_chat_member:12
+#: telebot.TeleBot.decline_chat_join_request:11
+#: telebot.TeleBot.get_chat_member:8 telebot.TeleBot.get_user_chat_boosts:8
+#: telebot.TeleBot.get_user_profile_photos:6
+#: telebot.TeleBot.promote_chat_member:11
+#: telebot.TeleBot.restrict_chat_member:14
+#: telebot.TeleBot.set_chat_administrator_custom_title:10
+#: telebot.TeleBot.unban_chat_member:13
+msgid "Unique identifier of the target user"
+msgstr ""
+
+#: of telebot.TeleBot.approve_chat_join_request:14
+#: telebot.TeleBot.ban_chat_sender_chat:16
+#: telebot.TeleBot.decline_chat_join_request:14
+#: telebot.TeleBot.delete_chat_photo:12 telebot.TeleBot.delete_my_commands:16
+#: telebot.TeleBot.log_out:10 telebot.TeleBot.pin_chat_message:18
+#: telebot.TeleBot.promote_chat_member:69 telebot.TeleBot.remove_webhook:3
+#: telebot.TeleBot.set_chat_administrator_custom_title:17
+#: telebot.TeleBot.set_chat_description:13
+#: telebot.TeleBot.set_chat_menu_button:14 telebot.TeleBot.set_chat_photo:15
+#: telebot.TeleBot.set_chat_title:16 telebot.TeleBot.set_my_commands:17
+#: telebot.TeleBot.set_my_default_administrator_rights:17
+#: telebot.TeleBot.set_my_description:14 telebot.TeleBot.set_my_name:12
+#: telebot.TeleBot.set_my_short_description:14 telebot.TeleBot.set_webhook:46
+#: telebot.TeleBot.unban_chat_sender_chat:14
+#: telebot.TeleBot.unpin_all_chat_messages:11
+#: telebot.TeleBot.unpin_chat_message:14
+msgid "True on success."
+msgstr ""
+
+#: of telebot.TeleBot.ban_chat_member:1
+msgid ""
+"Use this method to ban a user in a group, a supergroup or a channel. In "
+"the case of supergroups and channels, the user will not be able to return"
+" to the chat on their own using invite links, etc., unless unbanned "
+"first. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.ban_chat_member:6
+msgid "Telegram documentation: https://core.telegram.org/bots/api#banchatmember"
+msgstr ""
+
+#: of telebot.TeleBot.ban_chat_member:8 telebot.TeleBot.restrict_chat_member:10
+msgid ""
+"Unique identifier for the target group or username of the target "
+"supergroup or channel (in the format @channelusername)"
+msgstr ""
+
+#: of telebot.TeleBot.ban_chat_member:15
+msgid ""
+"Date when the user will be unbanned, unix time. If user is banned for "
+"more than 366 days or less than 30 seconds from the current time they are"
+" considered to be banned forever"
+msgstr ""
+
+#: of telebot.TeleBot.ban_chat_member:19
+msgid ""
+"Bool: Pass True to delete all messages from the chat for the user that is"
+" being removed. If False, the user will be able to see messages in the "
+"group that were sent before the user was removed. Always True for "
+"supergroups and channels."
+msgstr ""
+
+#: of telebot.TeleBot.ban_chat_member:24
+#: telebot.TeleBot.delete_chat_sticker_set:10 telebot.TeleBot.delete_message:22
+#: telebot.TeleBot.delete_messages:14 telebot.TeleBot.delete_sticker_set:6
+#: telebot.TeleBot.delete_webhook:12 telebot.TeleBot.send_chat_action:25
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail:10
+#: telebot.TeleBot.set_sticker_emoji_list:10
+#: telebot.TeleBot.set_sticker_mask_position:11
+#: telebot.TeleBot.set_sticker_set_title:10
+msgid "Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.ban_chat_sender_chat:1
+msgid ""
+"Use this method to ban a channel chat in a supergroup or a channel. The "
+"owner of the chat will not be able to send messages and join live streams"
+" on behalf of the chat, unless it is unbanned first. The bot must be an "
+"administrator in the supergroup or channel for this to work and must have"
+" the appropriate administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.ban_chat_sender_chat:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#banchatsenderchat"
+msgstr ""
+
+#: of telebot.TeleBot.ban_chat_sender_chat:10
+#: telebot.TeleBot.close_forum_topic:7
+#: telebot.TeleBot.close_general_forum_topic:7 telebot.TeleBot.copy_message:5
+#: telebot.TeleBot.copy_messages:3 telebot.TeleBot.create_forum_topic:7
+#: telebot.TeleBot.delete_forum_topic:7 telebot.TeleBot.delete_message:13
+#: telebot.TeleBot.delete_messages:8 telebot.TeleBot.edit_forum_topic:7
+#: telebot.TeleBot.edit_general_forum_topic:7
+#: telebot.TeleBot.edit_message_live_location:13
+#: telebot.TeleBot.forward_message:8 telebot.TeleBot.forward_messages:3
+#: telebot.TeleBot.hide_general_forum_topic:7
+#: telebot.TeleBot.pin_chat_message:7 telebot.TeleBot.reopen_forum_topic:7
+#: telebot.TeleBot.reopen_general_forum_topic:7
+#: telebot.TeleBot.send_animation:6 telebot.TeleBot.send_audio:9
+#: telebot.TeleBot.send_dice:5 telebot.TeleBot.send_document:5
+#: telebot.TeleBot.send_game:5 telebot.TeleBot.send_location:5
+#: telebot.TeleBot.send_media_group:6 telebot.TeleBot.send_message:9
+#: telebot.TeleBot.send_photo:5 telebot.TeleBot.send_sticker:6
+#: telebot.TeleBot.send_video:5 telebot.TeleBot.send_video_note:6
+#: telebot.TeleBot.send_voice:7 telebot.TeleBot.set_chat_description:6
+#: telebot.TeleBot.set_chat_title:9
+#: telebot.TeleBot.stop_message_live_location:6
+#: telebot.TeleBot.unban_chat_sender_chat:8
+#: telebot.TeleBot.unhide_general_forum_topic:7
+#: telebot.TeleBot.unpin_all_forum_topic_messages:7
+#: telebot.TeleBot.unpin_chat_message:7
+msgid ""
+"Unique identifier for the target chat or username of the target channel "
+"(in the format @channelusername)"
+msgstr ""
+
+#: of telebot.TeleBot.ban_chat_sender_chat:13
+msgid "Unique identifier of the target sender chat"
+msgstr ""
+
+#: of telebot.TeleBot.callback_query_handler:1
+msgid ""
+"Handles new incoming callback query. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.CallbackQuery` object."
+msgstr ""
+
+#: of telebot.TeleBot.callback_query_handler:4
+#: telebot.TeleBot.channel_post_handler:10 telebot.TeleBot.chat_boost_handler:4
+#: telebot.TeleBot.chat_join_request_handler:5
+#: telebot.TeleBot.chat_member_handler:6
+#: telebot.TeleBot.chosen_inline_handler:5
+#: telebot.TeleBot.edited_channel_post_handler:10
+#: telebot.TeleBot.edited_message_handler:10 telebot.TeleBot.inline_handler:4
+#: telebot.TeleBot.message_reaction_count_handler:4
+#: telebot.TeleBot.message_reaction_handler:4
+#: telebot.TeleBot.my_chat_member_handler:5
+#: telebot.TeleBot.poll_answer_handler:5 telebot.TeleBot.poll_handler:4
+#: telebot.TeleBot.pre_checkout_query_handler:4
+#: telebot.TeleBot.register_callback_query_handler:6
+#: telebot.TeleBot.register_channel_post_handler:15
+#: telebot.TeleBot.register_chat_boost_handler:6
+#: telebot.TeleBot.register_chat_join_request_handler:6
+#: telebot.TeleBot.register_chat_member_handler:6
+#: telebot.TeleBot.register_chosen_inline_handler:6
+#: telebot.TeleBot.register_edited_channel_post_handler:15
+#: telebot.TeleBot.register_edited_message_handler:15
+#: telebot.TeleBot.register_inline_handler:6
+#: telebot.TeleBot.register_message_handler:15
+#: telebot.TeleBot.register_message_reaction_count_handler:6
+#: telebot.TeleBot.register_message_reaction_handler:6
+#: telebot.TeleBot.register_my_chat_member_handler:6
+#: telebot.TeleBot.register_poll_answer_handler:6
+#: telebot.TeleBot.register_poll_handler:6
+#: telebot.TeleBot.register_pre_checkout_query_handler:6
+#: telebot.TeleBot.register_removed_chat_boost_handler:6
+#: telebot.TeleBot.register_shipping_query_handler:6
+#: telebot.TeleBot.removed_chat_boost_handler:4
+#: telebot.TeleBot.shipping_query_handler:4
+msgid "Function executed as a filter"
+msgstr ""
+
+#: of telebot.TeleBot.callback_query_handler:7
+#: telebot.TeleBot.channel_post_handler:16 telebot.TeleBot.chat_boost_handler:7
+#: telebot.TeleBot.chat_join_request_handler:8
+#: telebot.TeleBot.chat_member_handler:9
+#: telebot.TeleBot.chosen_inline_handler:8
+#: telebot.TeleBot.edited_channel_post_handler:16
+#: telebot.TeleBot.edited_message_handler:19 telebot.TeleBot.inline_handler:7
+#: telebot.TeleBot.message_handler:50
+#: telebot.TeleBot.message_reaction_count_handler:7
+#: telebot.TeleBot.message_reaction_handler:7
+#: telebot.TeleBot.my_chat_member_handler:8
+#: telebot.TeleBot.poll_answer_handler:8 telebot.TeleBot.poll_handler:7
+#: telebot.TeleBot.pre_checkout_query_handler:7
+#: telebot.TeleBot.register_callback_query_handler:12
+#: telebot.TeleBot.register_channel_post_handler:21
+#: telebot.TeleBot.register_chat_boost_handler:11
+#: telebot.TeleBot.register_chat_join_request_handler:12
+#: telebot.TeleBot.register_chat_member_handler:12
+#: telebot.TeleBot.register_chosen_inline_handler:12
+#: telebot.TeleBot.register_edited_channel_post_handler:21
+#: telebot.TeleBot.register_edited_message_handler:24
+#: telebot.TeleBot.register_inline_handler:12
+#: telebot.TeleBot.register_message_handler:24
+#: telebot.TeleBot.register_message_reaction_count_handler:12
+#: telebot.TeleBot.register_message_reaction_handler:12
+#: telebot.TeleBot.register_my_chat_member_handler:12
+#: telebot.TeleBot.register_poll_answer_handler:12
+#: telebot.TeleBot.register_poll_handler:12
+#: telebot.TeleBot.register_pre_checkout_query_handler:11
+#: telebot.TeleBot.register_removed_chat_boost_handler:11
+#: telebot.TeleBot.register_shipping_query_handler:12
+#: telebot.TeleBot.removed_chat_boost_handler:7
+#: telebot.TeleBot.shipping_query_handler:7
+msgid "Optional keyword arguments(custom filters)"
+msgstr ""
+
+#: of telebot.TeleBot.channel_post_handler:1
+msgid ""
+"Handles new incoming channel post of any kind - text, photo, sticker, "
+"etc. As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+
+#: of telebot.TeleBot.channel_post_handler:4
+#: telebot.TeleBot.edited_channel_post_handler:4
+#: telebot.TeleBot.edited_message_handler:4 telebot.TeleBot.message_handler:34
+msgid "Optional list of strings (commands to handle)."
+msgstr ""
+
+#: of telebot.TeleBot.channel_post_handler:7
+#: telebot.TeleBot.edited_channel_post_handler:7
+#: telebot.TeleBot.edited_message_handler:7 telebot.TeleBot.message_handler:37
+msgid "Optional regular expression."
+msgstr ""
+
+#: of telebot.TeleBot.channel_post_handler:13
+#: telebot.TeleBot.edited_channel_post_handler:13
+#: telebot.TeleBot.edited_message_handler:13 telebot.TeleBot.message_handler:44
+#: telebot.TeleBot.register_channel_post_handler:6
+#: telebot.TeleBot.register_edited_channel_post_handler:6
+#: telebot.TeleBot.register_edited_message_handler:6
+#: telebot.TeleBot.register_message_handler:6
+msgid "Supported message content types. Must be a list. Defaults to ['text']."
+msgstr ""
+
+#: of telebot.TeleBot.chat_boost_handler:1
+msgid ""
+"Handles new incoming chat boost state. it passes "
+":class:`telebot.types.ChatBoostUpdated` object."
+msgstr ""
+
+#: of telebot.TeleBot.chat_join_request_handler:1
+msgid ""
+"Handles a request to join the chat has been sent. The bot must have the "
+"can_invite_users administrator right in the chat to receive these "
+"updates. As a parameter to the decorator function, it passes "
+":class:`telebot.types.ChatJoinRequest` object."
+msgstr ""
+
+#: of telebot.TeleBot.chat_member_handler:1
+msgid ""
+"Handles update in a status of a user in a chat. The bot must be an "
+"administrator in the chat and must explicitly specify “chat_member” in "
+"the list of allowed_updates to receive these updates. As a parameter to "
+"the decorator function, it passes "
+":class:`telebot.types.ChatMemberUpdated` object."
+msgstr ""
+
+#: of telebot.TeleBot.chosen_inline_handler:1
+msgid ""
+"Handles the result of an inline query that was chosen by a user and sent "
+"to their chat partner. Please see our documentation on the feedback "
+"collecting for details on how to enable these updates for your bot. As a "
+"parameter to the decorator function, it passes "
+":class:`telebot.types.ChosenInlineResult` object."
+msgstr ""
+
+#: of telebot.TeleBot.clear_reply_handlers:1
+#: telebot.TeleBot.clear_reply_handlers_by_message_id:1
+msgid ""
+"Clears all callback functions registered by register_for_reply() and "
+"register_for_reply_by_message_id()."
+msgstr ""
+
+#: of telebot.TeleBot.clear_reply_handlers:3
+msgid "The message for which we want to clear reply handlers"
+msgstr ""
+
+#: of telebot.TeleBot.clear_reply_handlers_by_message_id:3
+msgid "The message id for which we want to clear reply handlers"
+msgstr ""
+
+#: of telebot.TeleBot.clear_step_handler:1
+#: telebot.TeleBot.clear_step_handler_by_chat_id:1
+msgid "Clears all callback functions registered by register_next_step_handler()."
+msgstr ""
+
+#: of telebot.TeleBot.clear_step_handler:3
+msgid ""
+"The message for which we want to handle new message after that in same "
+"chat."
+msgstr ""
+
+#: of telebot.TeleBot.clear_step_handler_by_chat_id:3
+msgid "The chat for which we want to clear next step handlers"
+msgstr ""
+
+#: of telebot.TeleBot.close:1
+msgid ""
+"Use this method to close the bot instance before moving it from one local"
+" server to another. You need to delete the webhook before calling this "
+"method to ensure that the bot isn't launched again after server restart. "
+"The method will return error 429 in the first 10 minutes after the bot is"
+" launched. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.close:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#close"
+msgstr ""
+
+#: of telebot.TeleBot.close_forum_topic:1
+msgid ""
+"Use this method to close an open topic in a forum supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the can_manage_topics administrator rights, unless it is the creator of "
+"the topic. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.close_forum_topic:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#closeforumtopic"
+msgstr ""
+
+#: of telebot.TeleBot.close_forum_topic
+msgid "aram chat_id"
+msgstr ""
+
+#: of telebot.TeleBot.close_forum_topic:10
+msgid "Identifier of the topic to close"
+msgstr ""
+
+#: of telebot.TeleBot.close_general_forum_topic:1
+msgid ""
+"Use this method to close the 'General' topic in a forum supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.close_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#closegeneralforumtopic"
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:1 telebot.TeleBot.copy_messages:1
+msgid "Use this method to copy messages of any kind."
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#copymessage"
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:8 telebot.TeleBot.copy_messages:6
+#: telebot.TeleBot.forward_message:11 telebot.TeleBot.forward_messages:6
+msgid ""
+"Unique identifier for the chat where the original message was sent (or "
+"channel username in the format @channelusername)"
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:10 telebot.TeleBot.forward_message:14
+msgid "Message identifier in the chat specified in from_chat_id"
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:13
+msgid ""
+"New caption for media, 0-1024 characters after entities parsing. If not "
+"specified, the original caption is kept"
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:16
+msgid "Mode for parsing entities in the new caption."
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:19
+msgid ""
+"A JSON-serialized list of special entities that appear in the new "
+"caption, which can be specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:22 telebot.TeleBot.send_animation:48
+#: telebot.TeleBot.send_audio:36 telebot.TeleBot.send_contact:20
+#: telebot.TeleBot.send_dice:12 telebot.TeleBot.send_document:23
+#: telebot.TeleBot.send_game:11 telebot.TeleBot.send_invoice:67
+#: telebot.TeleBot.send_location:22 telebot.TeleBot.send_message:24
+#: telebot.TeleBot.send_photo:22 telebot.TeleBot.send_poll:44
+#: telebot.TeleBot.send_venue:27 telebot.TeleBot.send_video:35
+#: telebot.TeleBot.send_video_note:24 telebot.TeleBot.send_voice:28
+msgid ""
+"Sends the message silently. Users will receive a notification with no "
+"sound."
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:25 telebot.TeleBot.send_animation:34
+#: telebot.TeleBot.send_audio:57 telebot.TeleBot.send_contact:37
+#: telebot.TeleBot.send_dice:29 telebot.TeleBot.send_document:50
+#: telebot.TeleBot.send_game:26 telebot.TeleBot.send_invoice:95
+#: telebot.TeleBot.send_location:43 telebot.TeleBot.send_media_group:15
+#: telebot.TeleBot.send_message:27 telebot.TeleBot.send_photo:25
+#: telebot.TeleBot.send_poll:64 telebot.TeleBot.send_sticker:30
+#: telebot.TeleBot.send_venue:50 telebot.TeleBot.send_video:38
+#: telebot.TeleBot.send_video_note:42 telebot.TeleBot.send_voice:43
+msgid "Protects the contents of the sent message from forwarding and saving"
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:28 telebot.TeleBot.copy_message:31
+#: telebot.TeleBot.edit_message_text:23 telebot.TeleBot.polling:44
+#: telebot.TeleBot.send_animation:37 telebot.TeleBot.send_animation:40
+#: telebot.TeleBot.send_animation:63 telebot.TeleBot.send_audio:39
+#: telebot.TeleBot.send_audio:42 telebot.TeleBot.send_audio:63
+#: telebot.TeleBot.send_contact:23 telebot.TeleBot.send_contact:26
+#: telebot.TeleBot.send_dice:20 telebot.TeleBot.send_dice:23
+#: telebot.TeleBot.send_document:26 telebot.TeleBot.send_document:29
+#: telebot.TeleBot.send_document:56 telebot.TeleBot.send_location:25
+#: telebot.TeleBot.send_location:28 telebot.TeleBot.send_media_group:18
+#: telebot.TeleBot.send_media_group:21 telebot.TeleBot.send_message:21
+#: telebot.TeleBot.send_message:30 telebot.TeleBot.send_message:33
+#: telebot.TeleBot.send_photo:28 telebot.TeleBot.send_photo:31
+#: telebot.TeleBot.send_sticker:21 telebot.TeleBot.send_sticker:24
+#: telebot.TeleBot.send_venue:30 telebot.TeleBot.send_venue:33
+#: telebot.TeleBot.send_video:41 telebot.TeleBot.send_video:44
+#: telebot.TeleBot.send_video:64 telebot.TeleBot.send_video_note:27
+#: telebot.TeleBot.send_video_note:30 telebot.TeleBot.send_video_note:48
+#: telebot.TeleBot.send_voice:31 telebot.TeleBot.send_voice:34
+msgid "deprecated."
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:34 telebot.TeleBot.send_animation:43
+#: telebot.TeleBot.send_contact:29 telebot.TeleBot.send_dice:15
+#: telebot.TeleBot.send_document:15 telebot.TeleBot.send_game:20
+#: telebot.TeleBot.send_location:17 telebot.TeleBot.send_message:36
+#: telebot.TeleBot.send_photo:34 telebot.TeleBot.send_poll:53
+#: telebot.TeleBot.send_sticker:13 telebot.TeleBot.send_venue:36
+#: telebot.TeleBot.send_video:47 telebot.TeleBot.send_video_note:19
+#: telebot.TeleBot.send_voice:20
+msgid ""
+"Additional interface options. A JSON-serialized object for an inline "
+"keyboard, custom reply keyboard, instructions to remove reply keyboard or"
+" to force a reply from the user."
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:39 telebot.TeleBot.delete_message:19
+#: telebot.TeleBot.edit_message_live_location:23
+#: telebot.TeleBot.forward_message:20 telebot.TeleBot.send_animation:51
+#: telebot.TeleBot.send_audio:45 telebot.TeleBot.send_chat_action:19
+#: telebot.TeleBot.send_contact:34 telebot.TeleBot.send_dice:26
+#: telebot.TeleBot.send_document:32 telebot.TeleBot.send_location:31
+#: telebot.TeleBot.send_media_group:24 telebot.TeleBot.send_message:40
+#: telebot.TeleBot.send_photo:39 telebot.TeleBot.send_sticker:27
+#: telebot.TeleBot.send_venue:41 telebot.TeleBot.send_video:52
+#: telebot.TeleBot.send_video_note:33 telebot.TeleBot.send_voice:37
+#: telebot.TeleBot.stop_message_live_location:19
+msgid "Timeout in seconds for the request."
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:42 telebot.TeleBot.forward_message:23
+#: telebot.TeleBot.send_audio:60 telebot.TeleBot.send_dice:32
+#: telebot.TeleBot.send_location:46 telebot.TeleBot.send_message:43
+#: telebot.TeleBot.send_photo:42 telebot.TeleBot.send_voice:46
+msgid "Identifier of a message thread, in which the message will be sent"
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:45 telebot.TeleBot.send_dice:35
+#: telebot.TeleBot.send_photo:48
+msgid "Additional parameters for replies to messages"
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:48
+msgid "On success, the MessageId of the sent message is returned."
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:49 telebot.TeleBot.forward_messages:22
+msgid ":class:`telebot.types.MessageID`"
+msgstr ""
+
+#: of telebot.TeleBot.copy_messages:9 telebot.TeleBot.forward_messages:9
+msgid "Message identifiers in the chat specified in from_chat_id"
+msgstr ""
+
+#: of telebot.TeleBot.copy_messages:12 telebot.TeleBot.forward_message:5
+#: telebot.TeleBot.forward_messages:12
+msgid ""
+"Sends the message silently. Users will receive a notification with no "
+"sound"
+msgstr ""
+
+#: of telebot.TeleBot.copy_messages:15 telebot.TeleBot.forward_messages:15
+msgid "Identifier of a message thread, in which the messages will be sent"
+msgstr ""
+
+#: of telebot.TeleBot.copy_messages:18 telebot.TeleBot.forward_message:17
+#: telebot.TeleBot.forward_messages:18
+msgid "Protects the contents of the forwarded message from forwarding and saving"
+msgstr ""
+
+#: of telebot.TeleBot.copy_messages:21
+msgid "Pass True to copy the messages without their captions"
+msgstr ""
+
+#: of telebot.TeleBot.copy_messages:24
+msgid "On success, an array of MessageId of the sent messages is returned."
+msgstr ""
+
+#: of telebot.TeleBot.copy_messages:25
+msgid ":obj:`list` of :class:`telebot.types.MessageID`"
+msgstr ""
+
+#: of telebot.TeleBot.create_chat_invite_link:1
+msgid ""
+"Use this method to create an additional invite link for a chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate administrator rights. The link can be revoked using the "
+"method revokeChatInviteLink. Returns the new invite link as "
+"ChatInviteLink object."
+msgstr ""
+
+#: of telebot.TeleBot.create_chat_invite_link:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createchatinvitelink"
+msgstr ""
+
+#: of telebot.TeleBot.create_chat_invite_link:8
+#: telebot.TeleBot.edit_chat_invite_link:6
+#: telebot.TeleBot.export_chat_invite_link:6
+#: telebot.TeleBot.revoke_chat_invite_link:7
+msgid ""
+"Id: Unique identifier for the target chat or username of the target "
+"channel (in the format @channelusername)"
+msgstr ""
+
+#: of telebot.TeleBot.create_chat_invite_link:12
+#: telebot.TeleBot.edit_chat_invite_link:10
+msgid "Invite link name; 0-32 characters"
+msgstr ""
+
+#: of telebot.TeleBot.create_chat_invite_link:15
+#: telebot.TeleBot.edit_chat_invite_link:16
+msgid "Point in time (Unix timestamp) when the link will expire"
+msgstr ""
+
+#: of telebot.TeleBot.create_chat_invite_link:18
+#: telebot.TeleBot.edit_chat_invite_link:19
+msgid "Maximum number of users that can be members of the chat simultaneously"
+msgstr ""
+
+#: of telebot.TeleBot.create_chat_invite_link:21
+#: telebot.TeleBot.edit_chat_invite_link:22
+msgid ""
+"True, if users joining the chat via the link need to be approved by chat "
+"administrators. If True, member_limit can't be specified"
+msgstr ""
+
+#: of telebot.TeleBot.create_chat_invite_link:24
+#: telebot.TeleBot.edit_chat_invite_link:25
+#: telebot.TeleBot.revoke_chat_invite_link:14
+msgid "Returns the new invite link as ChatInviteLink object."
+msgstr ""
+
+#: of telebot.TeleBot.create_chat_invite_link:25
+#: telebot.TeleBot.edit_chat_invite_link:26
+#: telebot.TeleBot.revoke_chat_invite_link:15
+msgid ":class:`telebot.types.ChatInviteLink`"
+msgstr ""
+
+#: of telebot.TeleBot.create_forum_topic:1
+msgid ""
+"Use this method to create a topic in a forum supergroup chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"can_manage_topics administrator rights. Returns information about the "
+"created topic as a ForumTopic object."
+msgstr ""
+
+#: of telebot.TeleBot.create_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createforumtopic"
+msgstr ""
+
+#: of telebot.TeleBot.create_forum_topic:10
+msgid "Name of the topic, 1-128 characters"
+msgstr ""
+
+#: of telebot.TeleBot.create_forum_topic:13
+msgid ""
+"Color of the topic icon in RGB format. Currently, must be one of "
+"0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F"
+msgstr ""
+
+#: of telebot.TeleBot.create_forum_topic:16
+msgid ""
+"Custom emoji for the topic icon. Must be an emoji of type “tgs” and must "
+"be exactly 1 character long"
+msgstr ""
+
+#: of telebot.TeleBot.create_forum_topic:19
+msgid ""
+"On success, information about the created topic is returned as a "
+"ForumTopic object."
+msgstr ""
+
+#: of telebot.TeleBot.create_forum_topic:20
+msgid ":class:`telebot.types.ForumTopic`"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:1
+msgid ""
+"Use this method to create a link for an invoice. Returns the created "
+"invoice link as String on success."
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createinvoicelink"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:7 telebot.TeleBot.send_invoice:8
+msgid "Product name, 1-32 characters"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:10 telebot.TeleBot.send_invoice:11
+msgid "Product description, 1-255 characters"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:13 telebot.TeleBot.send_invoice:14
+msgid ""
+"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to "
+"the user, use for your internal processes."
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:17 telebot.TeleBot.send_invoice:18
+msgid "Payments provider token, obtained via @Botfather"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:20 telebot.TeleBot.send_invoice:21
+msgid ""
+"Three-letter ISO 4217 currency code, see "
+"https://core.telegram.org/bots/payments#supported-currencies"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:24 telebot.TeleBot.send_invoice:25
+msgid ""
+"Price breakdown, a list of components (e.g. product price, tax, discount,"
+" delivery cost, delivery tax, bonus, etc.)"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:28 telebot.TeleBot.send_invoice:87
+msgid "The maximum accepted amount for tips in the smallest units of the currency"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:31 telebot.TeleBot.send_invoice:90
+msgid ""
+"A JSON-serialized array of suggested amounts of tips in the smallest "
+"units of the currency. At most 4 suggested tip amounts can be specified."
+" The suggested tip amounts must be positive, passed in a strictly "
+"increased order and must not exceed max_tip_amount."
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:36 telebot.TeleBot.send_invoice:80
+msgid ""
+"A JSON-serialized data about the invoice, which will be shared with the "
+"payment provider. A detailed description of required fields should be "
+"provided by the payment provider."
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:40
+msgid ""
+"URL of the product photo for the invoice. Can be a photo of the goods or "
+"a photo of the invoice. People like it better when they see a photo of "
+"what they are paying for."
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:44 telebot.TeleBot.send_invoice:37
+msgid "Photo size in bytes"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:47 telebot.TeleBot.send_invoice:40
+msgid "Photo width"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:50 telebot.TeleBot.send_invoice:43
+msgid "Photo height"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:53 telebot.TeleBot.send_invoice:46
+msgid "Pass True, if you require the user's full name to complete the order"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:56 telebot.TeleBot.send_invoice:49
+msgid "Pass True, if you require the user's phone number to complete the order"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:59 telebot.TeleBot.send_invoice:52
+msgid "Pass True, if you require the user's email to complete the order"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:62 telebot.TeleBot.send_invoice:55
+msgid ""
+"Pass True, if you require the user's shipping address to complete the "
+"order"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:65 telebot.TeleBot.send_invoice:61
+msgid "Pass True, if user's phone number should be sent to provider"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:68 telebot.TeleBot.send_invoice:64
+msgid "Pass True, if user's email address should be sent to provider"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:71 telebot.TeleBot.send_invoice:58
+msgid "Pass True, if the final price depends on the shipping method"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:74
+msgid "Created invoice link as String on success."
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:75
+#: telebot.TeleBot.export_chat_invite_link:11 telebot.TeleBot.get_file_url:7
+msgid ":obj:`str`"
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:1
+msgid ""
+"Use this method to create new sticker set owned by a user. The bot will "
+"be able to edit the created sticker set. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createnewstickerset"
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:8
+msgid ""
+"Fields *_sticker are deprecated, pass a list of stickers to stickers "
+"parameter instead."
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:13
+msgid ""
+"Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., "
+"animals). Can contain only English letters, digits and underscores. Must "
+"begin with a letter, can't contain consecutive underscores and must end "
+"in \"_by_\". is case insensitive. 1-64 "
+"characters."
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:18
+msgid "Sticker set title, 1-64 characters"
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:35
+msgid ""
+"Pass True, if a set of mask stickers should be created. Deprecated since "
+"Bot API 6.2, use sticker_type instead."
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:39
+msgid ""
+"Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. "
+"By default, a regular sticker set is created."
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:45
+msgid ""
+"Pass True if stickers in the sticker set must be repainted to the color "
+"of text when used in messages, the accent color if used as emoji status, "
+"white on chat photos, or another appropriate color based on context; for "
+"custom emoji sticker sets only"
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:50
+msgid "List of stickers to be added to the set"
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:53
+msgid ""
+"Format of stickers in the set, must be one of “static”, “animated”, "
+"“video”"
+msgstr ""
+
+#: of telebot.TeleBot.decline_chat_join_request:1
+msgid ""
+"Use this method to decline a chat join request. The bot must be an "
+"administrator in the chat for this to work and must have the "
+"can_invite_users administrator right. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.decline_chat_join_request:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#declinechatjoinrequest"
+msgstr ""
+
+#: of telebot.TeleBot.delete_chat_photo:1
+msgid ""
+"Use this method to delete a chat photo. Photos can't be changed for "
+"private chats. The bot must be an administrator in the chat for this to "
+"work and must have the appropriate admin rights. Returns True on success."
+" Note: In regular groups (non-supergroups), this method will only work if"
+" the ‘All Members Are Admins’ setting is off in the target group."
+msgstr ""
+
+#: of telebot.TeleBot.delete_chat_photo:6
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletechatphoto"
+msgstr ""
+
+#: of telebot.TeleBot.delete_chat_photo:8 telebot.TeleBot.set_chat_photo:9
+#: telebot.TeleBot.unpin_all_chat_messages:7
+msgid ""
+"Int or Str: Unique identifier for the target chat or username of the "
+"target channel (in the format @channelusername)"
+msgstr ""
+
+#: of telebot.TeleBot.delete_chat_sticker_set:1
+msgid ""
+"Use this method to delete a group sticker set from a supergroup. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate admin rights. Use the field can_set_sticker_set optionally "
+"returned in getChat requests to check if the bot can use this method. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.delete_chat_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletechatstickerset"
+msgstr ""
+
+#: of telebot.TeleBot.delete_forum_topic:1
+msgid ""
+"Use this method to delete a topic in a forum supergroup chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"can_manage_topics administrator rights, unless it is the creator of the "
+"topic. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.delete_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deleteforumtopic"
+msgstr ""
+
+#: of telebot.TeleBot.delete_forum_topic:10
+msgid "Identifier of the topic to delete"
+msgstr ""
+
+#: of telebot.TeleBot.delete_message:1
+msgid ""
+"Use this method to delete a message, including service messages, with the"
+" following limitations: - A message can only be deleted if it was sent "
+"less than 48 hours ago. - A dice message in a private chat can only be "
+"deleted if it was sent more than 24 hours ago. - Bots can delete outgoing"
+" messages in private chats, groups, and supergroups. - Bots can delete "
+"incoming messages in private chats. - Bots granted can_post_messages "
+"permissions can delete outgoing messages in channels. - If the bot is an "
+"administrator of a group, it can delete any message there. - If the bot "
+"has can_delete_messages permission in a supergroup or a channel, it can "
+"delete any message there. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.delete_message:11
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletemessage"
+msgstr ""
+
+#: of telebot.TeleBot.delete_message:16
+msgid "Identifier of the message to delete"
+msgstr ""
+
+#: of telebot.TeleBot.delete_messages:1
+msgid ""
+"Use this method to delete multiple messages in a chat. The number of "
+"messages to be deleted must not exceed 100. If the chat is a private "
+"chat, the user must be an administrator of the chat for this to work and "
+"must have the appropriate admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.delete_messages:6
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletemessages"
+msgstr ""
+
+#: of telebot.TeleBot.delete_messages:11
+msgid "Identifiers of the messages to be deleted"
+msgstr ""
+
+#: of telebot.TeleBot.delete_my_commands:1
+msgid ""
+"Use this method to delete the list of the bot's commands for the given "
+"scope and user language. After deletion, higher level commands will be "
+"shown to affected users. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.delete_my_commands:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletemycommands"
+msgstr ""
+
+#: of telebot.TeleBot.delete_my_commands:7 telebot.TeleBot.get_my_commands:6
+#: telebot.TeleBot.set_my_commands:8
+msgid ""
+"The scope of users for which the commands are relevant. Defaults to "
+"BotCommandScopeDefault."
+msgstr ""
+
+#: of telebot.TeleBot.delete_my_commands:11 telebot.TeleBot.get_my_commands:10
+#: telebot.TeleBot.set_my_commands:12
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, commands will be applied "
+"to all users from the given scope, for whose language there are no "
+"dedicated commands"
+msgstr ""
+
+#: of telebot.TeleBot.delete_state:1
+msgid "Delete the current state of a user."
+msgstr ""
+
+#: of telebot.TeleBot.delete_sticker_from_set:1
+msgid ""
+"Use this method to delete a sticker from a set created by the bot. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.delete_sticker_from_set:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletestickerfromset"
+msgstr ""
+
+#: of telebot.TeleBot.delete_sticker_from_set:5
+#: telebot.TeleBot.set_sticker_position_in_set:5
+msgid "File identifier of the sticker"
+msgstr ""
+
+#: of telebot.TeleBot.delete_sticker_set:1
+msgid "Use this method to delete a sticker set. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.delete_webhook:1
+msgid ""
+"Use this method to remove webhook integration if you decide to switch "
+"back to getUpdates. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.delete_webhook:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletewebhook"
+msgstr ""
+
+#: of telebot.TeleBot.delete_webhook:6 telebot.TeleBot.run_webhooks:36
+#: telebot.TeleBot.set_webhook:36
+msgid "Pass True to drop all pending updates, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.delete_webhook:9 telebot.TeleBot.run_webhooks:39
+msgid "Request connection timeout, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.disable_save_next_step_handlers:1
+#: telebot.TeleBot.disable_save_reply_handlers:1
+msgid "Disable saving next step handlers (by default saving disable)"
+msgstr ""
+
+#: of telebot.TeleBot.disable_save_next_step_handlers:3
+msgid ""
+"This function is left to keep backward compatibility whose purpose was to"
+" disable file saving capability for handlers. For the same purpose, "
+"MemoryHandlerBackend is reassigned as a new next_step_backend backend "
+"instead of FileHandlerBackend."
+msgstr ""
+
+#: of telebot.TeleBot.disable_save_reply_handlers:3
+msgid ""
+"This function is left to keep backward compatibility whose purpose was to"
+" disable file saving capability for handlers. For the same purpose, "
+"MemoryHandlerBackend is reassigned as a new reply_backend backend instead"
+" of FileHandlerBackend."
+msgstr ""
+
+#: of telebot.TeleBot.download_file:1
+msgid "Downloads file."
+msgstr ""
+
+#: of telebot.TeleBot.download_file:3
+msgid "Path where the file should be downloaded."
+msgstr ""
+
+#: of telebot.TeleBot.download_file:6
+msgid "bytes"
+msgstr ""
+
+#: of telebot.TeleBot.download_file:7
+msgid ":obj:`bytes`"
+msgstr ""
+
+#: of telebot.TeleBot.edit_chat_invite_link:1
+msgid ""
+"Use this method to edit a non-primary invite link created by the bot. The"
+" bot must be an administrator in the chat for this to work and must have "
+"the appropriate admin rights."
+msgstr ""
+
+#: of telebot.TeleBot.edit_chat_invite_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editchatinvitelink"
+msgstr ""
+
+#: of telebot.TeleBot.edit_chat_invite_link:13
+msgid "The invite link to edit"
+msgstr ""
+
+#: of telebot.TeleBot.edit_forum_topic:1
+msgid ""
+"Use this method to edit name and icon of a topic in a forum supergroup "
+"chat. The bot must be an administrator in the chat for this to work and "
+"must have can_manage_topics administrator rights, unless it is the "
+"creator of the topic. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.edit_forum_topic:5
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#editforumtopic"
+msgstr ""
+
+#: of telebot.TeleBot.edit_forum_topic:10
+msgid "Identifier of the topic to edit"
+msgstr ""
+
+#: of telebot.TeleBot.edit_forum_topic:13
+msgid ""
+"Optional, New name of the topic, 1-128 characters. If not specififed or "
+"empty, the current name of the topic will be kept"
+msgstr ""
+
+#: of telebot.TeleBot.edit_forum_topic:17
+msgid ""
+"Optional, New unique identifier of the custom emoji shown as the topic "
+"icon. Use getForumTopicIconStickers to get all allowed custom emoji "
+"identifiers. Pass an empty string to remove the icon. If not specified, "
+"the current icon will be kept"
+msgstr ""
+
+#: of telebot.TeleBot.edit_general_forum_topic:1
+msgid ""
+"Use this method to edit the name of the 'General' topic in a forum "
+"supergroup chat. The bot must be an administrator in the chat for this to"
+" work and must have can_manage_topics administrator rights. Returns True "
+"on success."
+msgstr ""
+
+#: of telebot.TeleBot.edit_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editgeneralforumtopic"
+msgstr ""
+
+#: of telebot.TeleBot.edit_general_forum_topic:10
+msgid "New topic name, 1-128 characters"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:1
+msgid "Use this method to edit captions of messages."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagecaption"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:5
+msgid "New caption of the message"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:8
+msgid ""
+"Required if inline_message_id is not specified. Unique identifier for the"
+" target chat or username of the target channel"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:11
+msgid "Required if inline_message_id is not specified."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:14
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the inline "
+"message."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:17
+msgid "New caption of the message, 0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:20
+msgid ""
+"A JSON-serialized array of objects that describe how the caption should "
+"be parsed."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:23
+#: telebot.TeleBot.edit_message_media:19
+#: telebot.TeleBot.edit_message_reply_markup:14
+#: telebot.TeleBot.edit_message_text:26
+msgid "A JSON-serialized object for an inline keyboard."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:26
+#: telebot.TeleBot.edit_message_media:22
+#: telebot.TeleBot.edit_message_reply_markup:17
+#: telebot.TeleBot.edit_message_text:32
+msgid ""
+"On success, if edited message is sent by the bot, the edited Message is "
+"returned, otherwise True is returned."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_caption:27
+msgid ":obj:`types.Message` | :obj:`bool`"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:3
+msgid ""
+"Use this method to edit live location messages. A location can be edited "
+"until its live_period expires or editing is explicitly"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:2
+msgid ""
+"disabled by a call to stopMessageLiveLocation. On success, if the edited "
+"message is not an inline message, the edited Message is returned, "
+"otherwise True is returned."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagelivelocation"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:7
+msgid "Latitude of new location"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:10
+msgid "Longitude of new location"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:16
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the message"
+" to edit"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:19
+#: telebot.TeleBot.stop_message_live_location:15
+msgid "A JSON-serialized object for a new inline keyboard."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:26
+#: telebot.TeleBot.edit_message_media:16
+#: telebot.TeleBot.edit_message_reply_markup:11
+#: telebot.TeleBot.edit_message_text:14 telebot.TeleBot.get_game_high_scores:19
+#: telebot.TeleBot.set_game_score:20
+msgid ""
+"Required if chat_id and message_id are not specified. Identifier of the "
+"inline message"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:29
+#: telebot.TeleBot.send_location:34
+msgid "The radius of uncertainty for the location, measured in meters; 0-1500"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:32
+msgid ""
+"Direction in which the user is moving, in degrees. Must be between 1 and "
+"360 if specified."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:35
+msgid ""
+"The maximum distance for proximity alerts about approaching another chat "
+"member, in meters. Must be between 1 and 100000 if specified."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:38
+msgid ""
+"On success, if the edited message is not an inline message, the edited "
+"Message is returned, otherwise True is returned."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:39
+#: telebot.TeleBot.stop_message_live_location:23
+msgid ":class:`telebot.types.Message` or bool"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_media:1
+msgid ""
+"Use this method to edit animation, audio, document, photo, or video "
+"messages. If a message is a part of a message album, then it can be "
+"edited only to a photo or a video. Otherwise, message type can be changed"
+" arbitrarily. When inline message is edited, new file can't be uploaded. "
+"Use previously uploaded file via its file_id or specify a URL."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_media:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagemedia"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_media:8
+msgid "A JSON-serialized object for a new media content of the message"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_media:10
+#: telebot.TeleBot.edit_message_reply_markup:5
+#: telebot.TeleBot.edit_message_text:8 telebot.TeleBot.get_game_high_scores:13
+#: telebot.TeleBot.set_game_score:14
+msgid ""
+"Required if inline_message_id is not specified. Unique identifier for the"
+" target chat or username of the target channel (in the format "
+"@channelusername)"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_media:13
+#: telebot.TeleBot.edit_message_reply_markup:8
+#: telebot.TeleBot.edit_message_text:11 telebot.TeleBot.get_game_high_scores:16
+#: telebot.TeleBot.set_game_score:17
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the sent "
+"message"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_media:23
+#: telebot.TeleBot.edit_message_reply_markup:18
+#: telebot.TeleBot.edit_message_text:33 telebot.TeleBot.set_game_score:27
+msgid ":obj:`types.Message` or :obj:`bool`"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_reply_markup:1
+msgid "Use this method to edit only the reply markup of messages."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_reply_markup:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagereplymarkup"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_text:1
+msgid "Use this method to edit text and game messages."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_text:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#editmessagetext"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_text:5
+msgid "New text of the message, 1-4096 characters after entities parsing"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_text:17 telebot.TeleBot.send_message:15
+msgid "Mode for parsing entities in the message text."
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_text:20
+msgid ""
+"List of special entities that appear in the message text, which can be "
+"specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_text:29
+msgid ""
+"A JSON-serialized object for options used to automatically generate "
+"previews for links."
+msgstr ""
+
+#: of telebot.TeleBot.edited_channel_post_handler:1
+msgid ""
+"Handles new version of a channel post that is known to the bot and was "
+"edited. As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+
+#: of telebot.TeleBot.edited_message_handler:1
+msgid ""
+"Handles new version of a message that is known to the bot and was edited."
+" As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+
+#: of telebot.TeleBot.edited_message_handler:16
+#: telebot.TeleBot.message_handler:47
+msgid "list of chat types"
+msgstr ""
+
+#: of telebot.TeleBot.enable_save_next_step_handlers:1
+msgid "Enable saving next step handlers (by default saving disabled)"
+msgstr ""
+
+#: of telebot.TeleBot.enable_save_next_step_handlers:3
+#: telebot.TeleBot.enable_save_reply_handlers:3
+msgid ""
+"This function explicitly assigns FileHandlerBackend (instead of Saver) "
+"just to keep backward compatibility whose purpose was to enable file "
+"saving capability for handlers. And the same implementation is now "
+"available with FileHandlerBackend"
+msgstr ""
+
+#: of telebot.TeleBot.enable_save_next_step_handlers:7
+#: telebot.TeleBot.enable_save_reply_handlers:7
+msgid "Delay between changes in handlers and saving, defaults to 120"
+msgstr ""
+
+#: of telebot.TeleBot.enable_save_next_step_handlers:10
+msgid "Filename of save file, defaults to \"./.handler-saves/step.save\""
+msgstr ""
+
+#: of telebot.TeleBot.enable_save_reply_handlers:1
+msgid "Enable saving reply handlers (by default saving disable)"
+msgstr ""
+
+#: of telebot.TeleBot.enable_save_reply_handlers:10
+msgid "Filename of save file, defaults to \"./.handler-saves/reply.save\""
+msgstr ""
+
+#: of telebot.TeleBot.enable_saving_states:1
+msgid "Enable saving states (by default saving disabled)"
+msgstr ""
+
+#: of telebot.TeleBot.enable_saving_states:4
+msgid ""
+"It is recommended to pass a :class:`~telebot.storage.StatePickleStorage` "
+"instance as state_storage to TeleBot class."
+msgstr ""
+
+#: of telebot.TeleBot.enable_saving_states:7
+msgid "Filename of saving file, defaults to \"./.state-save/states.pkl\""
+msgstr ""
+
+#: of telebot.TeleBot.export_chat_invite_link:1
+msgid ""
+"Use this method to export an invite link to a supergroup or a channel. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights."
+msgstr ""
+
+#: of telebot.TeleBot.export_chat_invite_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#exportchatinvitelink"
+msgstr ""
+
+#: of telebot.TeleBot.export_chat_invite_link:10
+msgid "exported invite link as String on success."
+msgstr ""
+
+#: of telebot.TeleBot.forward_message:1 telebot.TeleBot.forward_messages:1
+msgid "Use this method to forward messages of any kind."
+msgstr ""
+
+#: of telebot.TeleBot.forward_message:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#forwardmessage"
+msgstr ""
+
+#: of telebot.TeleBot.forward_message:26 telebot.TeleBot.forward_messages:21
+#: telebot.TeleBot.reply_to:11 telebot.TeleBot.send_animation:69
+#: telebot.TeleBot.send_audio:69 telebot.TeleBot.send_contact:46
+#: telebot.TeleBot.send_dice:38 telebot.TeleBot.send_document:62
+#: telebot.TeleBot.send_game:35 telebot.TeleBot.send_invoice:104
+#: telebot.TeleBot.send_location:52 telebot.TeleBot.send_message:52
+#: telebot.TeleBot.send_photo:51 telebot.TeleBot.send_poll:73
+#: telebot.TeleBot.send_sticker:45 telebot.TeleBot.send_venue:59
+#: telebot.TeleBot.send_video:70 telebot.TeleBot.send_video_note:54
+#: telebot.TeleBot.send_voice:52
+msgid "On success, the sent Message is returned."
+msgstr ""
+
+#: of telebot.TeleBot.forward_message:27 telebot.TeleBot.reply_to:12
+#: telebot.TeleBot.send_animation:70 telebot.TeleBot.send_audio:70
+#: telebot.TeleBot.send_contact:47 telebot.TeleBot.send_dice:39
+#: telebot.TeleBot.send_document:63 telebot.TeleBot.send_location:53
+#: telebot.TeleBot.send_message:53 telebot.TeleBot.send_photo:52
+#: telebot.TeleBot.send_sticker:46 telebot.TeleBot.send_venue:60
+#: telebot.TeleBot.send_video:71 telebot.TeleBot.send_video_note:55
+msgid ":class:`telebot.types.Message`"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat:1
+msgid ""
+"Use this method to get up to date information about the chat (current "
+"name of the user for one-on-one conversations, current username of a "
+"user, group or channel, etc.). Returns a Chat object on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_chat:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getchat"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat:6 telebot.TeleBot.get_chat_administrators:7
+#: telebot.TeleBot.get_chat_member_count:5 telebot.TeleBot.leave_chat:5
+#: telebot.TeleBot.set_message_reaction:5
+msgid ""
+"Unique identifier for the target chat or username of the target "
+"supergroup or channel (in the format @channelusername)"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat:9
+msgid "Chat information"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat:10
+msgid ":class:`telebot.types.Chat`"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_administrators:1
+msgid ""
+"Use this method to get a list of administrators in a chat. On success, "
+"returns an Array of ChatMember objects that contains information about "
+"all chat administrators except other bots."
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_administrators:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getchatadministrators"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_administrators:9
+msgid "List made of ChatMember objects."
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_administrators:10
+msgid ":obj:`list` of :class:`telebot.types.ChatMember`"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_member:1
+msgid ""
+"Use this method to get information about a member of a chat. Returns a "
+"ChatMember object on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_member:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getchatmember"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_member:11
+msgid "Returns ChatMember object on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_member:12
+msgid ":class:`telebot.types.ChatMember`"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_member_count:1
+msgid "Use this method to get the number of members in a chat."
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_member_count:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getchatmembercount"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_member_count:8
+msgid "Number of members in the chat."
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_member_count:9
+msgid ":obj:`int`"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_menu_button:1
+msgid ""
+"Use this method to get the current value of the bot's menu button in a "
+"private chat, or the default menu button. Returns MenuButton on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_menu_button:5
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#getchatmenubutton"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_menu_button:7
+msgid ""
+"Unique identifier for the target private chat. If not specified, default "
+"bot's menu button will be returned."
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_menu_button:11
+msgid "types.MenuButton"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_menu_button:12
+msgid ":class:`telebot.types.MenuButton`"
+msgstr ""
+
+#: of telebot.TeleBot.get_custom_emoji_stickers:1
+msgid ""
+"Use this method to get information about custom emoji stickers by their "
+"identifiers. Returns an Array of Sticker objects."
+msgstr ""
+
+#: of telebot.TeleBot.get_custom_emoji_stickers:4
+msgid ""
+"List of custom emoji identifiers. At most 200 custom emoji identifiers "
+"can be specified."
+msgstr ""
+
+#: of telebot.TeleBot.get_custom_emoji_stickers:7
+msgid "Returns an Array of Sticker objects."
+msgstr ""
+
+#: of telebot.TeleBot.get_custom_emoji_stickers:8
+msgid ":obj:`list` of :class:`telebot.types.Sticker`"
+msgstr ""
+
+#: of telebot.TeleBot.get_file:1
+msgid ""
+"Use this method to get basic info about a file and prepare it for "
+"downloading. For the moment, bots can download files of up to 20MB in "
+"size. On success, a File object is returned. It is guaranteed that the "
+"link will be valid for at least 1 hour. When the link expires, a new one "
+"can be requested by calling get_file again."
+msgstr ""
+
+#: of telebot.TeleBot.get_file:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getfile"
+msgstr ""
+
+#: of telebot.TeleBot.get_file:9
+msgid "File identifier"
+msgstr ""
+
+#: of telebot.TeleBot.get_file:12 telebot.TeleBot.upload_sticker_file:21
+msgid ":class:`telebot.types.File`"
+msgstr ""
+
+#: of telebot.TeleBot.get_file_url:1
+msgid "Get a valid URL for downloading a file."
+msgstr ""
+
+#: of telebot.TeleBot.get_file_url:3
+msgid "File identifier to get download URL for."
+msgstr ""
+
+#: of telebot.TeleBot.get_file_url:6
+msgid "URL for downloading the file."
+msgstr ""
+
+#: of telebot.TeleBot.get_forum_topic_icon_stickers:1
+msgid ""
+"Use this method to get custom emoji stickers, which can be used as a "
+"forum topic icon by any user. Requires no parameters. Returns an Array of"
+" Sticker objects."
+msgstr ""
+
+#: of telebot.TeleBot.get_forum_topic_icon_stickers:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getforumtopiciconstickers"
+msgstr ""
+
+#: of telebot.TeleBot.get_forum_topic_icon_stickers:6
+msgid "On success, a list of StickerSet objects is returned."
+msgstr ""
+
+#: of telebot.TeleBot.get_forum_topic_icon_stickers:7
+msgid "List[:class:`telebot.types.StickerSet`]"
+msgstr ""
+
+#: of telebot.TeleBot.get_game_high_scores:1
+msgid ""
+"Use this method to get data for high score tables. Will return the score "
+"of the specified user and several of their neighbors in a game. On "
+"success, returns an Array of GameHighScore objects."
+msgstr ""
+
+#: of telebot.TeleBot.get_game_high_scores:4
+msgid ""
+"This method will currently return scores for the target user, plus two of"
+" their closest neighbors on each side. Will also return the top three "
+"users if the user and their neighbors are not among them. Please note "
+"that this behavior is subject to change."
+msgstr ""
+
+#: of telebot.TeleBot.get_game_high_scores:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getgamehighscores"
+msgstr ""
+
+#: of telebot.TeleBot.get_game_high_scores:10 telebot.TeleBot.retrieve_data:3
+#: telebot.TeleBot.set_game_score:5 telebot.TeleBot.set_sticker_set_thumbnail:9
+msgid "User identifier"
+msgstr ""
+
+#: of telebot.TeleBot.get_game_high_scores:22
+msgid "On success, returns an Array of GameHighScore objects."
+msgstr ""
+
+#: of telebot.TeleBot.get_me:1
+msgid ""
+"A simple method for testing your bot's authentication token. Requires no "
+"parameters. Returns basic information about the bot in form of a User "
+"object."
+msgstr ""
+
+#: of telebot.TeleBot.get_me:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getme"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_commands:1
+msgid ""
+"Use this method to get the current list of the bot's commands. Returns "
+"List of BotCommand on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_my_commands:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getmycommands"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_commands:15
+msgid "List of BotCommand on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_my_commands:16
+msgid ":obj:`list` of :class:`telebot.types.BotCommand`"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_default_administrator_rights:1
+msgid ""
+"Use this method to get the current default administrator rights of the "
+"bot. Returns ChatAdministratorRights on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_my_default_administrator_rights:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getmydefaultadministratorrights"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_default_administrator_rights:6
+msgid ""
+"Pass True to get the default administrator rights of the bot in channels."
+" Otherwise, the default administrator rights of the bot for groups and "
+"supergroups will be returned."
+msgstr ""
+
+#: of telebot.TeleBot.get_my_default_administrator_rights:9
+msgid "Returns ChatAdministratorRights on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_my_default_administrator_rights:10
+msgid ":class:`telebot.types.ChatAdministratorRights`"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_description:1
+msgid ""
+"Use this method to get the current bot description for the given user "
+"language. Returns BotDescription on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_my_description:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getmydescription"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_description:6
+#: telebot.TeleBot.get_my_short_description:6
+msgid "A two-letter ISO 639-1 language code or an empty string"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_description:9
+msgid ":class:`telebot.types.BotDescription`"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_name:1
+msgid ""
+"Use this method to get the current bot name for the given user language. "
+"Returns BotName on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_my_name:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getmyname"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_name:6
+msgid "Optional. A two-letter ISO 639-1 language code or an empty string"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_name:9
+msgid ":class:`telebot.types.BotName`"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_short_description:1
+msgid ""
+"Use this method to get the current bot short description for the given "
+"user language. Returns BotShortDescription on success."
+msgstr ""
+
+#: of telebot.TeleBot.get_my_short_description:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getmyshortdescription"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_short_description:9
+msgid ":class:`telebot.types.BotShortDescription`"
+msgstr ""
+
+#: of telebot.TeleBot.get_state:1
+msgid ""
+"Gets current state of a user. Not recommended to use this method. But it "
+"is ok for debugging."
+msgstr ""
+
+#: of telebot.TeleBot.get_state:10
+msgid "state of a user"
+msgstr ""
+
+#: of telebot.TeleBot.get_state:11
+msgid ":obj:`int` or :obj:`str` or :class:`telebot.types.State`"
+msgstr ""
+
+#: of telebot.TeleBot.get_sticker_set:1
+msgid ""
+"Use this method to get a sticker set. On success, a StickerSet object is "
+"returned."
+msgstr ""
+
+#: of telebot.TeleBot.get_sticker_set:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getstickerset"
+msgstr ""
+
+#: of telebot.TeleBot.get_sticker_set:8
+msgid "On success, a StickerSet object is returned."
+msgstr ""
+
+#: of telebot.TeleBot.get_sticker_set:9 telebot.TeleBot.set_chat_sticker_set:14
+msgid ":class:`telebot.types.StickerSet`"
+msgstr ""
+
+#: of telebot.TeleBot.get_updates:1
+msgid ""
+"Use this method to receive incoming updates using long polling (wiki). An"
+" Array of Update objects is returned."
+msgstr ""
+
+#: of telebot.TeleBot.get_updates:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getupdates"
+msgstr ""
+
+#: of telebot.TeleBot.get_updates:6
+msgid ""
+"Identifier of the first update to be returned. Must be greater by one "
+"than the highest among the identifiers of previously received updates. By"
+" default, updates starting with the earliest unconfirmed update are "
+"returned. An update is considered confirmed as soon as getUpdates is "
+"called with an offset higher than its update_id. The negative offset can "
+"be specified to retrieve updates starting from -offset update from the "
+"end of the updates queue. All previous updates will forgotten."
+msgstr ""
+
+#: of telebot.TeleBot.get_updates:12
+msgid ""
+"Limits the number of updates to be retrieved. Values between 1-100 are "
+"accepted. Defaults to 100."
+msgstr ""
+
+#: of telebot.TeleBot.get_updates:15 telebot.TeleBot.get_webhook_info:6
+#: telebot.TeleBot.polling:21
+msgid "Request connection timeout"
+msgstr ""
+
+#: of telebot.TeleBot.get_updates:18
+msgid "Array of string. List the types of updates you want your bot to receive."
+msgstr ""
+
+#: of telebot.TeleBot.get_updates:21
+msgid "Timeout in seconds for long polling."
+msgstr ""
+
+#: of telebot.TeleBot.get_updates:24
+msgid "An Array of Update objects is returned."
+msgstr ""
+
+#: of telebot.TeleBot.get_updates:25
+msgid ":obj:`list` of :class:`telebot.types.Update`"
+msgstr ""
+
+#: of telebot.TeleBot.get_user_chat_boosts:1
+msgid ""
+"Use this method to get the list of boosts added to a chat by a user. "
+"Requires administrator rights in the chat. Returns a UserChatBoosts "
+"object."
+msgstr ""
+
+#: of telebot.TeleBot.get_user_chat_boosts:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getuserchatboosts"
+msgstr ""
+
+#: of telebot.TeleBot.get_user_chat_boosts:5
+#: telebot.TeleBot.send_chat_action:10 telebot.TeleBot.send_contact:5
+#: telebot.TeleBot.send_poll:6 telebot.TeleBot.send_venue:5
+#: telebot.TeleBot.stop_poll:5
+msgid "Unique identifier for the target chat or username of the target channel"
+msgstr ""
+
+#: of telebot.TeleBot.get_user_chat_boosts:11
+msgid "On success, a UserChatBoosts object is returned."
+msgstr ""
+
+#: of telebot.TeleBot.get_user_chat_boosts:12
+msgid ":class:`telebot.types.UserChatBoosts`"
+msgstr ""
+
+#: of telebot.TeleBot.get_user_profile_photos:1
+msgid ""
+"Use this method to get a list of profile pictures for a user. Returns a "
+":class:`telebot.types.UserProfilePhotos` object."
+msgstr ""
+
+#: of telebot.TeleBot.get_user_profile_photos:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getuserprofilephotos"
+msgstr ""
+
+#: of telebot.TeleBot.get_user_profile_photos:9
+msgid ""
+"Sequential number of the first photo to be returned. By default, all "
+"photos are returned."
+msgstr ""
+
+#: of telebot.TeleBot.get_user_profile_photos:12
+msgid ""
+"Limits the number of photos to be retrieved. Values between 1-100 are "
+"accepted. Defaults to 100."
+msgstr ""
+
+#: of telebot.TeleBot.get_user_profile_photos:15
+msgid ""
+"`UserProfilePhotos "
+"`_"
+msgstr ""
+
+#: of telebot.TeleBot.get_user_profile_photos:16
+msgid ":class:`telebot.types.UserProfilePhotos`"
+msgstr ""
+
+#: of telebot.TeleBot.get_webhook_info:1
+msgid ""
+"Use this method to get current webhook status. Requires no parameters. On"
+" success, returns a WebhookInfo object. If the bot is using getUpdates, "
+"will return an object with the url field empty."
+msgstr ""
+
+#: of telebot.TeleBot.get_webhook_info:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getwebhookinfo"
+msgstr ""
+
+#: of telebot.TeleBot.get_webhook_info:9
+msgid "On success, returns a WebhookInfo object."
+msgstr ""
+
+#: of telebot.TeleBot.get_webhook_info:10
+msgid ":class:`telebot.types.WebhookInfo`"
+msgstr ""
+
+#: of telebot.TeleBot.hide_general_forum_topic:1
+msgid ""
+"Use this method to hide the 'General' topic in a forum supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.hide_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#hidegeneralforumtopic"
+msgstr ""
+
+#: of telebot.TeleBot.infinity_polling:1
+msgid ""
+"Wrap polling with infinite loop and exception handling to avoid bot stops"
+" polling."
+msgstr ""
+
+#: of telebot.TeleBot.infinity_polling:5 telebot.TeleBot.polling:13
+msgid "Install watchdog and psutil before using restart_on_change option."
+msgstr ""
+
+#: of telebot.TeleBot.infinity_polling:7
+msgid "Request connection timeout."
+msgstr ""
+
+#: of telebot.TeleBot.infinity_polling:10 telebot.TeleBot.polling:27
+msgid "Timeout in seconds for long polling (see API docs)"
+msgstr ""
+
+#: of telebot.TeleBot.infinity_polling:13 telebot.TeleBot.polling:24
+msgid "skip old updates"
+msgstr ""
+
+#: of telebot.TeleBot.infinity_polling:16 telebot.TeleBot.polling:30
+msgid ""
+"Custom (different from logger itself) logging level for infinity_polling "
+"logging. Use logger levels from logging as a value. None/NOTSET = no "
+"error logging"
+msgstr ""
+
+#: of telebot.TeleBot.infinity_polling:20
+msgid ""
+"A list of the update types you want your bot to receive. For example, "
+"specify [“message”, “edited_channel_post”, “callback_query”] to only "
+"receive updates of these types. See util.update_types for a complete list"
+" of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used. Please note that this parameter doesn't affect "
+"updates created before the call to the get_updates, so unwanted updates "
+"may be received for a short period of time."
+msgstr ""
+
+#: of telebot.TeleBot.infinity_polling:29 telebot.TeleBot.polling:47
+msgid "Restart a file on file(s) change. Defaults to False"
+msgstr ""
+
+#: of telebot.TeleBot.infinity_polling:32
+msgid "Path to watch for changes. Defaults to current directory"
+msgstr ""
+
+#: of telebot.TeleBot.inline_handler:1
+msgid ""
+"Handles new incoming inline query. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.InlineQuery` object."
+msgstr ""
+
+#: of telebot.TeleBot.leave_chat:1
+msgid ""
+"Use this method for your bot to leave a group, supergroup or channel. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.leave_chat:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#leavechat"
+msgstr ""
+
+#: of telebot.TeleBot.load_next_step_handlers:1
+msgid "Load next step handlers from save file"
+msgstr ""
+
+#: of telebot.TeleBot.load_next_step_handlers:3
+msgid ""
+"This function is left to keep backward compatibility whose purpose was to"
+" load handlers from file with the help of FileHandlerBackend and is only "
+"recommended to use if next_step_backend was assigned as "
+"FileHandlerBackend before entering this function"
+msgstr ""
+
+#: of telebot.TeleBot.load_next_step_handlers:8
+msgid ""
+"Filename of the file where handlers was saved, defaults to \"./.handler-"
+"saves/step.save\""
+msgstr ""
+
+#: of telebot.TeleBot.load_next_step_handlers:11
+msgid ""
+"If True is passed, after the loading file will be deleted, defaults to "
+"True"
+msgstr ""
+
+#: of telebot.TeleBot.load_reply_handlers:1
+msgid "Load reply handlers from save file"
+msgstr ""
+
+#: of telebot.TeleBot.load_reply_handlers:3
+msgid ""
+"This function is left to keep backward compatibility whose purpose was to"
+" load handlers from file with the help of FileHandlerBackend and is only "
+"recommended to use if reply_backend was assigned as FileHandlerBackend "
+"before entering this function"
+msgstr ""
+
+#: of telebot.TeleBot.load_reply_handlers:7
+msgid ""
+"Filename of the file where handlers was saved, defaults to \"./.handler-"
+"saves/reply.save\""
+msgstr ""
+
+#: of telebot.TeleBot.load_reply_handlers:10
+msgid ""
+"If True is passed, after the loading file will be deleted, defaults to "
+"True, defaults to True"
+msgstr ""
+
+#: of telebot.TeleBot.log_out:1
+msgid ""
+"Use this method to log out from the cloud Bot API server before launching"
+" the bot locally. You MUST log out the bot before running it locally, "
+"otherwise there is no guarantee that the bot will receive updates. After "
+"a successful call, you can immediately log in on a local server, but will"
+" not be able to log in back to the cloud Bot API server for 10 minutes. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.log_out:8
+msgid "Telegram documentation: https://core.telegram.org/bots/api#logout"
+msgstr ""
+
+#: of telebot.TeleBot.message_handler:1
+msgid ""
+"Handles New incoming message of any kind - text, photo, sticker, etc. As "
+"a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object. All message handlers are tested in"
+" the order they were added."
+msgstr ""
+
+#: of telebot.TeleBot.message_handler:5 telebot.TeleBot.middleware_handler:7
+#: telebot.TeleBot.register_middleware_handler:6
+msgid "Example:"
+msgstr ""
+
+#: of telebot.TeleBot.message_handler:7
+msgid "Usage of message_handler"
+msgstr ""
+
+#: of telebot.TeleBot.message_handler:40
+msgid ""
+"Optional lambda function. The lambda receives the message to test as the "
+"first parameter. It must return True if the command should handle the "
+"message."
+msgstr ""
+
+#: of telebot.TeleBot.message_handler:52
+#: telebot.TeleBot.register_edited_channel_post_handler:23
+#: telebot.TeleBot.register_inline_handler:14
+#: telebot.TeleBot.register_pre_checkout_query_handler:13
+msgid "decorated function"
+msgstr ""
+
+#: of telebot.TeleBot.message_reaction_count_handler:1
+msgid ""
+"Handles new incoming message reaction count. As a parameter to the "
+"decorator function, it passes "
+":class:`telebot.types.MessageReactionCountUpdated` object."
+msgstr ""
+
+#: of telebot.TeleBot.message_reaction_handler:1
+msgid ""
+"Handles new incoming message reaction. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.MessageReactionUpdated` object."
+msgstr ""
+
+#: of telebot.TeleBot.middleware_handler:1
+msgid "Function-based middleware handler decorator."
+msgstr ""
+
+#: of telebot.TeleBot.middleware_handler:3
+msgid ""
+"This decorator can be used to decorate functions that must be handled as "
+"middlewares before entering any other message handlers But, be careful "
+"and check type of the update inside the handler if more than one "
+"update_type is given"
+msgstr ""
+
+#: of telebot.TeleBot.middleware_handler:9
+msgid "Usage of middleware_handler"
+msgstr ""
+
+#: of telebot.TeleBot.middleware_handler:24
+#: telebot.TeleBot.register_middleware_handler:15
+msgid ""
+"Optional list of update types that can be passed into the middleware "
+"handler."
+msgstr ""
+
+#: of telebot.TeleBot.middleware_handler:27
+msgid "function"
+msgstr ""
+
+#: of telebot.TeleBot.my_chat_member_handler:1
+msgid ""
+"Handles update in a status of a bot. For private chats, this update is "
+"received only when the bot is blocked or unblocked by the user. As a "
+"parameter to the decorator function, it passes "
+":class:`telebot.types.ChatMemberUpdated` object."
+msgstr ""
+
+#: of telebot.TeleBot.pin_chat_message:1
+msgid ""
+"Use this method to pin a message in a supergroup. The bot must be an "
+"administrator in the chat for this to work and must have the appropriate "
+"admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.pin_chat_message:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#pinchatmessage"
+msgstr ""
+
+#: of telebot.TeleBot.pin_chat_message:11
+msgid "Identifier of a message to pin"
+msgstr ""
+
+#: of telebot.TeleBot.pin_chat_message:14
+msgid ""
+"Pass True, if it is not necessary to send a notification to all group "
+"members about the new pinned message"
+msgstr ""
+
+#: of telebot.TeleBot.poll_answer_handler:1
+msgid ""
+"Handles change of user's answer in a non-anonymous poll(when user changes"
+" the vote). Bots receive new votes only in polls that were sent by the "
+"bot itself. As a parameter to the decorator function, it passes "
+":class:`telebot.types.PollAnswer` object."
+msgstr ""
+
+#: of telebot.TeleBot.poll_handler:1
+msgid ""
+"Handles new state of a poll. Bots receive only updates about stopped "
+"polls and polls, which are sent by the bot As a parameter to the "
+"decorator function, it passes :class:`telebot.types.Poll` object."
+msgstr ""
+
+#: of telebot.TeleBot.polling:1
+msgid ""
+"This function creates a new Thread that calls an internal "
+"__retrieve_updates function. This allows the bot to retrieve Updates "
+"automatically and notify listeners and message handlers accordingly."
+msgstr ""
+
+#: of telebot.TeleBot.polling:4
+msgid "Warning: Do not call this function more than once!"
+msgstr ""
+
+#: of telebot.TeleBot.polling:6
+msgid "Always gets updates."
+msgstr ""
+
+#: of telebot.TeleBot.polling:8
+msgid "Use :meth:`infinity_polling` instead."
+msgstr ""
+
+#: of telebot.TeleBot.polling:15
+msgid "Delay between two update retrivals"
+msgstr ""
+
+#: of telebot.TeleBot.polling:18
+msgid "Do not stop polling when an ApiException occurs."
+msgstr ""
+
+#: of telebot.TeleBot.polling:34
+msgid ""
+"A list of the update types you want your bot to receive. For example, "
+"specify [“message”, “edited_channel_post”, “callback_query”] to only "
+"receive updates of these types. See util.update_types for a complete list"
+" of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used. Please note that this parameter doesn't affect "
+"updates created before the call to the get_updates, so unwanted updates "
+"may be received for a short period of time."
+msgstr ""
+
+#: of telebot.TeleBot.polling:34
+msgid ""
+"A list of the update types you want your bot to receive. For example, "
+"specify [“message”, “edited_channel_post”, “callback_query”] to only "
+"receive updates of these types. See util.update_types for a complete list"
+" of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used."
+msgstr ""
+
+#: of telebot.TeleBot.polling:40
+msgid ""
+"Please note that this parameter doesn't affect updates created before the"
+" call to the get_updates, so unwanted updates may be received for a short"
+" period of time."
+msgstr ""
+
+#: of telebot.TeleBot.polling:50
+msgid "Path to watch for changes. Defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.pre_checkout_query_handler:1
+msgid ""
+"New incoming pre-checkout query. Contains full information about "
+"checkout. As a parameter to the decorator function, it passes "
+":class:`telebot.types.PreCheckoutQuery` object."
+msgstr ""
+
+#: of telebot.TeleBot.process_new_updates:1
+msgid ""
+"Processes new updates. Just pass list of subclasses of Update to this "
+"method."
+msgstr ""
+
+#: of telebot.TeleBot.process_new_updates:3
+msgid "List of :class:`telebot.types.Update` objects."
+msgstr ""
+
+#: of telebot.TeleBot.process_new_updates
+msgid "return None"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:1
+msgid ""
+"Use this method to promote or demote a user in a supergroup or a channel."
+" The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights. Pass False for all boolean parameters "
+"to demote a user."
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#promotechatmember"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:7
+msgid ""
+"Unique identifier for the target chat or username of the target channel ("
+" in the format @channelusername)"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:14
+msgid ""
+"Pass True, if the administrator can change chat title, photo and other "
+"settings"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:17
+msgid "Pass True, if the administrator can create channel posts, channels only"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:20
+msgid ""
+"Pass True, if the administrator can edit messages of other users, "
+"channels only"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:23
+msgid "Pass True, if the administrator can delete messages of other users"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:26
+msgid "Pass True, if the administrator can invite new users to the chat"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:29
+msgid "Pass True, if the administrator can restrict, ban or unban chat members"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:32
+msgid "Pass True, if the administrator can pin messages, supergroups only"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:35
+msgid ""
+"Pass True, if the administrator can add new administrators with a subset "
+"of his own privileges or demote administrators that he has promoted, "
+"directly or indirectly (promoted by administrators that were appointed by"
+" him)"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:40
+msgid "Pass True, if the administrator's presence in the chat is hidden"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:43
+msgid ""
+"Pass True, if the administrator can access the chat event log, chat "
+"statistics, message statistics in channels, see channel members, see "
+"anonymous administrators in supergroups and ignore slow mode. Implied by "
+"any other administrator privilege"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:49
+msgid ""
+"Pass True, if the administrator can manage voice chats For now, bots can "
+"use this privilege only for passing to other administrators."
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:53
+msgid "Deprecated, use can_manage_video_chats."
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:56
+msgid ""
+"Pass True if the user is allowed to create, rename, close, and reopen "
+"forum topics, supergroups only"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:60
+msgid "Pass True if the administrator can create the channel's stories"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:63
+msgid "Pass True if the administrator can edit the channel's stories"
+msgstr ""
+
+#: of telebot.TeleBot.promote_chat_member:66
+msgid "Pass True if the administrator can delete the channel's stories"
+msgstr ""
+
+#: of telebot.TeleBot.register_callback_query_handler:1
+msgid "Registers callback query handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_callback_query_handler:3
+#: telebot.TeleBot.register_channel_post_handler:3
+#: telebot.TeleBot.register_chat_boost_handler:3
+#: telebot.TeleBot.register_chat_join_request_handler:3
+#: telebot.TeleBot.register_chat_member_handler:3
+#: telebot.TeleBot.register_chosen_inline_handler:3
+#: telebot.TeleBot.register_edited_channel_post_handler:3
+#: telebot.TeleBot.register_edited_message_handler:3
+#: telebot.TeleBot.register_inline_handler:3
+#: telebot.TeleBot.register_message_handler:3
+#: telebot.TeleBot.register_message_reaction_count_handler:3
+#: telebot.TeleBot.register_message_reaction_handler:3
+#: telebot.TeleBot.register_my_chat_member_handler:3
+#: telebot.TeleBot.register_poll_answer_handler:3
+#: telebot.TeleBot.register_poll_handler:3
+#: telebot.TeleBot.register_pre_checkout_query_handler:3
+#: telebot.TeleBot.register_removed_chat_boost_handler:3
+#: telebot.TeleBot.register_shipping_query_handler:3
+msgid "function to be called"
+msgstr ""
+
+#: of telebot.TeleBot.register_callback_query_handler:9
+#: telebot.TeleBot.register_channel_post_handler:18
+#: telebot.TeleBot.register_chat_boost_handler:9
+#: telebot.TeleBot.register_chat_join_request_handler:9
+#: telebot.TeleBot.register_chat_member_handler:9
+#: telebot.TeleBot.register_chosen_inline_handler:9
+#: telebot.TeleBot.register_edited_channel_post_handler:18
+#: telebot.TeleBot.register_edited_message_handler:21
+#: telebot.TeleBot.register_inline_handler:9
+#: telebot.TeleBot.register_message_handler:21
+#: telebot.TeleBot.register_message_reaction_count_handler:9
+#: telebot.TeleBot.register_message_reaction_handler:9
+#: telebot.TeleBot.register_my_chat_member_handler:9
+#: telebot.TeleBot.register_poll_answer_handler:9
+#: telebot.TeleBot.register_poll_handler:9
+#: telebot.TeleBot.register_pre_checkout_query_handler:8
+#: telebot.TeleBot.register_removed_chat_boost_handler:9
+#: telebot.TeleBot.register_shipping_query_handler:9
+msgid ""
+"True if you need to pass TeleBot instance to handler(useful for "
+"separating handlers into different files)"
+msgstr ""
+
+#: of telebot.TeleBot.register_channel_post_handler:1
+msgid "Registers channel post message handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_channel_post_handler:9
+#: telebot.TeleBot.register_edited_channel_post_handler:9
+#: telebot.TeleBot.register_edited_message_handler:9
+#: telebot.TeleBot.register_message_handler:9
+msgid "list of commands"
+msgstr ""
+
+#: of telebot.TeleBot.register_channel_post_handler:12
+#: telebot.TeleBot.register_edited_channel_post_handler:12
+#: telebot.TeleBot.register_edited_message_handler:12
+msgid "Regular expression"
+msgstr ""
+
+#: of telebot.TeleBot.register_chat_boost_handler:1
+msgid "Registers chat boost handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_chat_join_request_handler:1
+msgid "Registers chat join request handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_chat_member_handler:1
+msgid "Registers chat member handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_chat_member_handler:14
+msgid ":return:None"
+msgstr ""
+
+#: of telebot.TeleBot.register_chosen_inline_handler:1
+msgid "Registers chosen inline handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_edited_channel_post_handler:1
+msgid "Registers edited channel post message handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_edited_message_handler:1
+msgid "Registers edited message handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_edited_message_handler:18
+msgid "True for private chat"
+msgstr ""
+
+#: of telebot.TeleBot.register_for_reply:1
+#: telebot.TeleBot.register_for_reply_by_message_id:1
+msgid ""
+"Registers a callback function to be notified when a reply to `message` "
+"arrives."
+msgstr ""
+
+#: of telebot.TeleBot.register_for_reply:3
+#: telebot.TeleBot.register_for_reply_by_message_id:3
+msgid ""
+"Warning: In case `callback` as lambda function, saving reply handlers "
+"will not work."
+msgstr ""
+
+#: of telebot.TeleBot.register_for_reply:5
+msgid "The message for which we are awaiting a reply."
+msgstr ""
+
+#: of telebot.TeleBot.register_for_reply:8
+#: telebot.TeleBot.register_for_reply_by_message_id:8
+msgid ""
+"The callback function to be called when a reply arrives. Must accept one "
+"`message` parameter, which will contain the replied message."
+msgstr ""
+
+#: of telebot.TeleBot.register_for_reply:12
+#: telebot.TeleBot.register_for_reply_by_message_id:12
+msgid "Optional arguments for the callback function."
+msgstr ""
+
+#: of telebot.TeleBot.register_for_reply:13
+#: telebot.TeleBot.register_for_reply_by_message_id:13
+msgid "Optional keyword arguments for the callback function."
+msgstr ""
+
+#: of telebot.TeleBot.register_for_reply_by_message_id:5
+msgid "The id of the message for which we are awaiting a reply."
+msgstr ""
+
+#: of telebot.TeleBot.register_inline_handler:1
+msgid "Registers inline handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_message_handler:1
+msgid "Registers message handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_message_handler:18
+msgid "List of chat types"
+msgstr ""
+
+#: of telebot.TeleBot.register_message_reaction_count_handler:1
+msgid "Registers message reaction count handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_message_reaction_handler:1
+msgid "Registers message reaction handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_middleware_handler:1
+msgid "Adds function-based middleware handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_middleware_handler:3
+msgid ""
+"This function will register your decorator function. Function-based "
+"middlewares are executed before handlers. But, be careful and check type "
+"of the update inside the handler if more than one update_type is given"
+msgstr ""
+
+#: of telebot.TeleBot.register_middleware_handler:8
+msgid "bot = TeleBot('TOKEN')"
+msgstr ""
+
+#: of telebot.TeleBot.register_middleware_handler:10
+msgid ""
+"bot.register_middleware_handler(print_channel_post_text, "
+"update_types=['channel_post', 'edited_channel_post'])"
+msgstr ""
+
+#: of telebot.TeleBot.register_middleware_handler:12
+msgid "Function that will be used as a middleware handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_my_chat_member_handler:1
+msgid "Registers my chat member handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_next_step_handler:1
+msgid ""
+"Registers a callback function to be notified when new message arrives "
+"after `message`."
+msgstr ""
+
+#: of telebot.TeleBot.register_next_step_handler:3
+#: telebot.TeleBot.register_next_step_handler_by_chat_id:3
+msgid ""
+"Warning: In case `callback` as lambda function, saving next step handlers"
+" will not work."
+msgstr ""
+
+#: of telebot.TeleBot.register_next_step_handler:5
+msgid "The message for which we want to handle new message in the same chat."
+msgstr ""
+
+#: of telebot.TeleBot.register_next_step_handler:8
+#: telebot.TeleBot.register_next_step_handler_by_chat_id:8
+msgid "The callback function which next new message arrives."
+msgstr ""
+
+#: of telebot.TeleBot.register_next_step_handler:11
+#: telebot.TeleBot.register_next_step_handler:13
+#: telebot.TeleBot.register_next_step_handler_by_chat_id:11
+#: telebot.TeleBot.register_next_step_handler_by_chat_id:13
+msgid "Args to pass in callback func"
+msgstr ""
+
+#: of telebot.TeleBot.register_next_step_handler_by_chat_id:1
+msgid ""
+"Registers a callback function to be notified when new message arrives in "
+"the given chat."
+msgstr ""
+
+#: of telebot.TeleBot.register_next_step_handler_by_chat_id:5
+msgid "The chat (chat ID) for which we want to handle new message."
+msgstr ""
+
+#: of telebot.TeleBot.register_poll_answer_handler:1
+msgid "Registers poll answer handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_poll_handler:1
+msgid "Registers poll handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_pre_checkout_query_handler:1
+msgid "Registers pre-checkout request handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_removed_chat_boost_handler:1
+msgid "Registers removed chat boost handler."
+msgstr ""
+
+#: of telebot.TeleBot.register_shipping_query_handler:1
+msgid "Registers shipping query handler."
+msgstr ""
+
+#: of telebot.TeleBot.remove_webhook:1
+msgid "Deletes webhooks using set_webhook() function."
+msgstr ""
+
+#: of telebot.TeleBot.removed_chat_boost_handler:1
+msgid ""
+"Handles new incoming chat boost state. it passes "
+":class:`telebot.types.ChatBoostRemoved` object."
+msgstr ""
+
+#: of telebot.TeleBot.reopen_forum_topic:1
+msgid ""
+"Use this method to reopen a closed topic in a forum supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the can_manage_topics administrator rights, unless it is the creator of "
+"the topic. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.reopen_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reopenforumtopic"
+msgstr ""
+
+#: of telebot.TeleBot.reopen_forum_topic:10
+msgid "Identifier of the topic to reopen"
+msgstr ""
+
+#: of telebot.TeleBot.reopen_general_forum_topic:1
+msgid ""
+"Use this method to reopen the 'General' topic in a forum supergroup chat."
+" The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.reopen_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reopengeneralforumtopic"
+msgstr ""
+
+#: of telebot.TeleBot.reply_to:1
+msgid ""
+"Convenience function for `send_message(message.chat.id, text, "
+"reply_to_message_id=message.message_id, **kwargs)`"
+msgstr ""
+
+#: of telebot.TeleBot.reply_to:3
+msgid "Instance of :class:`telebot.types.Message`"
+msgstr ""
+
+#: of telebot.TeleBot.reply_to:6
+msgid "Text of the message."
+msgstr ""
+
+#: of telebot.TeleBot.reply_to:9
+msgid ""
+"Additional keyword arguments which are passed to "
+":meth:`telebot.TeleBot.send_message`"
+msgstr ""
+
+#: of telebot.TeleBot.reset_data:1
+msgid "Reset data for a user in chat."
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:1
+msgid ""
+"Use this method to restrict a user in a supergroup. The bot must be an "
+"administrator in the supergroup for this to work and must have the "
+"appropriate admin rights. Pass True for all boolean parameters to lift "
+"restrictions from a user."
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#restrictchatmember"
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:8
+msgid ""
+"Individual parameters are deprecated and will be removed, use "
+"'permissions' instead."
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:17
+msgid ""
+"Date when restrictions will be lifted for the user, unix time. If user is"
+" restricted for more than 366 days or less than 30 seconds from the "
+"current time, they are considered to be restricted forever"
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:22
+msgid ""
+"Pass True, if the user can send text messages, contacts, locations and "
+"venues"
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:25
+msgid ""
+"Pass True, if the user can send audios, documents, photos, videos, video "
+"notes and voice notes, implies can_send_messages"
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:29
+msgid "Pass True, if the user is allowed to send polls, implies can_send_messages"
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:32
+msgid ""
+"Pass True, if the user can send animations, games, stickers and use "
+"inline bots, implies can_send_media_messages"
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:35
+msgid ""
+"Pass True, if the user may add web page previews to their messages, "
+"implies can_send_media_messages"
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:39
+msgid ""
+"Pass True, if the user is allowed to change the chat title, photo and "
+"other settings. Ignored in public supergroups"
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:43
+msgid ""
+"Pass True, if the user is allowed to invite new users to the chat, "
+"implies can_invite_users"
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:47
+msgid ""
+"Pass True, if the user is allowed to pin messages. Ignored in public "
+"supergroups"
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:50
+#: telebot.TeleBot.set_chat_permissions:14
+msgid ""
+"Pass True if chat permissions are set independently. Otherwise, the "
+"can_send_other_messages and can_add_web_page_previews permissions will "
+"imply the can_send_messages, can_send_audios, can_send_documents, "
+"can_send_photos, can_send_videos, can_send_video_notes, and "
+"can_send_voice_notes permissions; the can_send_polls permission will "
+"imply the can_send_messages permission."
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:56
+msgid ""
+"Pass ChatPermissions object to set all permissions at once. Use this "
+"param instead of passing all boolean parameters."
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:60
+#: telebot.TeleBot.set_chat_permissions:20 telebot.TeleBot.unban_chat_member:19
+msgid "True on success"
+msgstr ""
+
+#: of telebot.TeleBot.retrieve_data:1
+msgid "Returns context manager with data for a user in chat."
+msgstr ""
+
+#: of telebot.TeleBot.retrieve_data:6
+msgid "Chat's unique identifier, defaults to user_id"
+msgstr ""
+
+#: of telebot.TeleBot.retrieve_data:9
+msgid "Context manager with data for a user in chat"
+msgstr ""
+
+#: of telebot.TeleBot.revoke_chat_invite_link:1
+msgid ""
+"Use this method to revoke an invite link created by the bot. Note: If the"
+" primary link is revoked, a new link is automatically generated The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate admin rights."
+msgstr ""
+
+#: of telebot.TeleBot.revoke_chat_invite_link:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#revokechatinvitelink"
+msgstr ""
+
+#: of telebot.TeleBot.revoke_chat_invite_link:11
+msgid "The invite link to revoke"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:1
+msgid "This class sets webhooks and listens to a given url and port."
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:3
+msgid "Requires fastapi, uvicorn, and latest version of starlette."
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:5
+msgid "IP address to listen to, defaults to \"127.0.0.1\""
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:8
+msgid "A port which will be used to listen to webhooks., defaults to 443"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:11
+msgid "Path to the webhook. Defaults to /token, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:14
+msgid "Path to the certificate file, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:17
+msgid "Path to the certificate key file, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:20
+msgid "Webhook URL to be set, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:23
+msgid ""
+"Maximum allowed number of simultaneous HTTPS connections to the webhook "
+"for update delivery, 1-100. Defaults to 40. Use lower values to limit the"
+" load on your bot's server, and higher values to increase your bot's "
+"throughput., defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:28
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all updates "
+"regardless of type (default). If not specified, the previous setting will"
+" be used. defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:33 telebot.TeleBot.set_webhook:32
+msgid ""
+"The fixed IP address which will be used to send webhook requests instead "
+"of the IP address resolved through DNS, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:42
+msgid "Secret token to be used to verify the webhook request, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:45
+msgid "Length of a secret token, defaults to 20"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks telebot.custom_filters.TextFilter
+msgid "Raises"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:48
+msgid "If necessary libraries were not installed."
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:1
+msgid ""
+"Use this method to send animation files (GIF or H.264/MPEG-4 AVC video "
+"without sound). On success, the sent Message is returned. Bots can "
+"currently send animation files of up to 50 MB in size, this limit may be "
+"changed in the future."
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendanimation"
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:9
+msgid ""
+"Animation to send. Pass a file_id as String to send an animation that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get an animation from the Internet, or upload a "
+"new animation using multipart/form-data."
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:13
+msgid "Duration of sent animation in seconds"
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:16
+msgid "Animation width"
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:19
+msgid "Animation height"
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:22 telebot.TeleBot.send_video:20
+#: telebot.TeleBot.send_video_note:36
+msgid ""
+"Thumbnail of the file sent; can be ignored if thumbnail generation for "
+"the file is supported server-side. The thumbnail should be in JPEG format"
+" and less than 200 kB in size. A thumbnail's width and height should not "
+"exceed 320. Ignored if the file is not uploaded using multipart/form-"
+"data. Thumbnails can't be reused and can be only uploaded as a new file, "
+"so you can pass “attach://” if the thumbnail was "
+"uploaded using multipart/form-data under ."
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:28
+msgid ""
+"Animation caption (may also be used when resending animation by file_id),"
+" 0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:31
+msgid "Mode for parsing entities in the animation caption"
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:54 telebot.TeleBot.send_video:29
+msgid ""
+"List of special entities that appear in the caption, which can be "
+"specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:57 telebot.TeleBot.send_video:58
+msgid "Identifier of a message thread, in which the video will be sent"
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:60
+msgid "Pass True, if the animation should be sent as a spoiler"
+msgstr ""
+
+#: of telebot.TeleBot.send_animation:66 telebot.TeleBot.send_audio:66
+#: telebot.TeleBot.send_contact:43 telebot.TeleBot.send_document:59
+#: telebot.TeleBot.send_location:49 telebot.TeleBot.send_media_group:30
+#: telebot.TeleBot.send_message:46 telebot.TeleBot.send_sticker:42
+#: telebot.TeleBot.send_venue:56 telebot.TeleBot.send_video_note:51
+#: telebot.TeleBot.send_voice:49
+msgid "Reply parameters."
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:1
+msgid ""
+"Use this method to send audio files, if you want Telegram clients to "
+"display them in the music player. Your audio must be in the .MP3 or .M4A "
+"format. On success, the sent Message is returned. Bots can currently send"
+" audio files of up to 50 MB in size, this limit may be changed in the "
+"future."
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:5
+msgid "For sending voice messages, use the send_voice method instead."
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendaudio"
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:12
+msgid ""
+"Audio file to send. Pass a file_id as String to send an audio file that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get an audio file from the Internet, or upload a "
+"new one using multipart/form-data. Audio must be in the .MP3 or .M4A "
+"format."
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:17
+msgid "Audio caption, 0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:20
+msgid "Duration of the audio in seconds"
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:23
+msgid "Performer"
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:26
+msgid "Track name"
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:33
+msgid ""
+"Mode for parsing entities in the audio caption. See formatting options "
+"for more details."
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:48
+msgid ""
+"Thumbnail of the file sent; can be ignored if thumbnail generation for "
+"the file is supported server-side. The thumbnail should be in JPEG format"
+" and less than 200 kB in size. A thumbnail's width and height should not "
+"exceed 320. Ignored if the file is not uploaded using multipart/form-"
+"data. Thumbnails can't be reused and can be only uploaded as a new file, "
+"so you can pass “attach://” if the thumbnail was "
+"uploaded using multipart/form-data under "
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:54 telebot.TeleBot.send_document:38
+#: telebot.TeleBot.send_photo:19 telebot.TeleBot.send_voice:40
+msgid ""
+"A JSON-serialized list of special entities that appear in the caption, "
+"which can be specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.TeleBot.send_chat_action:1
+msgid ""
+"Use this method when you need to tell the user that something is "
+"happening on the bot's side. The status is set for 5 seconds or less "
+"(when a message arrives from your bot, Telegram clients clear its typing "
+"status). Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.send_chat_action:5
+msgid ""
+"Example: The ImageBot needs some time to process a request and upload the"
+" image. Instead of sending a text message along the lines of “Retrieving "
+"image, please wait…”, the bot may use sendChatAction with action = "
+"upload_photo. The user will see a “sending photo” status for the bot."
+msgstr ""
+
+#: of telebot.TeleBot.send_chat_action:8
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendchataction"
+msgstr ""
+
+#: of telebot.TeleBot.send_chat_action:13
+msgid ""
+"Type of action to broadcast. Choose one, depending on what the user is "
+"about to receive: typing for text messages, upload_photo for photos, "
+"record_video or upload_video for videos, record_voice or upload_voice for"
+" voice notes, upload_document for general files, choose_sticker for "
+"stickers, find_location for location data, record_video_note or "
+"upload_video_note for video notes."
+msgstr ""
+
+#: of telebot.TeleBot.send_chat_action:22
+msgid ""
+"The thread identifier of a message from which the reply will be "
+"sent(supergroups only)"
+msgstr ""
+
+#: of telebot.TeleBot.send_contact:1
+msgid ""
+"Use this method to send phone contacts. On success, the sent Message is "
+"returned."
+msgstr ""
+
+#: of telebot.TeleBot.send_contact:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendcontact"
+msgstr ""
+
+#: of telebot.TeleBot.send_contact:8
+msgid "Contact's phone number"
+msgstr ""
+
+#: of telebot.TeleBot.send_contact:11
+msgid "Contact's first name"
+msgstr ""
+
+#: of telebot.TeleBot.send_contact:14
+msgid "Contact's last name"
+msgstr ""
+
+#: of telebot.TeleBot.send_contact:17
+msgid "Additional data about the contact in the form of a vCard, 0-2048 bytes"
+msgstr ""
+
+#: of telebot.TeleBot.send_contact:40 telebot.TeleBot.send_venue:53
+msgid "The thread identifier of a message from which the reply will be sent"
+msgstr ""
+
+#: of telebot.TeleBot.send_dice:1
+msgid ""
+"Use this method to send an animated emoji that will display a random "
+"value. On success, the sent Message is returned."
+msgstr ""
+
+#: of telebot.TeleBot.send_dice:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#senddice"
+msgstr ""
+
+#: of telebot.TeleBot.send_dice:8
+msgid ""
+"Emoji on which the dice throw animation is based. Currently, must be one "
+"of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯”"
+" and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults "
+"to “🎲”"
+msgstr ""
+
+#: of telebot.TeleBot.send_document:1
+msgid "Use this method to send general files."
+msgstr ""
+
+#: of telebot.TeleBot.send_document:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#senddocument"
+msgstr ""
+
+#: of telebot.TeleBot.send_document:8
+msgid ""
+"(document) File to send. Pass a file_id as String to send a file that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get a file from the Internet, or upload a new one "
+"using multipart/form-data"
+msgstr ""
+
+#: of telebot.TeleBot.send_document:12
+msgid ""
+"Document caption (may also be used when resending documents by file_id), "
+"0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.TeleBot.send_document:20
+msgid "Mode for parsing entities in the document caption"
+msgstr ""
+
+#: of telebot.TeleBot.send_document:35
+msgid ""
+"InputFile or String : Thumbnail of the file sent; can be ignored if "
+"thumbnail generation for the file is supported server-side. The thumbnail"
+" should be in JPEG format and less than 200 kB in size. A thumbnail's "
+"width and height should not exceed 320. Ignored if the file is not "
+"uploaded using multipart/form-data. Thumbnails can't be reused and can be"
+" only uploaded as a new file, so you can pass "
+"“attach://” if the thumbnail was uploaded using "
+"multipart/form-data under "
+msgstr ""
+
+#: of telebot.TeleBot.send_document:41
+msgid ""
+"allows to define file name that will be visible in the Telegram instead "
+"of original file name"
+msgstr ""
+
+#: of telebot.TeleBot.send_document:44
+msgid ""
+"Disables automatic server-side content type detection for files uploaded "
+"using multipart/form-data"
+msgstr ""
+
+#: of telebot.TeleBot.send_document:47 telebot.TeleBot.send_sticker:33
+#: telebot.TeleBot.send_video:55
+msgid "function typo miss compatibility: do not use it"
+msgstr ""
+
+#: of telebot.TeleBot.send_document:53 telebot.TeleBot.send_sticker:36
+msgid "The thread to which the message will be sent"
+msgstr ""
+
+#: of telebot.TeleBot.send_game:1
+msgid "Used to send the game."
+msgstr ""
+
+#: of telebot.TeleBot.send_game:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendgame"
+msgstr ""
+
+#: of telebot.TeleBot.send_game:8
+msgid ""
+"Short name of the game, serves as the unique identifier for the game. Set"
+" up your games via @BotFather."
+msgstr ""
+
+#: of telebot.TeleBot.send_game:14 telebot.TeleBot.send_invoice:70
+#: telebot.TeleBot.send_poll:47
+msgid "deprecated. If the message is a reply, ID of the original message"
+msgstr ""
+
+#: of telebot.TeleBot.send_game:17 telebot.TeleBot.send_invoice:73
+#: telebot.TeleBot.send_poll:50
+msgid ""
+"deprecated. Pass True, if the message should be sent even if the "
+"specified replied-to message is not found"
+msgstr ""
+
+#: of telebot.TeleBot.send_game:23
+msgid "Timeout in seconds for waiting for a response from the bot."
+msgstr ""
+
+#: of telebot.TeleBot.send_game:29
+msgid ""
+"The identifier of a message thread, in which the game message will be "
+"sent."
+msgstr ""
+
+#: of telebot.TeleBot.send_game:32 telebot.TeleBot.send_video:67
+msgid "Reply parameters"
+msgstr ""
+
+#: of telebot.TeleBot.send_game:36 telebot.TeleBot.send_invoice:105
+#: telebot.TeleBot.send_poll:74
+msgid ":obj:`types.Message`"
+msgstr ""
+
+#: of telebot.TeleBot.send_invoice:1
+msgid "Sends invoice."
+msgstr ""
+
+#: of telebot.TeleBot.send_invoice:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendinvoice"
+msgstr ""
+
+#: of telebot.TeleBot.send_invoice:5
+msgid "Unique identifier for the target private chat"
+msgstr ""
+
+#: of telebot.TeleBot.send_invoice:29
+msgid ""
+"Unique deep-linking parameter that can be used to generate this invoice "
+"when used as a start parameter"
+msgstr ""
+
+#: of telebot.TeleBot.send_invoice:33
+msgid ""
+"URL of the product photo for the invoice. Can be a photo of the goods or "
+"a marketing image for a service. People like it better when they see what"
+" they are paying for."
+msgstr ""
+
+#: of telebot.TeleBot.send_invoice:76
+msgid ""
+"A JSON-serialized object for an inline keyboard. If empty, one 'Pay total"
+" price' button will be shown. If not empty, the first button must be a "
+"Pay button"
+msgstr ""
+
+#: of telebot.TeleBot.send_invoice:84 telebot.TeleBot.set_webhook:39
+msgid "Timeout of a request, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.send_invoice:98
+msgid ""
+"The identifier of a message thread, in which the invoice message will be "
+"sent"
+msgstr ""
+
+#: of telebot.TeleBot.send_invoice:101
+msgid "Required if the message is a reply. Additional interface options."
+msgstr ""
+
+#: of telebot.TeleBot.send_location:1
+msgid ""
+"Use this method to send point on the map. On success, the sent Message is"
+" returned."
+msgstr ""
+
+#: of telebot.TeleBot.send_location:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendlocation"
+msgstr ""
+
+#: of telebot.TeleBot.send_location:8
+msgid "Latitude of the location"
+msgstr ""
+
+#: of telebot.TeleBot.send_location:11
+msgid "Longitude of the location"
+msgstr ""
+
+#: of telebot.TeleBot.send_location:14
+msgid ""
+"Period in seconds for which the location will be updated (see Live "
+"Locations, should be between 60 and 86400."
+msgstr ""
+
+#: of telebot.TeleBot.send_location:37
+msgid ""
+"For live locations, a direction in which the user is moving, in degrees. "
+"Must be between 1 and 360 if specified."
+msgstr ""
+
+#: of telebot.TeleBot.send_location:40
+msgid ""
+"For live locations, a maximum distance for proximity alerts about "
+"approaching another chat member, in meters. Must be between 1 and 100000 "
+"if specified."
+msgstr ""
+
+#: of telebot.TeleBot.send_media_group:1
+msgid ""
+"Use this method to send a group of photos, videos, documents or audios as"
+" an album. Documents and audio files can be only grouped in an album with"
+" messages of the same type. On success, an array of Messages that were "
+"sent is returned."
+msgstr ""
+
+#: of telebot.TeleBot.send_media_group:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendmediagroup"
+msgstr ""
+
+#: of telebot.TeleBot.send_media_group:9
+msgid ""
+"A JSON-serialized array describing messages to be sent, must include 2-10"
+" items"
+msgstr ""
+
+#: of telebot.TeleBot.send_media_group:12
+msgid ""
+"Sends the messages silently. Users will receive a notification with no "
+"sound."
+msgstr ""
+
+#: of telebot.TeleBot.send_media_group:27
+msgid "Identifier of a message thread, in which the media group will be sent"
+msgstr ""
+
+#: of telebot.TeleBot.send_media_group:33
+msgid "On success, an array of Messages that were sent is returned."
+msgstr ""
+
+#: of telebot.TeleBot.send_message:1
+msgid "Use this method to send text messages."
+msgstr ""
+
+#: of telebot.TeleBot.send_message:3
+msgid ""
+"Warning: Do not send more than about 4096 characters each message, "
+"otherwise you'll risk an HTTP 414 error. If you must send more than 4096 "
+"characters, use the `split_string` or `smart_split` function in util.py."
+msgstr ""
+
+#: of telebot.TeleBot.send_message:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendmessage"
+msgstr ""
+
+#: of telebot.TeleBot.send_message:12
+msgid "Text of the message to be sent"
+msgstr ""
+
+#: of telebot.TeleBot.send_message:18
+msgid ""
+"List of special entities that appear in message text, which can be "
+"specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.TeleBot.send_message:49
+msgid "Link preview options."
+msgstr ""
+
+#: of telebot.TeleBot.send_photo:1
+msgid "Use this method to send photos. On success, the sent Message is returned."
+msgstr ""
+
+#: of telebot.TeleBot.send_photo:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendphoto"
+msgstr ""
+
+#: of telebot.TeleBot.send_photo:8
+msgid ""
+"Photo to send. Pass a file_id as String to send a photo that exists on "
+"the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a photo from the Internet, or upload a new photo using "
+"multipart/form-data. The photo must be at most 10 MB in size. The photo's"
+" width and height must not exceed 10000 in total. Width and height ratio "
+"must be at most 20."
+msgstr ""
+
+#: of telebot.TeleBot.send_photo:13
+msgid ""
+"Photo caption (may also be used when resending photos by file_id), 0-1024"
+" characters after entities parsing"
+msgstr ""
+
+#: of telebot.TeleBot.send_photo:16
+msgid "Mode for parsing entities in the photo caption."
+msgstr ""
+
+#: of telebot.TeleBot.send_photo:45
+msgid "Pass True, if the photo should be sent as a spoiler"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:1
+msgid ""
+"Use this method to send a native poll. On success, the sent Message is "
+"returned."
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendpoll"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:9
+msgid "Poll question, 1-300 characters"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:12
+msgid ""
+"A JSON-serialized list of answer options, 2-10 strings 1-100 characters "
+"each"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:15
+msgid "True, if the poll needs to be anonymous, defaults to True"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:18
+msgid "Poll type, “quiz” or “regular”, defaults to “regular”"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:21
+msgid ""
+"True, if the poll allows multiple answers, ignored for polls in quiz "
+"mode, defaults to False"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:24
+msgid ""
+"0-based identifier of the correct answer option. Available only for polls"
+" in quiz mode, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:28
+msgid ""
+"Text that is shown when a user chooses an incorrect answer or taps on the"
+" lamp icon in a quiz-style poll, 0-200 characters with at most 2 line "
+"feeds after entities parsing"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:32
+msgid ""
+"Mode for parsing entities in the explanation. See formatting options for "
+"more details."
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:35
+msgid ""
+"Amount of time in seconds the poll will be active after creation, 5-600. "
+"Can't be used together with close_date."
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:38
+msgid "Point in time (Unix timestamp) when the poll will be automatically closed."
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:41
+msgid ""
+"Pass True, if the poll needs to be immediately closed. This can be useful"
+" for poll preview."
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:57
+msgid "Timeout in seconds for waiting for a response from the user."
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:60
+msgid ""
+"A JSON-serialized list of special entities that appear in the "
+"explanation, which can be specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:67
+msgid "The identifier of a message thread, in which the poll will be sent"
+msgstr ""
+
+#: of telebot.TeleBot.send_poll:70
+msgid "reply parameters."
+msgstr ""
+
+#: of telebot.TeleBot.send_sticker:1
+msgid ""
+"Use this method to send static .WEBP, animated .TGS, or video .WEBM "
+"stickers. On success, the sent Message is returned."
+msgstr ""
+
+#: of telebot.TeleBot.send_sticker:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendsticker"
+msgstr ""
+
+#: of telebot.TeleBot.send_sticker:9
+msgid ""
+"Sticker to send. Pass a file_id as String to send a file that exists on "
+"the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a .webp file from the Internet, or upload a new one using"
+" multipart/form-data."
+msgstr ""
+
+#: of telebot.TeleBot.send_sticker:18
+msgid "to disable the notification"
+msgstr ""
+
+#: of telebot.TeleBot.send_sticker:39
+msgid "Emoji associated with the sticker; only for just uploaded stickers"
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:1
+msgid ""
+"Use this method to send information about a venue. On success, the sent "
+"Message is returned."
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvenue"
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:8
+msgid "Latitude of the venue"
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:11
+msgid "Longitude of the venue"
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:14
+msgid "Name of the venue"
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:17
+msgid "Address of the venue"
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:20
+msgid "Foursquare identifier of the venue"
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:23
+msgid ""
+"Foursquare type of the venue, if known. (For example, "
+"“arts_entertainment/default”, “arts_entertainment/aquarium” or "
+"“food/icecream”.)"
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:44
+msgid "Google Places identifier of the venue"
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:47
+msgid "Google Places type of the venue."
+msgstr ""
+
+#: of telebot.TeleBot.send_video:1
+msgid ""
+"Use this method to send video files, Telegram clients support mp4 videos "
+"(other formats may be sent as Document)."
+msgstr ""
+
+#: of telebot.TeleBot.send_video:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvideo"
+msgstr ""
+
+#: of telebot.TeleBot.send_video:8
+msgid ""
+"Video to send. You can either pass a file_id as String to resend a video "
+"that is already on the Telegram servers, or upload a new video file using"
+" multipart/form-data."
+msgstr ""
+
+#: of telebot.TeleBot.send_video:11 telebot.TeleBot.send_video_note:13
+msgid "Duration of sent video in seconds"
+msgstr ""
+
+#: of telebot.TeleBot.send_video:14
+msgid "Video width"
+msgstr ""
+
+#: of telebot.TeleBot.send_video:17
+msgid "Video height"
+msgstr ""
+
+#: of telebot.TeleBot.send_video:23
+msgid ""
+"Video caption (may also be used when resending videos by file_id), 0-1024"
+" characters after entities parsing"
+msgstr ""
+
+#: of telebot.TeleBot.send_video:26
+msgid "Mode for parsing entities in the video caption"
+msgstr ""
+
+#: of telebot.TeleBot.send_video:32
+msgid "Pass True, if the uploaded video is suitable for streaming"
+msgstr ""
+
+#: of telebot.TeleBot.send_video:61
+msgid "Pass True, if the video should be sent as a spoiler"
+msgstr ""
+
+#: of telebot.TeleBot.send_video_note:1
+msgid ""
+"As of v.4.0, Telegram clients support rounded square MPEG4 videos of up "
+"to 1 minute long. Use this method to send video messages. On success, the"
+" sent Message is returned."
+msgstr ""
+
+#: of telebot.TeleBot.send_video_note:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvideonote"
+msgstr ""
+
+#: of telebot.TeleBot.send_video_note:9
+msgid ""
+"Video note to send. Pass a file_id as String to send a video note that "
+"exists on the Telegram servers (recommended) or upload a new video using "
+"multipart/form-data. Sending video notes by a URL is currently "
+"unsupported"
+msgstr ""
+
+#: of telebot.TeleBot.send_video_note:16
+msgid "Video width and height, i.e. diameter of the video message"
+msgstr ""
+
+#: of telebot.TeleBot.send_video_note:45
+msgid "Identifier of a message thread, in which the video note will be sent"
+msgstr ""
+
+#: of telebot.TeleBot.send_voice:1
+msgid ""
+"Use this method to send audio files, if you want Telegram clients to "
+"display the file as a playable voice message. For this to work, your "
+"audio must be in an .OGG file encoded with OPUS (other formats may be "
+"sent as Audio or Document). On success, the sent Message is returned. "
+"Bots can currently send voice messages of up to 50 MB in size, this limit"
+" may be changed in the future."
+msgstr ""
+
+#: of telebot.TeleBot.send_voice:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvoice"
+msgstr ""
+
+#: of telebot.TeleBot.send_voice:10
+msgid ""
+"Audio file to send. Pass a file_id as String to send a file that exists "
+"on the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a file from the Internet, or upload a new one using "
+"multipart/form-data."
+msgstr ""
+
+#: of telebot.TeleBot.send_voice:14
+msgid "Voice message caption, 0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.TeleBot.send_voice:17
+msgid "Duration of the voice message in seconds"
+msgstr ""
+
+#: of telebot.TeleBot.send_voice:25
+msgid ""
+"Mode for parsing entities in the voice message caption. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_administrator_custom_title:1
+msgid ""
+"Use this method to set a custom title for an administrator in a "
+"supergroup promoted by the bot. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_administrator_custom_title:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatadministratorcustomtitle"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_administrator_custom_title:13
+msgid ""
+"New custom title for the administrator; 0-16 characters, emoji are not "
+"allowed"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_description:1
+msgid ""
+"Use this method to change the description of a supergroup or a channel. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights."
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_description:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatdescription"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_description:10
+msgid "Str: New chat description, 0-255 characters"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_menu_button:1
+msgid ""
+"Use this method to change the bot's menu button in a private chat, or the"
+" default menu button. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_menu_button:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatmenubutton"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_menu_button:7
+msgid ""
+"Unique identifier for the target private chat. If not specified, default "
+"bot's menu button will be changed."
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_menu_button:11
+msgid ""
+"A JSON-serialized object for the new bot's menu button. Defaults to "
+"MenuButtonDefault"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_permissions:1
+msgid ""
+"Use this method to set default chat permissions for all members. The bot "
+"must be an administrator in the group or a supergroup for this to work "
+"and must have the can_restrict_members admin rights."
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_permissions:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatpermissions"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_permissions:11
+msgid "New default chat permissions"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_photo:1
+msgid ""
+"Use this method to set a new profile photo for the chat. Photos can't be "
+"changed for private chats. The bot must be an administrator in the chat "
+"for this to work and must have the appropriate admin rights. Returns True"
+" on success. Note: In regular groups (non-supergroups), this method will "
+"only work if the ‘All Members Are Admins’ setting is off in the target "
+"group."
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_photo:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setchatphoto"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_photo:13
+msgid "InputFile: New chat photo, uploaded using multipart/form-data"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_sticker_set:1
+msgid ""
+"Use this method to set a new group sticker set for a supergroup. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate administrator rights. Use the field can_set_sticker_set "
+"optionally returned in getChat requests to check if the bot can use this "
+"method. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatstickerset"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_sticker_set:10
+msgid "Name of the sticker set to be set as the group sticker set"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_sticker_set:13
+msgid "StickerSet object"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_title:1
+msgid ""
+"Use this method to change the title of a chat. Titles can't be changed "
+"for private chats. The bot must be an administrator in the chat for this "
+"to work and must have the appropriate admin rights. Returns True on "
+"success. Note: In regular groups (non-supergroups), this method will only"
+" work if the ‘All Members Are Admins’ setting is off in the target group."
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_title:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setchattitle"
+msgstr ""
+
+#: of telebot.TeleBot.set_chat_title:13
+msgid "New chat title, 1-255 characters"
+msgstr ""
+
+#: of telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail:1
+msgid ""
+"Use this method to set the thumbnail of a custom emoji sticker set. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail:7
+msgid ""
+"Custom emoji identifier of a sticker from the sticker set; pass an empty "
+"string to drop the thumbnail and use the first sticker as the thumbnail."
+msgstr ""
+
+#: of telebot.TeleBot.set_game_score:1
+msgid "Sets the value of points in the game to a specific user."
+msgstr ""
+
+#: of telebot.TeleBot.set_game_score:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setgamescore"
+msgstr ""
+
+#: of telebot.TeleBot.set_game_score:8
+msgid "New score, must be non-negative"
+msgstr ""
+
+#: of telebot.TeleBot.set_game_score:11
+msgid ""
+"Pass True, if the high score is allowed to decrease. This can be useful "
+"when fixing mistakes or banning cheaters"
+msgstr ""
+
+#: of telebot.TeleBot.set_game_score:23
+msgid ""
+"Pass True, if the game message should not be automatically edited to "
+"include the current scoreboard"
+msgstr ""
+
+#: of telebot.TeleBot.set_game_score:26
+msgid ""
+"On success, if the message was sent by the bot, returns the edited "
+"Message, otherwise returns True."
+msgstr ""
+
+#: of telebot.TeleBot.set_message_reaction:1
+msgid ""
+"Use this method to set a reaction to a message in a chat. The bot must be"
+" an administrator in the chat for this to work and must have the "
+"appropriate admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_message_reaction:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmessagereaction"
+msgstr ""
+
+#: of telebot.TeleBot.set_message_reaction:8
+msgid "Identifier of the message to set reaction to"
+msgstr ""
+
+#: of telebot.TeleBot.set_message_reaction:11
+msgid ""
+"New list of reaction types to set on the message. Currently, as non-"
+"premium users, bots can set up to one reaction per message. A custom "
+"emoji reaction can be used if it is either already present on the message"
+" or explicitly allowed by chat administrators."
+msgstr ""
+
+#: of telebot.TeleBot.set_message_reaction:15
+msgid "Pass True to set the reaction with a big animation"
+msgstr ""
+
+#: of telebot.TeleBot.set_my_commands:1
+msgid "Use this method to change the list of the bot's commands."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_commands:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setmycommands"
+msgstr ""
+
+#: of telebot.TeleBot.set_my_commands:5
+msgid "List of BotCommand. At most 100 commands can be specified."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_default_administrator_rights:1
+msgid ""
+"Use this method to change the default administrator rights requested by "
+"the bot when it's added as an administrator to groups or channels. These "
+"rights will be suggested to users, but they are are free to modify the "
+"list before adding the bot. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_default_administrator_rights:7
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmydefaultadministratorrights"
+msgstr ""
+
+#: of telebot.TeleBot.set_my_default_administrator_rights:9
+msgid ""
+"A JSON-serialized object describing new default administrator rights. If "
+"not specified, the default administrator rights will be cleared."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_default_administrator_rights:13
+msgid ""
+"Pass True to change the default administrator rights of the bot in "
+"channels. Otherwise, the default administrator rights of the bot for "
+"groups and supergroups will be changed."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_description:1
+msgid ""
+"Use this method to change the bot's description, which is shown in the "
+"chat with the bot if the chat is empty. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_description:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmydescription"
+msgstr ""
+
+#: of telebot.TeleBot.set_my_description:7
+msgid ""
+"New bot description; 0-512 characters. Pass an empty string to remove the"
+" dedicated description for the given language."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_description:10
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, the description will be "
+"applied to all users for whose language there is no dedicated "
+"description."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_name:1
+msgid "Use this method to change the bot's name. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_name:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setmyname"
+msgstr ""
+
+#: of telebot.TeleBot.set_my_name:5
+msgid ""
+"Optional. New bot name; 0-64 characters. Pass an empty string to remove "
+"the dedicated name for the given language."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_name:8
+msgid ""
+"Optional. A two-letter ISO 639-1 language code. If empty, the name will "
+"be shown to all users for whose language there is no dedicated name."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_short_description:1
+msgid ""
+"Use this method to change the bot's short description, which is shown on "
+"the bot's profile page and is sent together with the link when users "
+"share the bot. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_short_description:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmyshortdescription"
+msgstr ""
+
+#: of telebot.TeleBot.set_my_short_description:7
+msgid ""
+"New short description for the bot; 0-120 characters. Pass an empty string"
+" to remove the dedicated short description for the given language."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_short_description:10
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, the short description "
+"will be applied to all users for whose language there is no dedicated "
+"short description."
+msgstr ""
+
+#: of telebot.TeleBot.set_state:1
+msgid "Sets a new state of a user."
+msgstr ""
+
+#: of telebot.TeleBot.set_state:5
+msgid ""
+"You should set both user id and chat id in order to set state for a user "
+"in a chat. Otherwise, if you only set user_id, chat_id will equal to "
+"user_id, this means that state will be set for the user in his private "
+"chat with a bot."
+msgstr ""
+
+#: of telebot.TeleBot.set_state:12
+msgid "new state. can be string, integer, or :class:`telebot.types.State`"
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_emoji_list:1
+msgid ""
+"Use this method to set the emoji list of a custom emoji sticker set. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_emoji_list:4
+msgid "Sticker identifier"
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_emoji_list:7
+msgid "List of emoji"
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_keywords:1
+msgid ""
+"Use this method to change search keywords assigned to a regular or custom"
+" emoji sticker. The sticker must belong to a sticker set created by the "
+"bot. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_keywords:5
+#: telebot.TeleBot.set_sticker_mask_position:5
+msgid "File identifier of the sticker."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_keywords:8
+msgid ""
+"A JSON-serialized list of 0-20 search keywords for the sticker with total"
+" length of up to 64 characters"
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_mask_position:1
+msgid ""
+"Use this method to change the mask position of a mask sticker. The "
+"sticker must belong to a sticker set that was created by the bot. Returns"
+" True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_mask_position:8
+msgid ""
+"A JSON-serialized object for position where the mask should be placed on "
+"faces."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_position_in_set:1
+msgid ""
+"Use this method to move a sticker in a set created by the bot to a "
+"specific position . Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_position_in_set:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setstickerpositioninset"
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_position_in_set:8
+msgid "New sticker position in the set, zero-based"
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_set_thumbnail:1
+msgid ""
+"Use this method to set the thumbnail of a sticker set. Animated "
+"thumbnails can be set for animated sticker sets only. Returns True on "
+"success."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_set_thumbnail:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setstickersetthumb"
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_set_thumbnail:12
+msgid ""
+"A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in "
+"size and have a width and height of exactly 100px, or a .TGS animation "
+"with a thumbnail up to 32 kilobytes in size (see "
+"https://core.telegram.org/stickers#animated-sticker-requirements for "
+"animated sticker technical requirements), or a WEBM video with the "
+"thumbnail up to 32 kilobytes in size; see "
+"https://core.telegram.org/stickers#video-sticker-requirements for video "
+"sticker technical requirements. Pass a file_id as a String to send a file"
+" that already exists on the Telegram servers, pass an HTTP URL as a "
+"String for Telegram to get a file from the Internet, or upload a new one "
+"using multipart/form-data. More information on Sending Files ». Animated "
+"and video sticker set thumbnails can't be uploaded via HTTP URL. If "
+"omitted, then the thumbnail is dropped and the first sticker is used as "
+"the thumbnail."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_set_title:1
+msgid ""
+"Use this method to set the title of a created sticker set. Returns True "
+"on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_set_title:7
+msgid "New sticker set title"
+msgstr ""
+
+#: of telebot.TeleBot.set_update_listener:1
+msgid "Sets a listener function to be called when a new update is received."
+msgstr ""
+
+#: of telebot.TeleBot.set_update_listener:3
+msgid "Listener function."
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:1
+msgid ""
+"Use this method to specify a URL and receive incoming updates via an "
+"outgoing webhook. Whenever there is an update for the bot, we will send "
+"an HTTPS POST request to the specified URL, containing a JSON-serialized "
+"Update. In case of an unsuccessful request, we will give up after a "
+"reasonable amount of attempts. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:6
+msgid ""
+"If you'd like to make sure that the webhook was set by you, you can "
+"specify secret data in the parameter secret_token. If specified, the "
+"request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the "
+"secret token as content."
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:9
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#setwebhook"
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:11
+msgid ""
+"HTTPS URL to send updates to. Use an empty string to remove webhook "
+"integration, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:14
+msgid ""
+"Upload your public key certificate so that the root certificate in use "
+"can be checked, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:17
+msgid ""
+"The maximum allowed number of simultaneous HTTPS connections to the "
+"webhook for update delivery, 1-100. Defaults to 40. Use lower values to "
+"limit the load on your bot's server, and higher values to increase your "
+"bot's throughput, defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:22
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used. Please note that this parameter doesn't affect "
+"updates created before the call to the setWebhook, so unwanted updates "
+"may be received for a short period of time. Defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:22
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used."
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:27
+msgid ""
+"Please note that this parameter doesn't affect updates created before the"
+" call to the setWebhook, so unwanted updates may be received for a short "
+"period of time. Defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:42
+msgid ""
+"A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” "
+"in every webhook request, 1-256 characters. Only characters A-Z, a-z, "
+"0-9, _ and - are allowed. The header is useful to ensure that the request"
+" comes from a webhook set by you. Defaults to None"
+msgstr ""
+
+#: of telebot.TeleBot.set_webhook:47
+msgid ":obj:`bool` if the request was successful."
+msgstr ""
+
+#: of telebot.TeleBot.setup_middleware:1
+msgid "Registers class-based middleware."
+msgstr ""
+
+#: of telebot.TeleBot.setup_middleware:3
+msgid "Subclass of :class:`telebot.handler_backends.BaseMiddleware`"
+msgstr ""
+
+#: of telebot.TeleBot.shipping_query_handler:1
+msgid ""
+"Handles new incoming shipping query. Only for invoices with flexible "
+"price. As a parameter to the decorator function, it passes "
+":class:`telebot.types.ShippingQuery` object."
+msgstr ""
+
+#: of telebot.TeleBot.stop_bot:1
+msgid "Stops bot by stopping polling and closing the worker pool."
+msgstr ""
+
+#: of telebot.TeleBot.stop_message_live_location:1
+msgid ""
+"Use this method to stop updating a live location message before "
+"live_period expires. On success, if the message is not an inline message,"
+" the edited Message is returned, otherwise True is returned."
+msgstr ""
+
+#: of telebot.TeleBot.stop_message_live_location:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#stopmessagelivelocation"
+msgstr ""
+
+#: of telebot.TeleBot.stop_message_live_location:9
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the message"
+" with live location to stop"
+msgstr ""
+
+#: of telebot.TeleBot.stop_message_live_location:12
+msgid ""
+"Required if chat_id and message_id are not specified. Identifier of the "
+"inline message with live location to stop"
+msgstr ""
+
+#: of telebot.TeleBot.stop_message_live_location:22
+msgid ""
+"On success, if the message is not an inline message, the edited Message "
+"is returned, otherwise True is returned."
+msgstr ""
+
+#: of telebot.TeleBot.stop_poll:1
+msgid ""
+"Use this method to stop a poll which was sent by the bot. On success, the"
+" stopped Poll is returned."
+msgstr ""
+
+#: of telebot.TeleBot.stop_poll:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#stoppoll"
+msgstr ""
+
+#: of telebot.TeleBot.stop_poll:8
+msgid "Identifier of the original message with the poll"
+msgstr ""
+
+#: of telebot.TeleBot.stop_poll:11
+msgid "A JSON-serialized object for a new message markup."
+msgstr ""
+
+#: of telebot.TeleBot.stop_poll:14
+msgid "On success, the stopped Poll is returned."
+msgstr ""
+
+#: of telebot.TeleBot.stop_poll:15
+msgid ":obj:`types.Poll`"
+msgstr ""
+
+#: of telebot.TeleBot.stop_polling:1
+msgid "Stops polling."
+msgstr ""
+
+#: of telebot.TeleBot.stop_polling:3
+msgid "Does not accept any arguments."
+msgstr ""
+
+#: of telebot.TeleBot.unban_chat_member:1
+msgid ""
+"Use this method to unban a previously kicked user in a supergroup or "
+"channel. The user will not return to the group or channel automatically, "
+"but will be able to join via link, etc. The bot must be an administrator "
+"for this to work. By default, this method guarantees that after the call "
+"the user is not a member of the chat, but will be able to join it. So if "
+"the user is a member of the chat they will also be removed from the chat."
+" If you don't want this, use the parameter only_if_banned."
+msgstr ""
+
+#: of telebot.TeleBot.unban_chat_member:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#unbanchatmember"
+msgstr ""
+
+#: of telebot.TeleBot.unban_chat_member:9
+msgid ""
+"Unique identifier for the target group or username of the target "
+"supergroup or channel (in the format @username)"
+msgstr ""
+
+#: of telebot.TeleBot.unban_chat_member:16
+msgid "Do nothing if the user is not banned"
+msgstr ""
+
+#: of telebot.TeleBot.unban_chat_sender_chat:1
+msgid ""
+"Use this method to unban a previously banned channel chat in a supergroup"
+" or channel. The bot must be an administrator for this to work and must "
+"have the appropriate administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.unban_chat_sender_chat:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unbanchatsenderchat"
+msgstr ""
+
+#: of telebot.TeleBot.unban_chat_sender_chat:11
+msgid "Unique identifier of the target sender chat."
+msgstr ""
+
+#: of telebot.TeleBot.unhide_general_forum_topic:1
+msgid ""
+"Use this method to unhide the 'General' topic in a forum supergroup chat."
+" The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.unhide_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unhidegeneralforumtopic"
+msgstr ""
+
+#: of telebot.TeleBot.unpin_all_chat_messages:1
+msgid ""
+"Use this method to unpin a all pinned messages in a supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the appropriate admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.unpin_all_chat_messages:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinallchatmessages"
+msgstr ""
+
+#: of telebot.TeleBot.unpin_all_forum_topic_messages:1
+msgid ""
+"Use this method to clear the list of pinned messages in a forum topic. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the can_pin_messages administrator right in the supergroup. Returns "
+"True on success."
+msgstr ""
+
+#: of telebot.TeleBot.unpin_all_forum_topic_messages:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinallforumtopicmessages"
+msgstr ""
+
+#: of telebot.TeleBot.unpin_all_forum_topic_messages:10
+msgid "Identifier of the topic"
+msgstr ""
+
+#: of telebot.TeleBot.unpin_all_general_forum_topic_messages:1
+msgid ""
+"Use this method to clear the list of pinned messages in a General forum "
+"topic. The bot must be an administrator in the chat for this to work and "
+"must have the can_pin_messages administrator right in the supergroup. "
+"Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.unpin_all_general_forum_topic_messages:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinAllGeneralForumTopicMessages"
+msgstr ""
+
+#: of telebot.TeleBot.unpin_all_general_forum_topic_messages:8
+msgid "Unique identifier for the target chat or username of chat"
+msgstr ""
+
+#: of telebot.TeleBot.unpin_chat_message:1
+msgid ""
+"Use this method to unpin specific pinned message in a supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.unpin_chat_message:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinchatmessage"
+msgstr ""
+
+#: of telebot.TeleBot.unpin_chat_message:11
+msgid "Int: Identifier of a message to unpin"
+msgstr ""
+
+#: of telebot.TeleBot.upload_sticker_file:1
+msgid ""
+"Use this method to upload a .png file with a sticker for later use in "
+"createNewStickerSet and addStickerToSet methods (can be used multiple "
+"times). Returns the uploaded File on success."
+msgstr ""
+
+#: of telebot.TeleBot.upload_sticker_file:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#uploadstickerfile"
+msgstr ""
+
+#: of telebot.TeleBot.upload_sticker_file:6
+msgid "User identifier of sticker set owner"
+msgstr ""
+
+#: of telebot.TeleBot.upload_sticker_file:9
+msgid ""
+"DEPRECATED: PNG image with the sticker, must be up to 512 kilobytes in "
+"size, dimensions must not exceed 512px, and either width or height must "
+"be exactly 512px."
+msgstr ""
+
+#: of telebot.TeleBot.upload_sticker_file:13
+msgid ""
+"A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See "
+"https://core.telegram.org/stickers for technical requirements. More "
+"information on Sending Files »"
+msgstr ""
+
+#: of telebot.TeleBot.upload_sticker_file:17
+msgid "One of \"static\", \"animated\", \"video\"."
+msgstr ""
+
+#: of telebot.TeleBot.upload_sticker_file:20
+msgid "On success, the sent file is returned."
+msgstr ""
+
+#: of telebot.TeleBot.user:1
+msgid ""
+"The User object representing this bot. Equivalent to bot.get_me() but the"
+" result is cached so only one API call is needed."
+msgstr ""
+
+#: of telebot.TeleBot.user:4
+msgid "Bot's info."
+msgstr ""
+
+#: of telebot.TeleBot.user:5
+msgid ":class:`telebot.types.User`"
+msgstr ""
+
+#: ../../source/sync_version/index.rst:17
+msgid "custom_filters file"
+msgstr ""
+
+#: of telebot.custom_filters.AdvancedCustomFilter:1
+#: telebot.custom_filters.SimpleCustomFilter:1
+msgid "Bases: :py:class:`abc.ABC`"
+msgstr ""
+
+#: of telebot.custom_filters.AdvancedCustomFilter:1
+msgid ""
+"Advanced Custom Filter base class. Create child class with check() "
+"method. Accepts two parameters, returns bool: True - filter passed, False"
+" - filter failed. message: Message class text: Filter value given in "
+"handler"
+msgstr ""
+
+#: of telebot.custom_filters.AdvancedCustomFilter:7
+#: telebot.custom_filters.SimpleCustomFilter:5
+msgid "Child classes should have .key property."
+msgstr ""
+
+#: of telebot.custom_filters.AdvancedCustomFilter:9
+msgid "Example on creating an advanced custom filter."
+msgstr ""
+
+#: of telebot.custom_filters.AdvancedCustomFilter.check:1
+#: telebot.custom_filters.SimpleCustomFilter.check:1
+msgid "Perform a check."
+msgstr ""
+
+#: of telebot.custom_filters.ChatFilter:1
+#: telebot.custom_filters.LanguageFilter:1 telebot.custom_filters.StateFilter:1
+#: telebot.custom_filters.TextContainsFilter:1
+#: telebot.custom_filters.TextMatchFilter:1
+#: telebot.custom_filters.TextStartsFilter:1
+msgid "Bases: :py:class:`telebot.custom_filters.AdvancedCustomFilter`"
+msgstr ""
+
+#: of telebot.custom_filters.ChatFilter:1
+msgid "Check whether chat_id corresponds to given chat_id."
+msgstr ""
+
+#: of telebot.custom_filters.ChatFilter:3
+#: telebot.custom_filters.ForwardFilter:3
+#: telebot.custom_filters.IsAdminFilter:3
+#: telebot.custom_filters.IsDigitFilter:3
+#: telebot.custom_filters.IsReplyFilter:3
+#: telebot.custom_filters.LanguageFilter:3 telebot.custom_filters.StateFilter:3
+#: telebot.custom_filters.TextContainsFilter:5
+#: telebot.custom_filters.TextMatchFilter:3
+#: telebot.custom_filters.TextStartsFilter:3
+msgid "Example on using this filter:"
+msgstr ""
+
+#: of telebot.custom_filters.ForwardFilter:1
+#: telebot.custom_filters.IsAdminFilter:1
+#: telebot.custom_filters.IsDigitFilter:1
+#: telebot.custom_filters.IsReplyFilter:1
+msgid "Bases: :py:class:`telebot.custom_filters.SimpleCustomFilter`"
+msgstr ""
+
+#: of telebot.custom_filters.ForwardFilter:1
+msgid "Check whether message was forwarded from channel or group."
+msgstr ""
+
+#: of telebot.custom_filters.IsAdminFilter:1
+msgid "Check whether the user is administrator / owner of the chat."
+msgstr ""
+
+#: of telebot.custom_filters.IsDigitFilter:1
+msgid "Filter to check whether the string is made up of only digits."
+msgstr ""
+
+#: of telebot.custom_filters.IsReplyFilter:1
+msgid "Check whether message is a reply."
+msgstr ""
+
+#: of telebot.custom_filters.LanguageFilter:1
+msgid "Check users language_code."
+msgstr ""
+
+#: of telebot.custom_filters.SimpleCustomFilter:1
+msgid ""
+"Simple Custom Filter base class. Create child class with check() method. "
+"Accepts only message, returns bool value, that is compared with given in "
+"handler."
+msgstr ""
+
+#: of telebot.custom_filters.SimpleCustomFilter:7
+msgid "Example on creating a simple custom filter."
+msgstr ""
+
+#: of telebot.custom_filters.StateFilter:1
+msgid "Filter to check state."
+msgstr ""
+
+#: of telebot.custom_filters.TextContainsFilter:1
+msgid "Filter to check Text message. key: text"
+msgstr ""
+
+#: of telebot.custom_filters.TextFilter:1
+msgid ""
+"Advanced text filter to check (types.Message, types.CallbackQuery, "
+"types.InlineQuery, types.Poll)"
+msgstr ""
+
+#: of telebot.custom_filters.TextFilter:3
+msgid "example of usage is in examples/custom_filters/advanced_text_filter.py"
+msgstr ""
+
+#: of telebot.custom_filters.TextFilter:5
+msgid "string, True if object's text is equal to passed string"
+msgstr ""
+
+#: of telebot.custom_filters.TextFilter:8
+msgid "list[str] or tuple[str], True if any string element of iterable is in text"
+msgstr ""
+
+#: of telebot.custom_filters.TextFilter:11 telebot.custom_filters.TextFilter:14
+msgid "string, True if object's text starts with passed string"
+msgstr ""
+
+#: of telebot.custom_filters.TextFilter:17
+msgid "bool (default False), case insensitive"
+msgstr ""
+
+#: of telebot.custom_filters.TextFilter:20
+msgid "if incorrect value for a parameter was supplied"
+msgstr ""
+
+#: of telebot.custom_filters.TextMatchFilter:1
+msgid "Filter to check Text message."
+msgstr ""
+
+#: of telebot.custom_filters.TextStartsFilter:1
+msgid "Filter to check whether message starts with some text."
+msgstr ""
+
+#: ../../source/sync_version/index.rst:25
+msgid "handler_backends file"
+msgstr ""
+
+#: of telebot.handler_backends.BaseMiddleware:1
+msgid ""
+"Base class for middleware. Your middlewares should be inherited from this"
+" class."
+msgstr ""
+
+#: of telebot.handler_backends.BaseMiddleware:4
+msgid ""
+"Set update_sensitive=True if you want to get different updates on "
+"different functions. For example, if you want to handle pre_process for "
+"message update, then you will have to create pre_process_message "
+"function, and so on. Same applies to post_process."
+msgstr ""
+
+#: of telebot.handler_backends.BaseMiddleware:10
+msgid ""
+"If you want to use middleware, you have to set use_class_middlewares=True"
+" in your TeleBot instance."
+msgstr ""
+
+#: of telebot.handler_backends.BaseMiddleware:13
+msgid "Example of class-based middlewares."
+msgstr ""
+
+#: of telebot.handler_backends.CancelUpdate:1
+msgid ""
+"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."
+msgstr ""
+
+#: of telebot.handler_backends.ContinueHandling:1
+msgid ""
+"Class for continue updates in handlers. Just return instance of this "
+"class in handlers to continue process."
+msgstr ""
+
+#: of telebot.handler_backends.ContinueHandling:5
+msgid "Example of using ContinueHandling"
+msgstr ""
+
+#: of telebot.handler_backends.SkipHandler:1
+msgid ""
+"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."
+msgstr ""
+
+#: of telebot.handler_backends.State:1
+msgid "Class representing a state."
+msgstr ""
+
+#: of telebot.handler_backends.StatesGroup:1
+msgid "Class representing common states."
+msgstr ""
+
+#: ../../source/sync_version/index.rst:34
+msgid "Extensions"
+msgstr ""
+
+#: of telebot.ext.sync.webhooks:1
+msgid ""
+"This file is used by TeleBot.run_webhooks() function. Fastapi is required"
+" to run this script."
+msgstr ""
+
+#: of telebot.ext.sync.webhooks.SyncWebhookListener.run_app:1
+msgid ""
+"Run app with the given parameters to init. Not supposed to be used "
+"manually by user."
+msgstr ""
+
+#~ msgid "New name of the topic, 1-128 characters"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "New custom emoji for the topic "
+#~ "icon. Must be an emoji of type "
+#~ "“tgs” and must be exactly 1 "
+#~ "character long"
+#~ msgstr ""
+
+#~ msgid "The chat for which we want to handle new message."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Use this method to add a new "
+#~ "sticker to a set created by the"
+#~ " bot. It's required to pass "
+#~ "`png_sticker` or `tgs_sticker`. Returns True"
+#~ " on success."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional, Type of stickers in the "
+#~ "set, pass “regular” or “mask”. Custom"
+#~ " emoji sticker sets can't be created"
+#~ " via the Bot API at the moment."
+#~ " By default, a regular sticker set"
+#~ " is created."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "PNG image with the sticker, must "
+#~ "be up to 512 kilobytes in size,"
+#~ " dimensions must not exceed 512px, "
+#~ "and either width or height must be"
+#~ " exactly 512px."
+#~ msgstr ""
+
+#~ msgid "If the message is a reply, ID of the original message"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Pass True, if the message should "
+#~ "be sent even if the specified "
+#~ "replied-to message is not found"
+#~ msgstr ""
+
+#~ msgid "Disables link previews for links in this message"
+#~ msgstr ""
+
+#~ msgid "Deprecated, use non_stop. Old typo, kept for backward compatibility."
+#~ msgstr ""
+
+#~ msgid "Deprecated. Use thumbnail instead"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Pass True, if the message should "
+#~ "be sent even if one of the "
+#~ "specified replied-to messages is not "
+#~ "found."
+#~ msgstr ""
+
+#~ msgid "Protects the contents of the sent message from forwarding"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Pass True, if content of the "
+#~ "message needs to be protected from "
+#~ "being viewed by the bot."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "If True, the message content will "
+#~ "be hidden for all users except for"
+#~ " the target user"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Pass True, if the poll allows "
+#~ "multiple options to be voted "
+#~ "simultaneously."
+#~ msgstr ""
+
+#~ msgid "param chat_id"
+#~ msgstr ""
+
+#~ msgid "type chat_id"
+#~ msgstr ""
+
+#~ msgid ":obj:`int` or :obj:`str`"
+#~ msgstr ""
+
+#~ msgid "param data"
+#~ msgstr ""
+
+#~ msgid "type data"
+#~ msgstr ""
+
+#~ msgid ":obj:`str` or :class:`telebot.types.InputFile`"
+#~ msgstr ""
+
+#~ msgid "param duration"
+#~ msgstr ""
+
+#~ msgid "type duration"
+#~ msgstr ""
+
+#~ msgid "param length"
+#~ msgstr ""
+
+#~ msgid "type length"
+#~ msgstr ""
+
+#~ msgid "param reply_to_message_id"
+#~ msgstr ""
+
+#~ msgid "type reply_to_message_id"
+#~ msgstr ""
+
+#~ msgid "param reply_markup"
+#~ msgstr ""
+
+#~ msgid "type reply_markup"
+#~ msgstr ""
+
+#~ msgid ""
+#~ ":class:`telebot.types.InlineKeyboardMarkup` or "
+#~ ":class:`telebot.types.ReplyKeyboardMarkup` or "
+#~ ":class:`telebot.types.ReplyKeyboardRemove` or "
+#~ ":class:`telebot.types.ForceReply`"
+#~ msgstr ""
+
+#~ msgid "param disable_notification"
+#~ msgstr ""
+
+#~ msgid "type disable_notification"
+#~ msgstr ""
+
+#~ msgid "param timeout"
+#~ msgstr ""
+
+#~ msgid "type timeout"
+#~ msgstr ""
+
+#~ msgid "param thumbnail"
+#~ msgstr ""
+
+#~ msgid "type thumbnail"
+#~ msgstr ""
+
+#~ msgid "param allow_sending_without_reply"
+#~ msgstr ""
+
+#~ msgid "type allow_sending_without_reply"
+#~ msgstr ""
+
+#~ msgid "param protect_content"
+#~ msgstr ""
+
+#~ msgid "type protect_content"
+#~ msgstr ""
+
+#~ msgid "param message_thread_id"
+#~ msgstr ""
+
+#~ msgid "type message_thread_id"
+#~ msgstr ""
+
+#~ msgid "param thumb"
+#~ msgstr ""
+
diff --git a/docs/source/locales/en/LC_MESSAGES/types.po b/docs/source/locales/en/LC_MESSAGES/types.po
new file mode 100644
index 000000000..1dfef7706
--- /dev/null
+++ b/docs/source/locales/en/LC_MESSAGES/types.po
@@ -0,0 +1,7240 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-01-05 22:16+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../source/types.rst:3
+msgid "Types of API"
+msgstr ""
+
+#: of telebot.types.Animation:1 telebot.types.Audio:1
+#: telebot.types.BotDescription:1 telebot.types.BotName:1
+#: telebot.types.BotShortDescription:1 telebot.types.CallbackQuery:1
+#: telebot.types.Chat:1 telebot.types.ChatBoost:1
+#: telebot.types.ChatBoostRemoved:1 telebot.types.ChatBoostSource:1
+#: telebot.types.ChatBoostUpdated:1 telebot.types.ChatJoinRequest:1
+#: telebot.types.ChatMember:1 telebot.types.ChatMemberUpdated:1
+#: telebot.types.ChatPhoto:1 telebot.types.ChatShared:1
+#: telebot.types.ChosenInlineResult:1 telebot.types.Contact:1
+#: telebot.types.Document:1 telebot.types.ExternalReplyInfo:1
+#: telebot.types.File:1 telebot.types.ForumTopic:1
+#: telebot.types.ForumTopicClosed:1 telebot.types.ForumTopicCreated:1
+#: telebot.types.ForumTopicEdited:1 telebot.types.ForumTopicReopened:1
+#: telebot.types.Game:1 telebot.types.GameHighScore:1
+#: telebot.types.GeneralForumTopicHidden:1
+#: telebot.types.GeneralForumTopicUnhidden:1 telebot.types.Giveaway:1
+#: telebot.types.GiveawayCompleted:1 telebot.types.GiveawayCreated:1
+#: telebot.types.GiveawayWinners:1 telebot.types.InaccessibleMessage:1
+#: telebot.types.InlineQuery:1 telebot.types.Invoice:1 telebot.types.Message:1
+#: telebot.types.MessageAutoDeleteTimerChanged:1 telebot.types.MessageID:1
+#: telebot.types.MessageOrigin:1 telebot.types.MessageReactionCountUpdated:1
+#: telebot.types.MessageReactionUpdated:1 telebot.types.OrderInfo:1
+#: telebot.types.PhotoSize:1 telebot.types.Poll:1 telebot.types.PollOption:1
+#: telebot.types.PreCheckoutQuery:1 telebot.types.ProximityAlertTriggered:1
+#: telebot.types.ReactionCount:1 telebot.types.ShippingAddress:1
+#: telebot.types.ShippingQuery:1 telebot.types.Sticker:1
+#: telebot.types.StickerSet:1 telebot.types.Story:1
+#: telebot.types.SuccessfulPayment:1 telebot.types.TextQuote:1
+#: telebot.types.Update:1 telebot.types.UserChatBoosts:1
+#: telebot.types.UserProfilePhotos:1 telebot.types.UsersShared:1
+#: telebot.types.Venue:1 telebot.types.Video:1 telebot.types.VideoChatEnded:1
+#: telebot.types.VideoChatParticipantsInvited:1
+#: telebot.types.VideoChatScheduled:1 telebot.types.VideoChatStarted:1
+#: telebot.types.VideoNote:1 telebot.types.Voice:1 telebot.types.WebhookInfo:1
+#: telebot.types.WriteAccessAllowed:1
+msgid "Bases: :py:class:`telebot.types.JsonDeserializable`"
+msgstr ""
+
+#: of telebot.types.Animation:1
+msgid ""
+"This object represents an animation file (GIF or H.264/MPEG-4 AVC video "
+"without sound)."
+msgstr ""
+
+#: of telebot.types.Animation:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#animation"
+msgstr ""
+
+#: of telebot.types.Animation telebot.types.Audio telebot.types.BotCommand
+#: telebot.types.BotCommandScopeAllChatAdministrators
+#: telebot.types.BotCommandScopeAllGroupChats
+#: telebot.types.BotCommandScopeAllPrivateChats
+#: telebot.types.BotCommandScopeChat
+#: telebot.types.BotCommandScopeChatAdministrators
+#: telebot.types.BotCommandScopeChatMember telebot.types.BotCommandScopeDefault
+#: telebot.types.BotDescription telebot.types.BotName
+#: telebot.types.BotShortDescription telebot.types.CallbackQuery
+#: telebot.types.Chat telebot.types.ChatAdministratorRights
+#: telebot.types.ChatBoost telebot.types.ChatBoostRemoved
+#: telebot.types.ChatBoostSource telebot.types.ChatBoostSourceGiftCode
+#: telebot.types.ChatBoostSourceGiveaway telebot.types.ChatBoostSourcePremium
+#: telebot.types.ChatBoostUpdated telebot.types.ChatInviteLink
+#: telebot.types.ChatJoinRequest telebot.types.ChatLocation
+#: telebot.types.ChatMemberAdministrator telebot.types.ChatMemberBanned
+#: telebot.types.ChatMemberLeft telebot.types.ChatMemberMember
+#: telebot.types.ChatMemberOwner telebot.types.ChatMemberRestricted
+#: telebot.types.ChatMemberUpdated telebot.types.ChatPermissions
+#: telebot.types.ChatPhoto telebot.types.ChatShared
+#: telebot.types.ChosenInlineResult telebot.types.Contact telebot.types.Dice
+#: telebot.types.Document telebot.types.ExternalReplyInfo telebot.types.File
+#: telebot.types.ForceReply telebot.types.ForumTopic
+#: telebot.types.ForumTopicCreated telebot.types.ForumTopicEdited
+#: telebot.types.Game telebot.types.GameHighScore telebot.types.Giveaway
+#: telebot.types.GiveawayCompleted telebot.types.GiveawayWinners
+#: telebot.types.InaccessibleMessage telebot.types.InlineKeyboardButton
+#: telebot.types.InlineKeyboardMarkup telebot.types.InlineKeyboardMarkup.add
+#: telebot.types.InlineKeyboardMarkup.row telebot.types.InlineQuery
+#: telebot.types.InlineQueryResultArticle telebot.types.InlineQueryResultAudio
+#: telebot.types.InlineQueryResultCachedAudio
+#: telebot.types.InlineQueryResultCachedDocument
+#: telebot.types.InlineQueryResultCachedGif
+#: telebot.types.InlineQueryResultCachedMpeg4Gif
+#: telebot.types.InlineQueryResultCachedPhoto
+#: telebot.types.InlineQueryResultCachedSticker
+#: telebot.types.InlineQueryResultCachedVideo
+#: telebot.types.InlineQueryResultCachedVoice
+#: telebot.types.InlineQueryResultContact
+#: telebot.types.InlineQueryResultDocument telebot.types.InlineQueryResultGame
+#: telebot.types.InlineQueryResultGif telebot.types.InlineQueryResultLocation
+#: telebot.types.InlineQueryResultMpeg4Gif telebot.types.InlineQueryResultPhoto
+#: telebot.types.InlineQueryResultVenue telebot.types.InlineQueryResultVideo
+#: telebot.types.InlineQueryResultVoice telebot.types.InlineQueryResultsButton
+#: telebot.types.InputContactMessageContent telebot.types.InputFile
+#: telebot.types.InputInvoiceMessageContent
+#: telebot.types.InputLocationMessageContent telebot.types.InputMediaAnimation
+#: telebot.types.InputMediaAudio telebot.types.InputMediaDocument
+#: telebot.types.InputMediaPhoto telebot.types.InputMediaVideo
+#: telebot.types.InputSticker telebot.types.InputTextMessageContent
+#: telebot.types.InputVenueMessageContent telebot.types.Invoice
+#: telebot.types.KeyboardButton telebot.types.KeyboardButtonPollType
+#: telebot.types.KeyboardButtonRequestChat
+#: telebot.types.KeyboardButtonRequestUsers telebot.types.LabeledPrice
+#: telebot.types.LinkPreviewOptions telebot.types.Location
+#: telebot.types.LoginUrl telebot.types.MaskPosition
+#: telebot.types.MenuButtonCommands telebot.types.MenuButtonDefault
+#: telebot.types.MenuButtonWebApp telebot.types.Message
+#: telebot.types.MessageAutoDeleteTimerChanged telebot.types.MessageEntity
+#: telebot.types.MessageID telebot.types.MessageOrigin
+#: telebot.types.MessageOriginChannel telebot.types.MessageOriginChat
+#: telebot.types.MessageOriginHiddenUser telebot.types.MessageOriginUser
+#: telebot.types.MessageReactionCountUpdated
+#: telebot.types.MessageReactionUpdated telebot.types.OrderInfo
+#: telebot.types.PhotoSize telebot.types.Poll telebot.types.Poll.add
+#: telebot.types.PollAnswer telebot.types.PollOption
+#: telebot.types.PreCheckoutQuery telebot.types.ProximityAlertTriggered
+#: telebot.types.ReactionCount telebot.types.ReactionType
+#: telebot.types.ReactionTypeCustomEmoji telebot.types.ReactionTypeEmoji
+#: telebot.types.ReplyKeyboardMarkup telebot.types.ReplyKeyboardMarkup.add
+#: telebot.types.ReplyKeyboardMarkup.row telebot.types.ReplyKeyboardRemove
+#: telebot.types.ReplyParameters telebot.types.SentWebAppMessage
+#: telebot.types.ShippingAddress telebot.types.ShippingOption
+#: telebot.types.ShippingOption.add_price telebot.types.ShippingQuery
+#: telebot.types.Sticker telebot.types.StickerSet
+#: telebot.types.SuccessfulPayment telebot.types.SwitchInlineQueryChosenChat
+#: telebot.types.TextQuote telebot.types.Update telebot.types.User
+#: telebot.types.UserChatBoosts telebot.types.UserProfilePhotos
+#: telebot.types.UsersShared telebot.types.Venue telebot.types.Video
+#: telebot.types.VideoChatEnded telebot.types.VideoChatParticipantsInvited
+#: telebot.types.VideoChatScheduled telebot.types.VideoNote telebot.types.Voice
+#: telebot.types.WebAppData telebot.types.WebAppInfo telebot.types.WebhookInfo
+#: telebot.types.WriteAccessAllowed
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.types.Animation:5 telebot.types.Audio:5 telebot.types.Document:5
+#: telebot.types.File:5 telebot.types.PhotoSize:5 telebot.types.Sticker:5
+#: telebot.types.Video:5 telebot.types.VideoNote:5 telebot.types.Voice:5
+msgid "Identifier for this file, which can be used to download or reuse the file"
+msgstr ""
+
+#: of telebot.types.Animation:8 telebot.types.Audio:8 telebot.types.Document:8
+#: telebot.types.File:8 telebot.types.PhotoSize:8 telebot.types.Sticker:8
+#: telebot.types.Video:8 telebot.types.VideoNote:8 telebot.types.Voice:8
+msgid ""
+"Unique identifier for this file, which is supposed to be the same over "
+"time and for different bots. Can't be used to download or reuse the file."
+msgstr ""
+
+#: of telebot.types.Animation:12 telebot.types.Video:12
+msgid "Video width as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:15 telebot.types.Video:15
+msgid "Video height as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:18 telebot.types.Video:18
+#: telebot.types.VideoNote:15
+msgid "Duration of the video in seconds as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:21
+msgid "Optional. Animation thumbnail as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:24
+msgid "Optional. Original animation filename as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:27 telebot.types.Audio:24
+#: telebot.types.Document:18 telebot.types.Video:27 telebot.types.Voice:15
+msgid "Optional. MIME type of the file as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:30 telebot.types.Audio:27
+#: telebot.types.Document:21 telebot.types.File:12 telebot.types.Video:30
+#: telebot.types.Voice:18
+msgid ""
+"Optional. File size in bytes. It can be bigger than 2^31 and some "
+"programming languages may have difficulty/silent defects in interpreting "
+"it. But it has at most 52 significant bits, so a signed 64-bit integer or"
+" double-precision float type are safe for storing this value."
+msgstr ""
+
+#: of telebot.types.Animation telebot.types.Audio telebot.types.BotCommand
+#: telebot.types.BotCommandScope
+#: telebot.types.BotCommandScopeAllChatAdministrators
+#: telebot.types.BotCommandScopeAllGroupChats
+#: telebot.types.BotCommandScopeAllPrivateChats
+#: telebot.types.BotCommandScopeChat
+#: telebot.types.BotCommandScopeChatAdministrators
+#: telebot.types.BotCommandScopeChatMember telebot.types.BotCommandScopeDefault
+#: telebot.types.BotDescription telebot.types.BotName
+#: telebot.types.BotShortDescription telebot.types.CallbackQuery
+#: telebot.types.Chat telebot.types.ChatAdministratorRights
+#: telebot.types.ChatBoost telebot.types.ChatBoostRemoved
+#: telebot.types.ChatBoostSource telebot.types.ChatBoostSourceGiftCode
+#: telebot.types.ChatBoostSourceGiveaway telebot.types.ChatBoostSourcePremium
+#: telebot.types.ChatBoostUpdated telebot.types.ChatInviteLink
+#: telebot.types.ChatJoinRequest telebot.types.ChatLocation
+#: telebot.types.ChatMemberAdministrator telebot.types.ChatMemberBanned
+#: telebot.types.ChatMemberLeft telebot.types.ChatMemberMember
+#: telebot.types.ChatMemberOwner telebot.types.ChatMemberRestricted
+#: telebot.types.ChatMemberUpdated telebot.types.ChatMemberUpdated.difference
+#: telebot.types.ChatPermissions telebot.types.ChatPhoto
+#: telebot.types.ChatShared telebot.types.ChosenInlineResult
+#: telebot.types.Contact telebot.types.Dice telebot.types.Document
+#: telebot.types.ExternalReplyInfo telebot.types.File telebot.types.ForceReply
+#: telebot.types.ForumTopic telebot.types.ForumTopicCreated telebot.types.Game
+#: telebot.types.GameHighScore telebot.types.Giveaway
+#: telebot.types.GiveawayCompleted telebot.types.GiveawayWinners
+#: telebot.types.InaccessibleMessage telebot.types.InlineKeyboardButton
+#: telebot.types.InlineKeyboardMarkup telebot.types.InlineKeyboardMarkup.add
+#: telebot.types.InlineKeyboardMarkup.row telebot.types.InlineQuery
+#: telebot.types.InlineQueryResultArticle telebot.types.InlineQueryResultAudio
+#: telebot.types.InlineQueryResultCachedAudio
+#: telebot.types.InlineQueryResultCachedDocument
+#: telebot.types.InlineQueryResultCachedGif
+#: telebot.types.InlineQueryResultCachedMpeg4Gif
+#: telebot.types.InlineQueryResultCachedPhoto
+#: telebot.types.InlineQueryResultCachedSticker
+#: telebot.types.InlineQueryResultCachedVideo
+#: telebot.types.InlineQueryResultCachedVoice
+#: telebot.types.InlineQueryResultContact
+#: telebot.types.InlineQueryResultDocument telebot.types.InlineQueryResultGame
+#: telebot.types.InlineQueryResultGif telebot.types.InlineQueryResultLocation
+#: telebot.types.InlineQueryResultMpeg4Gif telebot.types.InlineQueryResultPhoto
+#: telebot.types.InlineQueryResultVenue telebot.types.InlineQueryResultVideo
+#: telebot.types.InlineQueryResultVoice telebot.types.InlineQueryResultsButton
+#: telebot.types.InputContactMessageContent
+#: telebot.types.InputInvoiceMessageContent
+#: telebot.types.InputLocationMessageContent telebot.types.InputMediaAnimation
+#: telebot.types.InputMediaAudio telebot.types.InputMediaDocument
+#: telebot.types.InputMediaPhoto telebot.types.InputMediaVideo
+#: telebot.types.InputSticker telebot.types.InputTextMessageContent
+#: telebot.types.InputVenueMessageContent telebot.types.Invoice
+#: telebot.types.KeyboardButton telebot.types.KeyboardButtonPollType
+#: telebot.types.KeyboardButtonRequestChat
+#: telebot.types.KeyboardButtonRequestUsers telebot.types.LabeledPrice
+#: telebot.types.LinkPreviewOptions telebot.types.Location
+#: telebot.types.LoginUrl telebot.types.MaskPosition
+#: telebot.types.MenuButtonCommands telebot.types.MenuButtonDefault
+#: telebot.types.MenuButtonWebApp telebot.types.Message
+#: telebot.types.MessageAutoDeleteTimerChanged telebot.types.MessageEntity
+#: telebot.types.MessageID telebot.types.MessageOrigin
+#: telebot.types.MessageReactionCountUpdated
+#: telebot.types.MessageReactionUpdated telebot.types.OrderInfo
+#: telebot.types.PhotoSize telebot.types.Poll telebot.types.PollAnswer
+#: telebot.types.PollOption telebot.types.PreCheckoutQuery
+#: telebot.types.ProximityAlertTriggered telebot.types.ReactionCount
+#: telebot.types.ReactionType telebot.types.ReactionTypeCustomEmoji
+#: telebot.types.ReactionTypeEmoji telebot.types.ReplyKeyboardMarkup
+#: telebot.types.ReplyKeyboardMarkup.add telebot.types.ReplyKeyboardMarkup.row
+#: telebot.types.ReplyKeyboardRemove telebot.types.ReplyParameters
+#: telebot.types.SentWebAppMessage telebot.types.ShippingAddress
+#: telebot.types.ShippingOption telebot.types.ShippingOption.add_price
+#: telebot.types.ShippingQuery telebot.types.Sticker telebot.types.StickerSet
+#: telebot.types.SuccessfulPayment telebot.types.SwitchInlineQueryChosenChat
+#: telebot.types.TextQuote telebot.types.Update telebot.types.User
+#: telebot.types.UserChatBoosts telebot.types.UserProfilePhotos
+#: telebot.types.UsersShared telebot.types.Venue telebot.types.Video
+#: telebot.types.VideoChatEnded telebot.types.VideoChatParticipantsInvited
+#: telebot.types.VideoChatScheduled telebot.types.VideoNote telebot.types.Voice
+#: telebot.types.WebAppData telebot.types.WebAppInfo telebot.types.WebhookInfo
+msgid "Returns"
+msgstr ""
+
+#: of telebot.types.Animation:35 telebot.types.Audio:35
+#: telebot.types.BotCommand:12 telebot.types.BotCommandScope:38
+#: telebot.types.BotCommandScopeAllChatAdministrators:8
+#: telebot.types.BotCommandScopeAllGroupChats:8
+#: telebot.types.BotCommandScopeAllPrivateChats:8
+#: telebot.types.BotCommandScopeChat:12
+#: telebot.types.BotCommandScopeChatAdministrators:12
+#: telebot.types.BotCommandScopeChatMember:15
+#: telebot.types.BotCommandScopeDefault:8 telebot.types.BotDescription:8
+#: telebot.types.BotName:8 telebot.types.BotShortDescription:8
+#: telebot.types.CallbackQuery:29 telebot.types.Chat:137
+#: telebot.types.ChatAdministratorRights:55 telebot.types.ChatBoost:17
+#: telebot.types.ChatBoostRemoved:17 telebot.types.ChatBoostSource:8
+#: telebot.types.ChatBoostSourceGiftCode:11
+#: telebot.types.ChatBoostSourceGiveaway:17
+#: telebot.types.ChatBoostSourcePremium:11 telebot.types.ChatBoostUpdated:11
+#: telebot.types.ChatInviteLink:34 telebot.types.ChatJoinRequest:27
+#: telebot.types.ChatLocation:11 telebot.types.ChatMemberAdministrator:68
+#: telebot.types.ChatMemberBanned:15 telebot.types.ChatMemberLeft:11
+#: telebot.types.ChatMemberMember:11 telebot.types.ChatMemberOwner:17
+#: telebot.types.ChatMemberRestricted:61 telebot.types.ChatMemberUpdated:27
+#: telebot.types.ChatPermissions:55 telebot.types.ChatPhoto:21
+#: telebot.types.ChatShared:15 telebot.types.ChosenInlineResult:21
+#: telebot.types.Contact:22 telebot.types.Dice:11 telebot.types.Document:26
+#: telebot.types.ExternalReplyInfo:75 telebot.types.File:21
+#: telebot.types.ForceReply:18 telebot.types.ForumTopic:17
+#: telebot.types.ForumTopicCreated:14 telebot.types.Game:25
+#: telebot.types.GameHighScore:14 telebot.types.Giveaway:29
+#: telebot.types.GiveawayCompleted:14 telebot.types.GiveawayWinners:38
+#: telebot.types.InaccessibleMessage:14 telebot.types.InlineKeyboardButton:49
+#: telebot.types.InlineKeyboardMarkup:28 telebot.types.InlineQuery:26
+#: telebot.types.InlineQueryResultArticle:38
+#: telebot.types.InlineQueryResultAudio:40
+#: telebot.types.InlineQueryResultCachedAudio:31
+#: telebot.types.InlineQueryResultCachedDocument:37
+#: telebot.types.InlineQueryResultCachedGif:33
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:33
+#: telebot.types.InlineQueryResultCachedPhoto:37
+#: telebot.types.InlineQueryResultCachedSticker:20
+#: telebot.types.InlineQueryResultCachedVideo:37
+#: telebot.types.InlineQueryResultCachedVoice:34
+#: telebot.types.InlineQueryResultContact:38
+#: telebot.types.InlineQueryResultDocument:49
+#: telebot.types.InlineQueryResultGame:17 telebot.types.InlineQueryResultGif:49
+#: telebot.types.InlineQueryResultLocation:50
+#: telebot.types.InlineQueryResultMpeg4Gif:49
+#: telebot.types.InlineQueryResultPhoto:46
+#: telebot.types.InlineQueryResultVenue:51
+#: telebot.types.InlineQueryResultVideo:53
+#: telebot.types.InlineQueryResultVoice:37
+#: telebot.types.InlineQueryResultsButton:22
+#: telebot.types.InputContactMessageContent:17
+#: telebot.types.InputInvoiceMessageContent:75
+#: telebot.types.InputLocationMessageContent:26
+#: telebot.types.InputMediaAnimation:40 telebot.types.InputMediaAudio:37
+#: telebot.types.InputMediaDocument:32 telebot.types.InputMediaPhoto:24
+#: telebot.types.InputMediaVideo:43 telebot.types.InputSticker:18
+#: telebot.types.InputTextMessageContent:22
+#: telebot.types.InputVenueMessageContent:30 telebot.types.Invoice:22
+#: telebot.types.KeyboardButton:36 telebot.types.KeyboardButtonPollType:9
+#: telebot.types.KeyboardButtonRequestChat:35
+#: telebot.types.KeyboardButtonRequestUsers:21 telebot.types.LabeledPrice:13
+#: telebot.types.LinkPreviewOptions:20 telebot.types.Location:25
+#: telebot.types.LoginUrl:24 telebot.types.MaskPosition:20
+#: telebot.types.MenuButtonCommands:8 telebot.types.MenuButtonDefault:8
+#: telebot.types.MenuButtonWebApp:15 telebot.types.Message:277
+#: telebot.types.MessageAutoDeleteTimerChanged:8 telebot.types.MessageEntity:32
+#: telebot.types.MessageID:8 telebot.types.MessageOrigin:23
+#: telebot.types.MessageReactionCountUpdated:17
+#: telebot.types.MessageReactionUpdated:26 telebot.types.OrderInfo:17
+#: telebot.types.PhotoSize:21 telebot.types.Poll:47 telebot.types.PollAnswer:18
+#: telebot.types.PollOption:11 telebot.types.PreCheckoutQuery:28
+#: telebot.types.ProximityAlertTriggered:14 telebot.types.ReactionCount:11
+#: telebot.types.ReactionType:8 telebot.types.ReactionTypeCustomEmoji:11
+#: telebot.types.ReactionTypeEmoji:11 telebot.types.ReplyKeyboardMarkup:49
+#: telebot.types.ReplyKeyboardRemove:18 telebot.types.ReplyParameters:26
+#: telebot.types.SentWebAppMessage:9 telebot.types.ShippingAddress:23
+#: telebot.types.ShippingOption:14 telebot.types.ShippingQuery:17
+#: telebot.types.Sticker:54 telebot.types.StickerSet:29
+#: telebot.types.SuccessfulPayment:28
+#: telebot.types.SwitchInlineQueryChosenChat:22 telebot.types.TextQuote:17
+#: telebot.types.Update:75 telebot.types.User:41 telebot.types.UserChatBoosts:8
+#: telebot.types.UserProfilePhotos:11 telebot.types.UsersShared:17
+#: telebot.types.Venue:27 telebot.types.Video:35 telebot.types.VideoChatEnded:8
+#: telebot.types.VideoChatParticipantsInvited:8
+#: telebot.types.VideoChatScheduled:9 telebot.types.VideoNote:24
+#: telebot.types.Voice:23 telebot.types.WebAppData:12
+#: telebot.types.WebAppInfo:8 telebot.types.WebhookInfo:37
+msgid "Instance of the class"
+msgstr ""
+
+#: of telebot.types.Animation telebot.types.Audio telebot.types.BotCommand
+#: telebot.types.BotCommandScope
+#: telebot.types.BotCommandScopeAllChatAdministrators
+#: telebot.types.BotCommandScopeAllGroupChats
+#: telebot.types.BotCommandScopeAllPrivateChats
+#: telebot.types.BotCommandScopeChat
+#: telebot.types.BotCommandScopeChatAdministrators
+#: telebot.types.BotCommandScopeChatMember telebot.types.BotCommandScopeDefault
+#: telebot.types.BotDescription telebot.types.BotName
+#: telebot.types.BotShortDescription telebot.types.CallbackQuery
+#: telebot.types.Chat telebot.types.ChatAdministratorRights
+#: telebot.types.ChatBoost telebot.types.ChatBoostRemoved
+#: telebot.types.ChatBoostSource telebot.types.ChatBoostSourceGiftCode
+#: telebot.types.ChatBoostSourceGiveaway telebot.types.ChatBoostSourcePremium
+#: telebot.types.ChatBoostUpdated telebot.types.ChatInviteLink
+#: telebot.types.ChatJoinRequest telebot.types.ChatLocation
+#: telebot.types.ChatMemberAdministrator telebot.types.ChatMemberBanned
+#: telebot.types.ChatMemberLeft telebot.types.ChatMemberMember
+#: telebot.types.ChatMemberOwner telebot.types.ChatMemberRestricted
+#: telebot.types.ChatMemberUpdated telebot.types.ChatMemberUpdated.difference
+#: telebot.types.ChatPermissions telebot.types.ChatPhoto
+#: telebot.types.ChatShared telebot.types.ChosenInlineResult
+#: telebot.types.Contact telebot.types.Dice telebot.types.Document
+#: telebot.types.ExternalReplyInfo telebot.types.File telebot.types.ForceReply
+#: telebot.types.ForumTopic telebot.types.ForumTopicCreated telebot.types.Game
+#: telebot.types.GameHighScore telebot.types.Giveaway
+#: telebot.types.GiveawayCompleted telebot.types.GiveawayWinners
+#: telebot.types.InaccessibleMessage telebot.types.InlineKeyboardButton
+#: telebot.types.InlineKeyboardMarkup telebot.types.InlineKeyboardMarkup.add
+#: telebot.types.InlineKeyboardMarkup.row telebot.types.InlineQuery
+#: telebot.types.InlineQueryResultArticle telebot.types.InlineQueryResultAudio
+#: telebot.types.InlineQueryResultCachedAudio
+#: telebot.types.InlineQueryResultCachedDocument
+#: telebot.types.InlineQueryResultCachedGif
+#: telebot.types.InlineQueryResultCachedMpeg4Gif
+#: telebot.types.InlineQueryResultCachedPhoto
+#: telebot.types.InlineQueryResultCachedSticker
+#: telebot.types.InlineQueryResultCachedVideo
+#: telebot.types.InlineQueryResultCachedVoice
+#: telebot.types.InlineQueryResultContact
+#: telebot.types.InlineQueryResultDocument telebot.types.InlineQueryResultGame
+#: telebot.types.InlineQueryResultGif telebot.types.InlineQueryResultLocation
+#: telebot.types.InlineQueryResultMpeg4Gif telebot.types.InlineQueryResultPhoto
+#: telebot.types.InlineQueryResultVenue telebot.types.InlineQueryResultVideo
+#: telebot.types.InlineQueryResultVoice telebot.types.InlineQueryResultsButton
+#: telebot.types.InputContactMessageContent
+#: telebot.types.InputInvoiceMessageContent
+#: telebot.types.InputLocationMessageContent telebot.types.InputMediaAnimation
+#: telebot.types.InputMediaAudio telebot.types.InputMediaDocument
+#: telebot.types.InputMediaPhoto telebot.types.InputMediaVideo
+#: telebot.types.InputSticker telebot.types.InputTextMessageContent
+#: telebot.types.InputVenueMessageContent telebot.types.Invoice
+#: telebot.types.KeyboardButton telebot.types.KeyboardButtonPollType
+#: telebot.types.KeyboardButtonRequestChat
+#: telebot.types.KeyboardButtonRequestUsers telebot.types.LabeledPrice
+#: telebot.types.LinkPreviewOptions telebot.types.Location
+#: telebot.types.LoginUrl telebot.types.MaskPosition
+#: telebot.types.MenuButtonCommands telebot.types.MenuButtonDefault
+#: telebot.types.MenuButtonWebApp telebot.types.Message
+#: telebot.types.MessageAutoDeleteTimerChanged telebot.types.MessageEntity
+#: telebot.types.MessageID telebot.types.MessageOrigin
+#: telebot.types.MessageReactionCountUpdated
+#: telebot.types.MessageReactionUpdated telebot.types.OrderInfo
+#: telebot.types.PhotoSize telebot.types.Poll telebot.types.PollAnswer
+#: telebot.types.PollOption telebot.types.PreCheckoutQuery
+#: telebot.types.ProximityAlertTriggered telebot.types.ReactionCount
+#: telebot.types.ReactionType telebot.types.ReactionTypeCustomEmoji
+#: telebot.types.ReactionTypeEmoji telebot.types.ReplyKeyboardMarkup
+#: telebot.types.ReplyKeyboardMarkup.add telebot.types.ReplyKeyboardMarkup.row
+#: telebot.types.ReplyKeyboardRemove telebot.types.ReplyParameters
+#: telebot.types.SentWebAppMessage telebot.types.ShippingAddress
+#: telebot.types.ShippingOption telebot.types.ShippingQuery
+#: telebot.types.Sticker telebot.types.StickerSet
+#: telebot.types.SuccessfulPayment telebot.types.SwitchInlineQueryChosenChat
+#: telebot.types.TextQuote telebot.types.Update telebot.types.User
+#: telebot.types.UserChatBoosts telebot.types.UserProfilePhotos
+#: telebot.types.UsersShared telebot.types.Venue telebot.types.Video
+#: telebot.types.VideoChatEnded telebot.types.VideoChatParticipantsInvited
+#: telebot.types.VideoChatScheduled telebot.types.VideoNote telebot.types.Voice
+#: telebot.types.WebAppData telebot.types.WebAppInfo telebot.types.WebhookInfo
+msgid "Return type"
+msgstr ""
+
+#: of telebot.types.Animation:36
+msgid ":class:`telebot.types.Animation`"
+msgstr ""
+
+#: of telebot.types.Audio:1
+msgid ""
+"This object represents an audio file to be treated as music by the "
+"Telegram clients."
+msgstr ""
+
+#: of telebot.types.Audio:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#audio"
+msgstr ""
+
+#: of telebot.types.Audio:12 telebot.types.Voice:12
+msgid "Duration of the audio in seconds as defined by sender"
+msgstr ""
+
+#: of telebot.types.Audio:15
+msgid "Optional. Performer of the audio as defined by sender or by audio tags"
+msgstr ""
+
+#: of telebot.types.Audio:18
+msgid "Optional. Title of the audio as defined by sender or by audio tags"
+msgstr ""
+
+#: of telebot.types.Audio:21 telebot.types.Document:15 telebot.types.Video:24
+msgid "Optional. Original filename as defined by sender"
+msgstr ""
+
+#: of telebot.types.Audio:32
+msgid "Optional. Thumbnail of the album cover to which the music file belongs"
+msgstr ""
+
+#: of telebot.types.Audio:36
+msgid ":class:`telebot.types.Audio`"
+msgstr ""
+
+#: of telebot.types.BotCommand:1 telebot.types.ChatInviteLink:1
+#: telebot.types.ChatLocation:1 telebot.types.PollAnswer:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonSerializable`, "
+":py:class:`telebot.types.JsonDeserializable`, "
+":py:class:`telebot.types.Dictionaryable`"
+msgstr ""
+
+#: of telebot.types.BotCommand:1
+msgid "This object represents a bot command."
+msgstr ""
+
+#: of telebot.types.BotCommand:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#botcommand"
+msgstr ""
+
+#: of telebot.types.BotCommand:5
+msgid ""
+"Text of the command; 1-32 characters. Can contain only lowercase English "
+"letters, digits and underscores."
+msgstr ""
+
+#: of telebot.types.BotCommand:9
+msgid "Description of the command; 1-256 characters."
+msgstr ""
+
+#: of telebot.types.BotCommand:13
+msgid ":class:`telebot.types.BotCommand`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:1
+#: telebot.types.InlineQueryResultCachedBase:1
+msgid "Bases: :py:class:`abc.ABC`, :py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:1
+msgid ""
+"This object represents the scope to which bot commands are applied. "
+"Currently, the following 7 scopes are supported:"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:3 telebot.types.BotCommandScope:21
+#: telebot.types.BotCommandScope:36
+msgid ":class:`BotCommandScopeDefault`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:4 telebot.types.BotCommandScope:19
+msgid ":class:`BotCommandScopeAllPrivateChats`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:5 telebot.types.BotCommandScope:34
+msgid ":class:`BotCommandScopeAllGroupChats`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:6
+msgid ":class:`BotCommandScopeAllChatAdministrators`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:7 telebot.types.BotCommandScope:17
+#: telebot.types.BotCommandScope:30
+msgid ":class:`BotCommandScopeChat`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:8
+msgid ":class:`BotCommandScopeChatAdministrators`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:9 telebot.types.BotCommandScope:26
+msgid ":class:`BotCommandScopeChatMember`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:11
+msgid ""
+"Determining list of commands The following algorithm is used to determine"
+" the list of commands for a particular user viewing the bot menu. The "
+"first list of commands which is set is returned:"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:14
+msgid "Commands in the chat with the bot:"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:16 telebot.types.BotCommandScope:29
+msgid ":class:`BotCommandScopeChat` + language_code"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:18
+msgid ":class:`BotCommandScopeAllPrivateChats` + language_code"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:20 telebot.types.BotCommandScope:35
+msgid ":class:`BotCommandScopeDefault` + language_code"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:23
+msgid "Commands in group and supergroup chats:"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:25
+msgid ":class:`BotCommandScopeChatMember` + language_code"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:27
+msgid ""
+":class:`BotCommandScopeChatAdministrators` + language_code "
+"(administrators only)"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:28
+msgid ":class:`BotCommandScopeChatAdministrators` (administrators only)"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:31
+msgid ""
+":class:`BotCommandScopeAllChatAdministrators` + language_code "
+"(administrators only)"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:32
+msgid ":class:`BotCommandScopeAllChatAdministrators` (administrators only)"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:33
+msgid ":class:`BotCommandScopeAllGroupChats` + language_code"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:39
+msgid ":class:`telebot.types.BotCommandScope`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllChatAdministrators:1
+#: telebot.types.BotCommandScopeAllGroupChats:1
+#: telebot.types.BotCommandScopeAllPrivateChats:1
+#: telebot.types.BotCommandScopeChat:1
+#: telebot.types.BotCommandScopeChatAdministrators:1
+#: telebot.types.BotCommandScopeChatMember:1
+#: telebot.types.BotCommandScopeDefault:1
+msgid "Bases: :py:class:`telebot.types.BotCommandScope`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllChatAdministrators:1
+msgid ""
+"Represents the scope of bot commands, covering all group and supergroup "
+"chat administrators."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllChatAdministrators:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopeallchatadministrators"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllChatAdministrators:5
+msgid "Scope type, must be all_chat_administrators"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllChatAdministrators:9
+msgid ":class:`telebot.types.BotCommandScopeAllChatAdministrators`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllGroupChats:1
+msgid ""
+"Represents the scope of bot commands, covering all group and supergroup "
+"chats."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllGroupChats:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopeallgroupchats"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllGroupChats:5
+msgid "Scope type, must be all_group_chats"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllGroupChats:9
+msgid ":class:`telebot.types.BotCommandScopeAllGroupChats`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllPrivateChats:1
+msgid "Represents the scope of bot commands, covering all private chats."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllPrivateChats:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopeallprivatechats"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllPrivateChats:5
+msgid "Scope type, must be all_private_chats"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllPrivateChats:9
+msgid ":class:`telebot.types.BotCommandScopeAllPrivateChats`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChat:1
+msgid "Represents the scope of bot commands, covering a specific chat."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChat:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopechat"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChat:5
+msgid "Scope type, must be chat"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChat:8
+#: telebot.types.BotCommandScopeChatAdministrators:8
+#: telebot.types.BotCommandScopeChatMember:8
+msgid ""
+"Unique identifier for the target chat or username of the target "
+"supergroup (in the format @supergroupusername)"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChat:13
+msgid ":class:`telebot.types.BotCommandScopeChat`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatAdministrators:1
+msgid ""
+"Represents the scope of bot commands, covering all administrators of a "
+"specific group or supergroup chat."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatAdministrators:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopechatadministrators"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatAdministrators:5
+msgid "Scope type, must be chat_administrators"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatAdministrators:13
+msgid ":class:`telebot.types.BotCommandScopeChatAdministrators`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatMember:1
+msgid ""
+"Represents the scope of bot commands, covering a specific member of a "
+"group or supergroup chat."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatMember:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopechatmember"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatMember:5
+msgid "Scope type, must be chat_member"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatMember:12
+msgid "Unique identifier of the target user"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatMember:16
+msgid ":class:`telebot.types.BotCommandScopeChatMember`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeDefault:1
+msgid ""
+"Represents the default scope of bot commands. Default commands are used "
+"if no commands with a narrower scope are specified for the user."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeDefault:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopedefault"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeDefault:5
+msgid "Scope type, must be default"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeDefault:9
+msgid ":class:`telebot.types.BotCommandScopeDefault`"
+msgstr ""
+
+#: of telebot.types.BotDescription:1
+msgid "This object represents a bot description."
+msgstr ""
+
+#: of telebot.types.BotDescription:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#botdescription"
+msgstr ""
+
+#: of telebot.types.BotDescription:5
+msgid "Bot description"
+msgstr ""
+
+#: of telebot.types.BotDescription:9
+msgid ":class:`telebot.types.BotDescription`"
+msgstr ""
+
+#: of telebot.types.BotName:1
+msgid "This object represents a bot name."
+msgstr ""
+
+#: of telebot.types.BotName:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#botname"
+msgstr ""
+
+#: of telebot.types.BotName:5
+msgid "The bot name"
+msgstr ""
+
+#: of telebot.types.BotName:9
+msgid ":class:`BotName`"
+msgstr ""
+
+#: of telebot.types.BotShortDescription:1
+msgid "This object represents a bot short description."
+msgstr ""
+
+#: of telebot.types.BotShortDescription:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#botshortdescription"
+msgstr ""
+
+#: of telebot.types.BotShortDescription:5
+msgid "Bot short description"
+msgstr ""
+
+#: of telebot.types.BotShortDescription:9
+msgid ":class:`telebot.types.BotShortDescription`"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:1
+msgid ""
+"This object represents an incoming callback query from a callback button "
+"in an inline keyboard. If the button that originated the query was "
+"attached to a message sent by the bot, the field message will be present."
+" If the button was attached to a message sent via the bot (in inline "
+"mode), the field inline_message_id will be present. Exactly one of the "
+"fields data or game_short_name will be present."
+msgstr ""
+
+#: of telebot.types.CallbackQuery:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#callbackquery"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:5 telebot.types.InlineQuery:5
+msgid "Unique identifier for this query"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:8 telebot.types.InlineQuery:8
+msgid "Sender"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:11
+msgid ""
+"Optional. Message sent by the bot with the callback button that "
+"originated the query"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:14
+msgid ""
+"Optional. Identifier of the message sent via the bot in inline mode, that"
+" originated the query."
+msgstr ""
+
+#: of telebot.types.CallbackQuery:18
+msgid ""
+"Global identifier, uniquely corresponding to the chat to which the "
+"message with the callback button was sent. Useful for high scores in "
+"games."
+msgstr ""
+
+#: of telebot.types.CallbackQuery:22
+msgid ""
+"Optional. Data associated with the callback button. Be aware that the "
+"message originated the query can contain no callback buttons with this "
+"data."
+msgstr ""
+
+#: of telebot.types.CallbackQuery:26
+msgid ""
+"Optional. Short name of a Game to be returned, serves as the unique "
+"identifier for the game"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:30
+msgid ":class:`telebot.types.CallbackQuery`"
+msgstr ""
+
+#: of telebot.types.Chat:1
+msgid "This object represents a chat."
+msgstr ""
+
+#: of telebot.types.Chat:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chat"
+msgstr ""
+
+#: of telebot.types.Chat:5
+msgid ""
+"Unique identifier for this chat. This number may have more than 32 "
+"significant bits and some programming languages may have "
+"difficulty/silent defects in interpreting it. But it has at most 52 "
+"significant bits, so a signed 64-bit integer or double-precision float "
+"type are safe for storing this identifier."
+msgstr ""
+
+#: of telebot.types.Chat:10
+msgid "Type of chat, can be either “private”, “group”, “supergroup” or “channel”"
+msgstr ""
+
+#: of telebot.types.Chat:13
+msgid "Optional. Title, for supergroups, channels and group chats"
+msgstr ""
+
+#: of telebot.types.Chat:16
+msgid ""
+"Optional. Username, for private chats, supergroups and channels if "
+"available"
+msgstr ""
+
+#: of telebot.types.Chat:19
+msgid "Optional. First name of the other party in a private chat"
+msgstr ""
+
+#: of telebot.types.Chat:22
+msgid "Optional. Last name of the other party in a private chat"
+msgstr ""
+
+#: of telebot.types.Chat:25
+msgid "Optional. True, if the supergroup chat is a forum (has topics enabled)"
+msgstr ""
+
+#: of telebot.types.Chat:28
+msgid "Optional. Chat photo. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:31
+msgid ""
+"Optional. If non-empty, the list of all active chat usernames; for "
+"private chats, supergroups and channels. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:35
+msgid ""
+"Optional. List of available chat reactions; for private chats, "
+"supergroups and channels. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:39
+msgid ""
+"Optional. Optional. Identifier of the accent color for the chat name and "
+"backgrounds of the chat photo, reply header, and link preview. See accent"
+" colors for more details. Returned only in getChat. Always returned in "
+"getChat."
+msgstr ""
+
+#: of telebot.types.Chat:43
+msgid ""
+"Optional. Custom emoji identifier of emoji chosen by the chat for the "
+"reply header and link preview background. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:47
+msgid ""
+"Optional. Identifier of the accent color for the chat's profile "
+"background. See profile accent colors for more details. Returned only in "
+"getChat."
+msgstr ""
+
+#: of telebot.types.Chat:51
+msgid ""
+"Optional. Custom emoji identifier of the emoji chosen by the chat for its"
+" profile background. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:55
+msgid ""
+"Optional. Custom emoji identifier of emoji status of the other party in a"
+" private chat. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:59
+msgid ""
+"Optional. Expiration date of the emoji status of the other party in a "
+"private chat, if any. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:63
+msgid ""
+"Optional. Bio of the other party in a private chat. Returned only in "
+"getChat."
+msgstr ""
+
+#: of telebot.types.Chat:66
+msgid ""
+"Optional. :obj:`bool`, if privacy settings of the other party in the "
+"private chat allows to use tg://user?id= links only in chats "
+"with the user. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:70
+msgid ""
+"Optional. True, if the privacy settings of the other party restrict "
+"sending voice and video note messages in the private chat. Returned only "
+"in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:72
+msgid ":type :obj:`bool`"
+msgstr ""
+
+#: of telebot.types.Chat:74
+msgid ""
+"Optional. :obj:`bool`, if users need to join the supergroup before they "
+"can send messages. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:78
+msgid ""
+"Optional. :obj:`bool`, if all users directly joining the supergroup need "
+"to be approved by supergroup administrators. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:82
+msgid ""
+"Optional. Description, for groups, supergroups and channel chats. "
+"Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:85
+msgid ""
+"Optional. Primary invite link, for groups, supergroups and channel chats."
+" Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:89
+msgid ""
+"Optional. The most recent pinned message (by sending date). Returned only"
+" in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:92
+msgid ""
+"Optional. Default chat member permissions, for groups and supergroups. "
+"Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:96
+msgid ""
+"Optional. For supergroups, the minimum allowed delay between consecutive "
+"messages sent by each unpriviledged user; in seconds. Returned only in "
+"getChat."
+msgstr ""
+
+#: of telebot.types.Chat:100
+msgid ""
+"Optional. The time after which all messages sent to the chat will be "
+"automatically deleted; in seconds. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:104
+msgid ""
+"Optional. :obj:`bool`, if the chat has enabled aggressive anti-spam "
+"protection. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:108
+msgid ""
+"Optional. :obj:`bool`, if the chat has enabled hidden members. Returned "
+"only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:112
+msgid ""
+"Optional. :obj:`bool`, if messages from the chat can't be forwarded to "
+"other chats. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:116
+msgid ""
+"Optional. True, if new chat members will have access to old messages; "
+"available only to chat administrators. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:120
+msgid ""
+"Optional. For supergroups, name of group sticker set. Returned only in "
+"getChat."
+msgstr ""
+
+#: of telebot.types.Chat:123
+msgid ""
+"Optional. :obj:`bool`, if the bot can change the group sticker set. "
+"Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:127
+msgid ""
+"Optional. Unique identifier for the linked chat, i.e. the discussion "
+"group identifier for a channel and vice versa; for supergroups and "
+"channel chats. This identifier may be greater than 32 bits and some "
+"programming languages may have difficulty/silent defects in interpreting "
+"it. But it is smaller than 52 bits, so a signed 64 bit integer or double-"
+"precision float type are safe for storing this identifier. Returned only "
+"in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:133
+msgid ""
+"Optional. For supergroups, the location to which the supergroup is "
+"connected. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:138
+msgid ":class:`telebot.types.Chat`"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:1 telebot.types.ChatPermissions:1
+#: telebot.types.Location:1 telebot.types.MenuButton:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonDeserializable`, "
+":py:class:`telebot.types.JsonSerializable`, "
+":py:class:`telebot.types.Dictionaryable`"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:1
+msgid "Represents the rights of an administrator in a chat."
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatadministratorrights"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:5
+#: telebot.types.ChatMemberAdministrator:14 telebot.types.ChatMemberOwner:11
+msgid "True, if the user's presence in the chat is hidden"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:8
+#: telebot.types.ChatMemberAdministrator:17
+msgid ""
+"True, if the administrator can access the chat event log, chat "
+"statistics, message statistics in channels, see channel members, see "
+"anonymous administrators in supergroups and ignore slow mode. Implied by "
+"any other administrator privilege"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:13
+#: telebot.types.ChatMemberAdministrator:22
+msgid "True, if the administrator can delete messages of other users"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:16
+#: telebot.types.ChatMemberAdministrator:25
+msgid "True, if the administrator can manage video chats"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:19
+#: telebot.types.ChatMemberAdministrator:28
+msgid "True, if the administrator can restrict, ban or unban chat members"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:22
+#: telebot.types.ChatMemberAdministrator:31
+msgid ""
+"True, if the administrator can add new administrators with a subset of "
+"their own privileges or demote administrators that he has promoted, "
+"directly or indirectly (promoted by administrators that were appointed by"
+" the user)"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:27
+#: telebot.types.ChatMemberAdministrator:36
+#: telebot.types.ChatMemberRestricted:14
+msgid ""
+"True, if the user is allowed to change the chat title, photo and other "
+"settings"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:30
+#: telebot.types.ChatMemberAdministrator:39
+#: telebot.types.ChatMemberRestricted:17
+msgid "True, if the user is allowed to invite new users to the chat"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:33
+#: telebot.types.ChatMemberAdministrator:42
+msgid ""
+"Optional. True, if the administrator can post in the channel; channels "
+"only"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:36
+#: telebot.types.ChatMemberAdministrator:45
+msgid ""
+"Optional. True, if the administrator can edit messages of other users and"
+" can pin messages; channels only"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:40
+#: telebot.types.ChatMemberAdministrator:49
+msgid ""
+"Optional. True, if the user is allowed to pin messages; groups and "
+"supergroups only"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:43
+#: telebot.types.ChatMemberAdministrator:52
+msgid ""
+"Optional. True, if the user is allowed to create, rename, close, and "
+"reopen forum topics; supergroups only"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:46
+#: telebot.types.ChatMemberAdministrator:59
+msgid "Optional. True, if the administrator can post channel stories"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:49
+#: telebot.types.ChatMemberAdministrator:62
+msgid "Optional. True, if the administrator can edit stories"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:52
+#: telebot.types.ChatMemberAdministrator:65
+msgid "Optional. True, if the administrator can delete stories of other users"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:56
+msgid ":class:`telebot.types.ChatAdministratorRights`"
+msgstr ""
+
+#: of telebot.types.ChatBoost:1
+msgid "This object contains information about a chat boost."
+msgstr ""
+
+#: of telebot.types.ChatBoost:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#chatboost"
+msgstr ""
+
+#: of telebot.types.ChatBoost:5 telebot.types.ChatBoostRemoved:8
+msgid "Unique identifier of the boost"
+msgstr ""
+
+#: of telebot.types.ChatBoost:8
+msgid "Point in time (Unix timestamp) when the chat was boosted"
+msgstr ""
+
+#: of telebot.types.ChatBoost:11
+msgid ""
+"Point in time (Unix timestamp) when the boost will automatically expire, "
+"unless the booster's Telegram Premium subscription is prolonged"
+msgstr ""
+
+#: of telebot.types.ChatBoost:14
+msgid "Source of the added boost"
+msgstr ""
+
+#: of telebot.types.ChatBoost:18
+msgid ":class:`ChatBoost`"
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:1
+msgid "This object represents a boost removed from a chat."
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#chatboostremoved"
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:5 telebot.types.ChatBoostUpdated:5
+msgid "Chat which was boosted"
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:11
+msgid "Point in time (Unix timestamp) when the boost was removed"
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:14
+msgid "Source of the removed boost"
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:18
+msgid ":class:`ChatBoostRemoved`"
+msgstr ""
+
+#: of telebot.types.ChatBoostSource:1
+msgid "This object describes the source of a chat boost."
+msgstr ""
+
+#: of telebot.types.ChatBoostSource:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#chatboostsource"
+msgstr ""
+
+#: of telebot.types.ChatBoostSource:5
+msgid "Source of the boost"
+msgstr ""
+
+#: of telebot.types.ChatBoostSource:9
+msgid ":class:`ChatBoostSource`"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:1
+#: telebot.types.ChatBoostSourceGiveaway:1
+#: telebot.types.ChatBoostSourcePremium:1
+msgid "Bases: :py:class:`telebot.types.ChatBoostSource`"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:1
+msgid ""
+"The boost was obtained by the creation of Telegram Premium gift codes to "
+"boost a chat."
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#chatboostsourcegiftcode"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:5
+msgid "Source of the boost, always “gift_code”"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:8
+msgid "User for which the gift code was created"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:12
+msgid ":class:`ChatBoostSourceGiftCode`"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:1
+msgid "The boost was obtained by the creation of a Telegram Premium giveaway."
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#chatboostsourcegiveaway"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:5
+msgid "Source of the boost, always “giveaway”"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:8
+msgid ""
+"Identifier of a message in the chat with the giveaway; the message could "
+"have been deleted already. May be 0 if the message isn't sent yet."
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:11
+msgid "User that won the prize in the giveaway if any"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:14
+msgid ""
+"True, if the giveaway was completed, but there was no user to win the "
+"prize"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:18
+msgid ":class:`ChatBoostSourceGiveaway`"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourcePremium:1
+msgid ""
+"The boost was obtained by subscribing to Telegram Premium or by gifting a"
+" Telegram Premium subscription to another user."
+msgstr ""
+
+#: of telebot.types.ChatBoostSourcePremium:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#chatboostsourcepremium"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourcePremium:5
+msgid "Source of the boost, always “premium”"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourcePremium:8
+msgid "User that boosted the chat"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourcePremium:12
+msgid ":class:`ChatBoostSourcePremium`"
+msgstr ""
+
+#: of telebot.types.ChatBoostUpdated:1
+msgid "This object represents a boost added to a chat or changed."
+msgstr ""
+
+#: of telebot.types.ChatBoostUpdated:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#chatboostupdated"
+msgstr ""
+
+#: of telebot.types.ChatBoostUpdated:8
+msgid "Infomation about the chat boost"
+msgstr ""
+
+#: of telebot.types.ChatBoostUpdated:12
+msgid ":class:`ChatBoostUpdated`"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:1
+msgid "Represents an invite link for a chat."
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatinvitelink"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:5
+msgid ""
+"The invite link. If the link was created by another chat administrator, "
+"then the second part of the link will be replaced with “…”."
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:9
+msgid "Creator of the link"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:12
+msgid ""
+"True, if users joining the chat via the link need to be approved by chat "
+"administrators"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:15
+msgid "True, if the link is primary"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:18
+msgid "True, if the link is revoked"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:21
+msgid "Optional. Invite link name"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:24
+msgid ""
+"Optional. Point in time (Unix timestamp) when the link will expire or has"
+" been expired"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:27
+msgid ""
+"Optional. The maximum number of users that can be members of the chat "
+"simultaneously after joining the chat via this invite link; 1-99999"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:31
+msgid "Optional. Number of pending join requests created using this link"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:35
+msgid ":class:`telebot.types.ChatInviteLink`"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:1
+msgid "Represents a join request sent to a chat."
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatjoinrequest"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:5
+msgid "Chat to which the request was sent"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:8
+msgid "User that sent the join request"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:11
+msgid ""
+"Optional. Identifier of a private chat with the user who sent the join "
+"request. This number may have more than 32 significant bits and some "
+"programming languages may have difficulty/silent defects in interpreting "
+"it. But it has at most 52 significant bits, so a 64-bit integer or "
+"double-precision float type are safe for storing this identifier. The bot"
+" can use this identifier for 24 hours to send messages until the join "
+"request is processed, assuming no other administrator contacted the user."
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:18
+msgid "Date the request was sent in Unix time"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:21
+msgid "Optional. Bio of the user."
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:24
+msgid ""
+"Optional. Chat invite link that was used by the user to send the join "
+"request"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:28
+msgid ":class:`telebot.types.ChatJoinRequest`"
+msgstr ""
+
+#: of telebot.types.ChatLocation:1
+msgid "Represents a location to which a chat is connected."
+msgstr ""
+
+#: of telebot.types.ChatLocation:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatlocation"
+msgstr ""
+
+#: of telebot.types.ChatLocation:5
+msgid ""
+"The location to which the supergroup is connected. Can't be a live "
+"location."
+msgstr ""
+
+#: of telebot.types.ChatLocation:8
+msgid "Location address; 1-64 characters, as defined by the chat owner"
+msgstr ""
+
+#: of telebot.types.ChatLocation:12
+msgid ":class:`telebot.types.ChatLocation`"
+msgstr ""
+
+#: of telebot.types.ChatMember:1
+msgid ""
+"This object contains information about one member of a chat. Currently, "
+"the following 6 types of chat members are supported:"
+msgstr ""
+
+#: of telebot.types.ChatMember:4 telebot.types.ChatMemberOwner:18
+msgid ":class:`telebot.types.ChatMemberOwner`"
+msgstr ""
+
+#: of telebot.types.ChatMember:5 telebot.types.ChatMemberAdministrator:69
+msgid ":class:`telebot.types.ChatMemberAdministrator`"
+msgstr ""
+
+#: of telebot.types.ChatMember:6 telebot.types.ChatMemberMember:12
+msgid ":class:`telebot.types.ChatMemberMember`"
+msgstr ""
+
+#: of telebot.types.ChatMember:7 telebot.types.ChatMemberRestricted:62
+msgid ":class:`telebot.types.ChatMemberRestricted`"
+msgstr ""
+
+#: of telebot.types.ChatMember:8 telebot.types.ChatMemberLeft:12
+msgid ":class:`telebot.types.ChatMemberLeft`"
+msgstr ""
+
+#: of telebot.types.ChatMember:9 telebot.types.ChatMemberBanned:16
+msgid ":class:`telebot.types.ChatMemberBanned`"
+msgstr ""
+
+#: of telebot.types.ChatMember:11
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatmember"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:1 telebot.types.ChatMemberBanned:1
+#: telebot.types.ChatMemberLeft:1 telebot.types.ChatMemberMember:1
+#: telebot.types.ChatMemberOwner:1 telebot.types.ChatMemberRestricted:1
+msgid "Bases: :py:class:`telebot.types.ChatMember`"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:1
+msgid "Represents a chat member that has some additional privileges."
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatmemberadministrator"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:5
+msgid "The member's status in the chat, always “administrator”"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:8 telebot.types.ChatMemberBanned:8
+#: telebot.types.ChatMemberLeft:8 telebot.types.ChatMemberMember:8
+#: telebot.types.ChatMemberOwner:8 telebot.types.ChatMemberRestricted:8
+msgid "Information about the user"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:11
+msgid "True, if the bot is allowed to edit administrator privileges of that user"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:56 telebot.types.ChatMemberOwner:14
+msgid "Optional. Custom title for this user"
+msgstr ""
+
+#: of telebot.types.ChatMemberBanned:1
+msgid ""
+"Represents a chat member that was banned in the chat and can't return to "
+"the chat or view chat messages."
+msgstr ""
+
+#: of telebot.types.ChatMemberBanned:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatmemberbanned"
+msgstr ""
+
+#: of telebot.types.ChatMemberBanned:5
+msgid "The member's status in the chat, always “kicked”"
+msgstr ""
+
+#: of telebot.types.ChatMemberBanned:11
+msgid ""
+"Date when restrictions will be lifted for this user; unix time. If 0, "
+"then the user is banned forever"
+msgstr ""
+
+#: of telebot.types.ChatMemberLeft:1
+msgid ""
+"Represents a chat member that isn't currently a member of the chat, but "
+"may join it themselves."
+msgstr ""
+
+#: of telebot.types.ChatMemberLeft:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatmemberleft"
+msgstr ""
+
+#: of telebot.types.ChatMemberLeft:5
+msgid "The member's status in the chat, always “left”"
+msgstr ""
+
+#: of telebot.types.ChatMemberMember:1
+msgid ""
+"Represents a chat member that has no additional privileges or "
+"restrictions."
+msgstr ""
+
+#: of telebot.types.ChatMemberMember:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatmembermember"
+msgstr ""
+
+#: of telebot.types.ChatMemberMember:5
+msgid "The member's status in the chat, always “member”"
+msgstr ""
+
+#: of telebot.types.ChatMemberOwner:1
+msgid ""
+"Represents a chat member that owns the chat and has all administrator "
+"privileges."
+msgstr ""
+
+#: of telebot.types.ChatMemberOwner:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatmemberowner"
+msgstr ""
+
+#: of telebot.types.ChatMemberOwner:5
+msgid "The member's status in the chat, always “creator”"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:1
+msgid ""
+"Represents a chat member that is under certain restrictions in the chat. "
+"Supergroups only."
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatmemberrestricted"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:5
+msgid "The member's status in the chat, always “restricted”"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:11
+msgid "True, if the user is a member of the chat at the moment of the request"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:20
+msgid "True, if the user is allowed to pin messages"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:23
+msgid "True, if the user is allowed to create forum topics"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:26
+msgid ""
+"True, if the user is allowed to send text messages, contacts, locations "
+"and venues"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:29
+msgid "True, if the user is allowed to send audios"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:32
+msgid "True, if the user is allowed to send documents"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:35
+msgid "True, if the user is allowed to send photos"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:38
+msgid "True, if the user is allowed to send videos"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:41
+msgid "True, if the user is allowed to send video notes"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:44
+msgid "True, if the user is allowed to send voice notes"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:47
+msgid "True, if the user is allowed to send polls"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:50
+msgid ""
+"True, if the user is allowed to send animations, games, stickers and use "
+"inline bots"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:54
+msgid "True, if the user is allowed to add web page previews to their messages"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:57
+msgid ""
+"Date when restrictions will be lifted for this user; unix time. If 0, "
+"then the user is restricted forever"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:1
+msgid "This object represents changes in the status of a chat member."
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatmemberupdated"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:5
+msgid "Chat the user belongs to"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:8
+msgid "Performer of the action, which resulted in the change"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:11
+msgid "Date the change was done in Unix time"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:14
+msgid "Previous information about the chat member"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:17
+msgid "New information about the chat member"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:20
+msgid ""
+"Optional. Chat invite link, which was used by the user to join the chat; "
+"for joining by invite link events only."
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:24
+msgid "Optional. True, if the user joined the chat via a chat folder invite link"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:28
+msgid ":class:`telebot.types.ChatMemberUpdated`"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated.difference:1
+msgid ""
+"Get the difference between `old_chat_member` and `new_chat_member` as a "
+"dict in the following format {'parameter': [old_value, new_value]} E.g "
+"{'status': ['member', 'kicked'], 'until_date': [None, 1625055092]}"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated.difference:6
+msgid "Dict of differences"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:1
+msgid ""
+"Describes actions that a non-administrator user is allowed to take in a "
+"chat."
+msgstr ""
+
+#: of telebot.types.ChatPermissions:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatpermissions"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:5
+msgid ""
+"Optional. True, if the user is allowed to send text messages, contacts, "
+"locations and venues"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:9
+msgid "Optional. True, if the user is allowed to send audios"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:12
+msgid "Optional. True, if the user is allowed to send documents"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:15
+msgid "Optional. True, if the user is allowed to send photos"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:18
+msgid "Optional. True, if the user is allowed to send videos"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:21
+msgid "Optional. True, if the user is allowed to send video notes"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:24
+msgid "Optional. True, if the user is allowed to send voice notes"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:27
+msgid ""
+"Optional. True, if the user is allowed to send polls, implies "
+"can_send_messages"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:30
+msgid ""
+"Optional. True, if the user is allowed to send animations, games, "
+"stickers and use inline bots"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:34
+msgid ""
+"Optional. True, if the user is allowed to add web page previews to their "
+"messages"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:38
+msgid ""
+"Optional. True, if the user is allowed to change the chat title, photo "
+"and other settings. Ignored in public supergroups"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:42
+msgid "Optional. True, if the user is allowed to invite new users to the chat"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:45
+msgid ""
+"Optional. True, if the user is allowed to pin messages. Ignored in public"
+" supergroups"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:48
+msgid ""
+"Optional. True, if the user is allowed to create forum topics. If omitted"
+" defaults to the value of can_pin_messages"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:52 telebot.types.Message:27
+#: telebot.types.Message:30 telebot.types.Message:37 telebot.types.Message:40
+#: telebot.types.Message:43
+msgid "deprecated."
+msgstr ""
+
+#: of telebot.types.ChatPermissions:56
+msgid ":class:`telebot.types.ChatPermissions`"
+msgstr ""
+
+#: of telebot.types.ChatPhoto:1
+msgid "This object represents a chat photo."
+msgstr ""
+
+#: of telebot.types.ChatPhoto:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatphoto"
+msgstr ""
+
+#: of telebot.types.ChatPhoto:5
+msgid ""
+"File identifier of small (160x160) chat photo. This file_id can be used "
+"only for photo download and only for as long as the photo is not changed."
+msgstr ""
+
+#: of telebot.types.ChatPhoto:9
+msgid ""
+"Unique file identifier of small (160x160) chat photo, which is supposed "
+"to be the same over time and for different bots. Can't be used to "
+"download or reuse the file."
+msgstr ""
+
+#: of telebot.types.ChatPhoto:13
+msgid ""
+"File identifier of big (640x640) chat photo. This file_id can be used "
+"only for photo download and only for as long as the photo is not changed."
+msgstr ""
+
+#: of telebot.types.ChatPhoto:17
+msgid ""
+"Unique file identifier of big (640x640) chat photo, which is supposed to "
+"be the same over time and for different bots. Can't be used to download "
+"or reuse the file."
+msgstr ""
+
+#: of telebot.types.ChatPhoto:22
+msgid ":class:`telebot.types.ChatPhoto`"
+msgstr ""
+
+#: of telebot.types.ChatShared:1
+msgid ""
+"This object contains information about the chat whose identifier was "
+"shared with the bot using a `telebot.types.KeyboardButtonRequestChat` "
+"button."
+msgstr ""
+
+#: of telebot.types.ChatShared:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#Chatshared"
+msgstr ""
+
+#: of telebot.types.ChatShared:6
+msgid "identifier of the request"
+msgstr ""
+
+#: of telebot.types.ChatShared:9
+msgid ""
+"Identifier of the shared chat. This number may have more than 32 "
+"significant bits and some programming languages may have "
+"difficulty/silent defects in interpreting it. But it has at most 52 "
+"significant bits, so a 64-bit integer or double-precision float type are "
+"safe for storing this identifier. The bot may not have access to the chat"
+" and could be unable to use this identifier, unless the chat is already "
+"known to the bot by some other means."
+msgstr ""
+
+#: of telebot.types.ChatShared:16
+msgid ":class:`telebot.types.ChatShared`"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:1
+msgid ""
+"Represents a result of an inline query that was chosen by the user and "
+"sent to their chat partner."
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#choseninlineresult"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:5
+msgid "The unique identifier for the result that was chosen"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:8
+msgid "The user that chose the result"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:11
+msgid "Optional. Sender location, only for bots that require user location"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:14
+msgid ""
+"Optional. Identifier of the sent inline message. Available only if there "
+"is an inline keyboard attached to the message. Will be also received in "
+"callback queries and can be used to edit the message."
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:18
+msgid "The query that was used to obtain the result"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:22
+msgid ":class:`telebot.types.ChosenInlineResult`"
+msgstr ""
+
+#: of telebot.types.Contact:1
+msgid "This object represents a phone contact."
+msgstr ""
+
+#: of telebot.types.Contact:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#contact"
+msgstr ""
+
+#: of telebot.types.Contact:5 telebot.types.InlineQueryResultContact:11
+#: telebot.types.InputContactMessageContent:5
+msgid "Contact's phone number"
+msgstr ""
+
+#: of telebot.types.Contact:8 telebot.types.InlineQueryResultContact:14
+#: telebot.types.InputContactMessageContent:8
+msgid "Contact's first name"
+msgstr ""
+
+#: of telebot.types.Contact:11 telebot.types.InlineQueryResultContact:17
+#: telebot.types.InputContactMessageContent:11
+msgid "Optional. Contact's last name"
+msgstr ""
+
+#: of telebot.types.Contact:14
+msgid ""
+"Optional. Contact's user identifier in Telegram. This number may have "
+"more than 32 significant bits and some programming languages may have "
+"difficulty/silent defects in interpreting it. But it has at most 52 "
+"significant bits, so a 64-bit integer or double-precision float type are "
+"safe for storing this identifier."
+msgstr ""
+
+#: of telebot.types.Contact:19
+msgid "Optional. Additional data about the contact in the form of a vCard"
+msgstr ""
+
+#: of telebot.types.Contact:23
+msgid ":class:`telebot.types.Contact`"
+msgstr ""
+
+#: of telebot.types.Dice:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonSerializable`, "
+":py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonDeserializable`"
+msgstr ""
+
+#: of telebot.types.Dice:1
+msgid "This object represents an animated emoji that displays a random value."
+msgstr ""
+
+#: of telebot.types.Dice:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#dice"
+msgstr ""
+
+#: of telebot.types.Dice:5
+msgid "Emoji on which the dice throw animation is based"
+msgstr ""
+
+#: of telebot.types.Dice:8
+msgid ""
+"Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and "
+"“⚽” base emoji, 1-64 for “🎰” base emoji"
+msgstr ""
+
+#: of telebot.types.Dice:12
+msgid ":class:`telebot.types.Dice`"
+msgstr ""
+
+#: of telebot.types.Dictionaryable:1 telebot.types.InputFile:1
+#: telebot.types.JsonDeserializable:1 telebot.types.JsonSerializable:1
+msgid "Bases: :py:class:`object`"
+msgstr ""
+
+#: of telebot.types.Dictionaryable:1
+msgid ""
+"Subclasses of this class are guaranteed to be able to be converted to "
+"dictionary. All subclasses of this class must override to_dict."
+msgstr ""
+
+#: of telebot.types.Document:1
+msgid ""
+"This object represents a general file (as opposed to photos, voice "
+"messages and audio files)."
+msgstr ""
+
+#: of telebot.types.Document:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#document"
+msgstr ""
+
+#: of telebot.types.Document:12
+msgid "Optional. Document thumbnail as defined by sender"
+msgstr ""
+
+#: of telebot.types.Document:27
+msgid ":class:`telebot.types.Document`"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:1
+msgid ""
+"This object contains information about a message that is being replied "
+"to, which may come from another chat or forum topic."
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#externalreplyinfo"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:6
+msgid "Origin of the message replied to by the given message"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:9
+msgid ""
+"Optional. Chat the original message belongs to. Available only if the "
+"chat is a supergroup or a channel."
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:12
+msgid ""
+"Optional. Unique message identifier inside the original chat. Available "
+"only if the original chat is a supergroup or a channel."
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:15
+msgid ""
+"Optional. Options used for link preview generation for the original "
+"message, if it is a text message"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:18
+msgid "Optional. Message is an animation, information about the animation"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:21 telebot.types.Message:97
+msgid "Optional. Message is an audio file, information about the file"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:24 telebot.types.Message:100
+msgid "Optional. Message is a general file, information about the file"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:27 telebot.types.Message:103
+msgid "Optional. Message is a photo, available sizes of the photo"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:30 telebot.types.Message:106
+msgid "Optional. Message is a sticker, information about the sticker"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:33 telebot.types.Message:109
+msgid "Optional. Message is a forwarded story"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:36 telebot.types.Message:112
+msgid "Optional. Message is a video, information about the video"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:39 telebot.types.Message:115
+msgid "Optional. Message is a video note, information about the video message"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:42 telebot.types.Message:118
+msgid "Optional. Message is a voice message, information about the file"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:45 telebot.types.Message:128
+msgid "Optional. True, if the message media is covered by a spoiler animation"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:48 telebot.types.Message:131
+msgid "Optional. Message is a shared contact, information about the contact"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:51 telebot.types.Message:134
+msgid "Optional. Message is a dice with random value"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:54 telebot.types.Message:137
+msgid ""
+"Optional. Message is a game, information about the game. More about games"
+" »"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:57
+msgid "Optional. Message is a scheduled giveaway, information about the giveaway"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:60
+msgid "Optional. A giveaway with public winners was completed"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:63 telebot.types.Message:200
+msgid ""
+"Optional. Message is an invoice for a payment, information about the "
+"invoice. More about payments »"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:66 telebot.types.Message:147
+msgid "Optional. Message is a shared location, information about the location"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:69 telebot.types.Message:140
+msgid "Optional. Message is a native poll, information about the poll"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:72
+msgid "Optional. Message is a venue, information about the venue"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:76
+msgid ":class:`ExternalReplyInfo`"
+msgstr ""
+
+#: of telebot.types.File:1
+msgid ""
+"This object represents a file ready to be downloaded. The file can be "
+"downloaded via the link "
+"https://api.telegram.org/file/bot/. It is guaranteed "
+"that the link will be valid for at least 1 hour. When the link expires, a"
+" new one can be requested by calling getFile."
+msgstr ""
+
+#: of telebot.types.File:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#file"
+msgstr ""
+
+#: of telebot.types.File:17
+msgid ""
+"Optional. File path. Use "
+"https://api.telegram.org/file/bot/ to get the file."
+msgstr ""
+
+#: of telebot.types.File:22
+msgid ":class:`telebot.types.File`"
+msgstr ""
+
+#: of telebot.types.ForceReply:1 telebot.types.ReplyKeyboardMarkup:1
+#: telebot.types.ReplyKeyboardRemove:1 telebot.types.ShippingOption:1
+msgid "Bases: :py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.ForceReply:1
+msgid ""
+"Upon receiving a message with this object, Telegram clients will display "
+"a reply interface to the user (act as if the user has selected the bot's "
+"message and tapped 'Reply'). This can be extremely useful if you want to "
+"create user-friendly step-by-step interfaces without having to sacrifice "
+"privacy mode."
+msgstr ""
+
+#: of telebot.types.ForceReply:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#forcereply"
+msgstr ""
+
+#: of telebot.types.ForceReply:5
+msgid ""
+"Shows reply interface to the user, as if they manually selected the bot's"
+" message and tapped 'Reply'"
+msgstr ""
+
+#: of telebot.types.ForceReply:9
+msgid ""
+"Optional. The placeholder to be shown in the input field when the reply "
+"is active; 1-64 characters"
+msgstr ""
+
+#: of telebot.types.ForceReply:13
+msgid ""
+"Optional. Use this parameter if you want to force reply from specific "
+"users only. Targets: 1) users that are @mentioned in the text of the "
+"Message object; 2) if the bot's message is a reply (has "
+"reply_to_message_id), sender of the original message."
+msgstr ""
+
+#: of telebot.types.ForceReply:19
+msgid ":class:`telebot.types.ForceReply`"
+msgstr ""
+
+#: of telebot.types.ForumTopic:1
+msgid "This object represents a forum topic."
+msgstr ""
+
+#: of telebot.types.ForumTopic:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#forumtopic"
+msgstr ""
+
+#: of telebot.types.ForumTopic:5
+msgid "Unique identifier of the forum topic"
+msgstr ""
+
+#: of telebot.types.ForumTopic:8 telebot.types.ForumTopicCreated:5
+msgid "Name of the topic"
+msgstr ""
+
+#: of telebot.types.ForumTopic:11 telebot.types.ForumTopicCreated:8
+msgid "Color of the topic icon in RGB format"
+msgstr ""
+
+#: of telebot.types.ForumTopic:14 telebot.types.ForumTopicCreated:11
+msgid "Optional. Unique identifier of the custom emoji shown as the topic icon"
+msgstr ""
+
+#: of telebot.types.ForumTopic:18
+msgid ":class:`telebot.types.ForumTopic`"
+msgstr ""
+
+#: of telebot.types.ForumTopicClosed:1
+msgid ""
+"This object represents a service message about a forum topic closed in "
+"the chat. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.ForumTopicClosed:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#forumtopicclosed"
+msgstr ""
+
+#: of telebot.types.ForumTopicCreated:1
+msgid ""
+"This object represents a service message about a new forum topic created "
+"in the chat."
+msgstr ""
+
+#: of telebot.types.ForumTopicCreated:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#forumtopiccreated"
+msgstr ""
+
+#: of telebot.types.ForumTopicCreated:15
+msgid ":class:`telebot.types.ForumTopicCreated`"
+msgstr ""
+
+#: of telebot.types.ForumTopicEdited:1
+msgid "This object represents a service message about an edited forum topic."
+msgstr ""
+
+#: of telebot.types.ForumTopicEdited:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#forumtopicedited"
+msgstr ""
+
+#: of telebot.types.ForumTopicEdited:5
+msgid "Optional, Name of the topic(if updated)"
+msgstr ""
+
+#: of telebot.types.ForumTopicEdited:8
+msgid ""
+"Optional. New identifier of the custom emoji shown as the topic icon, if "
+"it was edited; an empty string if the icon was removed"
+msgstr ""
+
+#: of telebot.types.ForumTopicReopened:1
+msgid ""
+"This object represents a service message about a forum topic reopened in "
+"the chat. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.ForumTopicReopened:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#forumtopicreopened"
+msgstr ""
+
+#: of telebot.types.Game:1
+msgid ""
+"This object represents a game. Use BotFather to create and edit games, "
+"their short names will act as unique identifiers."
+msgstr ""
+
+#: of telebot.types.Game:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#game"
+msgstr ""
+
+#: of telebot.types.Game:5
+msgid "Title of the game"
+msgstr ""
+
+#: of telebot.types.Game:8
+msgid "Description of the game"
+msgstr ""
+
+#: of telebot.types.Game:11
+msgid "Photo that will be displayed in the game message in chats."
+msgstr ""
+
+#: of telebot.types.Game:14
+msgid ""
+"Optional. Brief description of the game or high scores included in the "
+"game message. Can be automatically edited to include current high scores "
+"for the game when the bot calls setGameScore, or manually edited using "
+"editMessageText. 0-4096 characters."
+msgstr ""
+
+#: of telebot.types.Game:19
+msgid ""
+"Optional. Special entities that appear in text, such as usernames, URLs, "
+"bot commands, etc."
+msgstr ""
+
+#: of telebot.types.Game:22
+msgid ""
+"Optional. Animation that will be displayed in the game message in chats. "
+"Upload via BotFather"
+msgstr ""
+
+#: of telebot.types.Game:26
+msgid ":class:`telebot.types.Game`"
+msgstr ""
+
+#: of telebot.types.Game.parse_entities:1
+msgid "Parse the message entity array into a list of MessageEntity objects"
+msgstr ""
+
+#: of telebot.types.Game.parse_photo:1
+msgid "Parse the photo array into a list of PhotoSize objects"
+msgstr ""
+
+#: of telebot.types.GameHighScore:1
+msgid "This object represents one row of the high scores table for a game."
+msgstr ""
+
+#: of telebot.types.GameHighScore:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#gamehighscore"
+msgstr ""
+
+#: of telebot.types.GameHighScore:5
+msgid "Position in high score table for the game"
+msgstr ""
+
+#: of telebot.types.GameHighScore:8
+msgid "User"
+msgstr ""
+
+#: of telebot.types.GameHighScore:11
+msgid "Score"
+msgstr ""
+
+#: of telebot.types.GameHighScore:15
+msgid ":class:`telebot.types.GameHighScore`"
+msgstr ""
+
+#: of telebot.types.GeneralForumTopicHidden:1
+msgid ""
+"This object represents a service message about General forum topic hidden"
+" in the chat. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.GeneralForumTopicHidden:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#generalforumtopichidden"
+msgstr ""
+
+#: of telebot.types.GeneralForumTopicUnhidden:1
+msgid ""
+"This object represents a service message about General forum topic "
+"unhidden in the chat. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.GeneralForumTopicUnhidden:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#generalforumtopicunhidden"
+msgstr ""
+
+#: of telebot.types.Giveaway:1
+msgid "This object represents a message about a scheduled giveaway."
+msgstr ""
+
+#: of telebot.types.Giveaway:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#giveaway"
+msgstr ""
+
+#: of telebot.types.Giveaway:5
+msgid "The list of chats which the user must join to participate in the giveaway"
+msgstr ""
+
+#: of telebot.types.Giveaway:8
+msgid ""
+"Point in time (Unix timestamp) when winners of the giveaway will be "
+"selected"
+msgstr ""
+
+#: of telebot.types.Giveaway:11
+msgid ""
+"The number of users which are supposed to be selected as winners of the "
+"giveaway"
+msgstr ""
+
+#: of telebot.types.Giveaway:14
+msgid ""
+"Optional. True, if only users who join the chats after the giveaway "
+"started should be eligible to win"
+msgstr ""
+
+#: of telebot.types.Giveaway:17
+msgid ""
+"Optional. True, if the list of giveaway winners will be visible to "
+"everyone"
+msgstr ""
+
+#: of telebot.types.Giveaway:20 telebot.types.GiveawayWinners:35
+msgid "Optional. Description of additional giveaway prize"
+msgstr ""
+
+#: of telebot.types.Giveaway:23
+msgid ""
+"Optional. A list of two-letter ISO 3166-1 alpha-2 country codes "
+"indicating the countries from which eligible users for the giveaway must "
+"come. If empty, then all users can participate in the giveaway."
+msgstr ""
+
+#: of telebot.types.Giveaway:26 telebot.types.GiveawayWinners:23
+msgid ""
+"Optional. The number of months the Telegram Premium subscription won from"
+" the giveaway will be active for"
+msgstr ""
+
+#: of telebot.types.Giveaway:30
+msgid ":class:`Giveaway`"
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:1
+msgid ""
+"This object represents a service message about the completion of a "
+"giveaway without public winners."
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#giveawaycompleted"
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:5
+msgid "Number of winners in the giveaway"
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:8 telebot.types.GiveawayWinners:26
+msgid "Optional. Number of undistributed prizes"
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:11
+msgid ""
+"Optional. Message with the giveaway that was completed, if it wasn't "
+"deleted"
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:15
+msgid ":class:`GiveawayCompleted`"
+msgstr ""
+
+#: of telebot.types.GiveawayCreated:1
+msgid ""
+"This object represents a service message about the creation of a "
+"scheduled giveaway. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:1
+msgid ""
+"This object represents a message about the completion of a giveaway with "
+"public winners."
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#giveawaywinners"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:5
+msgid "The chat that created the giveaway"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:8
+msgid "Identifier of the messsage with the giveaway in the chat"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:11
+msgid "Point in time (Unix timestamp) when winners of the giveaway were selected"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:14
+msgid "Total number of winners in the giveaway"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:17
+msgid "List of up to 100 winners of the giveaway"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:20
+msgid ""
+"Optional. The number of other chats the user had to join in order to be "
+"eligible for the giveaway"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:29
+msgid ""
+"Optional. True, if only users who had joined the chats after the giveaway"
+" started were eligible to win"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:32
+msgid ""
+"Optional. True, if the giveaway was canceled because the payment for it "
+"was refunded"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:39
+msgid ":class:`GiveawayWinners`"
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:1
+msgid ""
+"This object describes a message that was deleted or is otherwise "
+"inaccessible to the bot."
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#inaccessiblemessage"
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:5
+msgid "Chat the message belonged to"
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:8 telebot.types.MessageOriginChannel:6
+#: telebot.types.MessageReactionCountUpdated:8
+msgid "Unique message identifier inside the chat"
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:11
+msgid ""
+"Always 0. The field can be used to differentiate regular and inaccessible"
+" messages."
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:15
+msgid ":class:`InaccessibleMessage`"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:1 telebot.types.InlineKeyboardMarkup:1
+#: telebot.types.LoginUrl:1 telebot.types.MessageEntity:1
+msgid ""
+"Bases: :py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonSerializable`, "
+":py:class:`telebot.types.JsonDeserializable`"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:1
+msgid ""
+"This object represents one button of an inline keyboard. You must use "
+"exactly one of the optional fields."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:3
+#: telebot.types.SwitchInlineQueryChosenChat:4
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinekeyboardbutton"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:5
+#: telebot.types.InlineQueryResultsButton:6
+msgid "Label text on the button"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:8
+msgid ""
+"Optional. HTTP or tg:// URL to be opened when the button is pressed. "
+"Links tg://user?id= can be used to mention a user by their ID "
+"without using a username, if this is allowed by their privacy settings."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:12
+msgid ""
+"Optional. Data to be sent in a callback query to the bot when button is "
+"pressed, 1-64 bytes"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:15
+msgid ""
+"Optional. Description of the Web App that will be launched when the user "
+"presses the button. The Web App will be able to send an arbitrary message"
+" on behalf of the user using the method answerWebAppQuery. Available only"
+" in private chats between a user and the bot."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:20
+msgid ""
+"Optional. An HTTPS URL used to automatically authorize the user. Can be "
+"used as a replacement for the Telegram Login Widget."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:24
+msgid ""
+"Optional. If set, pressing the button will prompt the user to select one "
+"of their chats, open that chat and insert the bot's username and the "
+"specified inline query in the input field. May be empty, in which case "
+"just the bot's username will be inserted.Note: This offers an easy way "
+"for users to start using your bot in inline mode when they are currently "
+"in a private chat with it. Especially useful when combined with "
+"switch_pm… actions - in this case the user will be automatically returned"
+" to the chat they switched from, skipping the chat selection screen."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:31
+msgid ""
+"Optional. If set, pressing the button will insert the bot's username and "
+"the specified inline query in the current chat's input field. May be "
+"empty, in which case only the bot's username will be inserted.This offers"
+" a quick way for the user to open your bot in inline mode in the same "
+"chat - good for selecting something from multiple options."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:37
+msgid ""
+"Optional. If set, pressing the button will prompt the user to select one "
+"of their chats of the specified type, open that chat and insert the bot's"
+" username and the specified inline query in the input field"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:41
+msgid ""
+"Optional. Description of the game that will be launched when the user "
+"presses the button. NOTE: This type of button must always be the first "
+"button in the first row."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:45
+msgid ""
+"Optional. Specify True, to send a Pay button. NOTE: This type of button "
+"must always be the first button in the first row and can only be used in "
+"invoice messages."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:50
+msgid ":class:`telebot.types.InlineKeyboardButton`"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:1
+msgid ""
+"This object represents an inline keyboard that appears right next to the "
+"message it belongs to."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:4
+msgid "It is recommended to use :meth:`telebot.util.quick_markup` instead."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:6
+msgid "Example of a custom keyboard with buttons."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:19
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinekeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:21
+msgid ""
+":obj:`list` of button rows, each represented by an :obj:`list` of "
+":class:`telebot.types.InlineKeyboardButton` objects"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:25
+msgid "number of :class:`telebot.types.InlineKeyboardButton` objects on each row"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:29
+#: telebot.types.InlineKeyboardMarkup.add:17
+#: telebot.types.InlineKeyboardMarkup.row:12
+msgid ":class:`telebot.types.InlineKeyboardMarkup`"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.add:1
+msgid "This method adds buttons to the keyboard without exceeding row_width."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.add:3
+msgid ""
+"E.g. InlineKeyboardMarkup.add(\"A\", \"B\", \"C\") yields the json "
+"result: {keyboard: [[\"A\"], [\"B\"], [\"C\"]]} when row_width is set to "
+"1. When row_width is set to 2, the result: {keyboard: [[\"A\", \"B\"], "
+"[\"C\"]]} See https://core.telegram.org/bots/api#inlinekeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.add:10
+#: telebot.types.InlineKeyboardMarkup.row:8
+msgid "Array of InlineKeyboardButton to append to the keyboard"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.add:13
+#: telebot.types.ReplyKeyboardMarkup.add:10
+msgid "width of row"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.add:16
+#: telebot.types.InlineKeyboardMarkup.row:11
+#: telebot.types.ReplyKeyboardMarkup.add:13
+#: telebot.types.ReplyKeyboardMarkup.row:8
+msgid "self, to allow function chaining."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.row:1
+msgid ""
+"Adds a list of InlineKeyboardButton to the keyboard. This method does not"
+" consider row_width."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.row:4
+msgid ""
+"InlineKeyboardMarkup.row(\"A\").row(\"B\", \"C\").to_json() outputs: "
+"'{keyboard: [[\"A\"], [\"B\", \"C\"]]}' See "
+"https://core.telegram.org/bots/api#inlinekeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.InlineQuery:1
+msgid ""
+"This object represents an incoming inline query. When the user sends an "
+"empty query, your bot could return some default or trending results."
+msgstr ""
+
+#: of telebot.types.InlineQuery:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#inlinequery"
+msgstr ""
+
+#: of telebot.types.InlineQuery:11
+msgid "Text of the query (up to 256 characters)"
+msgstr ""
+
+#: of telebot.types.InlineQuery:14
+msgid "Offset of the results to be returned, can be controlled by the bot"
+msgstr ""
+
+#: of telebot.types.InlineQuery:17
+msgid ""
+"Optional. Type of the chat from which the inline query was sent. Can be "
+"either “sender” for a private chat with the inline query sender, "
+"“private”, “group”, “supergroup”, or “channel”. The chat type should be "
+"always known for requests sent from official clients and most third-party"
+" clients, unless the request was sent from a secret chat"
+msgstr ""
+
+#: of telebot.types.InlineQuery:23
+msgid "Optional. Sender location, only for bots that request user location"
+msgstr ""
+
+#: of telebot.types.InlineQuery:27
+msgid ":class:`telebot.types.InlineQuery`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:1
+#: telebot.types.InlineQueryResultAudio:1
+#: telebot.types.InlineQueryResultContact:1
+#: telebot.types.InlineQueryResultDocument:1
+#: telebot.types.InlineQueryResultGame:1 telebot.types.InlineQueryResultGif:1
+#: telebot.types.InlineQueryResultLocation:1
+#: telebot.types.InlineQueryResultMpeg4Gif:1
+#: telebot.types.InlineQueryResultPhoto:1
+#: telebot.types.InlineQueryResultVenue:1
+#: telebot.types.InlineQueryResultVideo:1
+#: telebot.types.InlineQueryResultVoice:1
+msgid "Bases: :py:class:`telebot.types.InlineQueryResultBase`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:1
+msgid "Represents a link to an article or web page."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultarticle"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:5
+msgid "Type of the result, must be article"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:8
+#: telebot.types.InlineQueryResultContact:8
+#: telebot.types.InlineQueryResultLocation:8
+#: telebot.types.InlineQueryResultVenue:8
+msgid "Unique identifier for this result, 1-64 Bytes"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:11
+msgid "Title of the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:14
+msgid "Content of the message to be sent"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:17
+#: telebot.types.InlineQueryResultAudio:34
+#: telebot.types.InlineQueryResultCachedAudio:25
+#: telebot.types.InlineQueryResultCachedDocument:31
+#: telebot.types.InlineQueryResultCachedGif:27
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:27
+#: telebot.types.InlineQueryResultCachedPhoto:31
+#: telebot.types.InlineQueryResultCachedSticker:14
+#: telebot.types.InlineQueryResultCachedVideo:31
+#: telebot.types.InlineQueryResultCachedVoice:28
+#: telebot.types.InlineQueryResultContact:23
+#: telebot.types.InlineQueryResultDocument:34
+#: telebot.types.InlineQueryResultGame:14 telebot.types.InlineQueryResultGif:43
+#: telebot.types.InlineQueryResultLocation:35
+#: telebot.types.InlineQueryResultMpeg4Gif:43
+#: telebot.types.InlineQueryResultPhoto:40
+#: telebot.types.InlineQueryResultVenue:36
+#: telebot.types.InlineQueryResultVideo:46
+#: telebot.types.InlineQueryResultVoice:31
+msgid "Optional. Inline keyboard attached to the message"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:20
+msgid "Optional. URL of the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:23
+msgid "Optional. Pass True, if you don't want the URL to be shown in the message"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:26
+#: telebot.types.InlineQueryResultCachedDocument:17
+#: telebot.types.InlineQueryResultCachedPhoto:17
+#: telebot.types.InlineQueryResultCachedVideo:17
+#: telebot.types.InlineQueryResultDocument:31
+#: telebot.types.InlineQueryResultPhoto:26
+#: telebot.types.InlineQueryResultVideo:43
+msgid "Optional. Short description of the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:29
+#: telebot.types.InlineQueryResultContact:29
+#: telebot.types.InlineQueryResultLocation:41
+#: telebot.types.InlineQueryResultVenue:42
+msgid "Optional. Url of the thumbnail for the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:32
+#: telebot.types.InlineQueryResultContact:32
+#: telebot.types.InlineQueryResultDocument:43
+#: telebot.types.InlineQueryResultLocation:44
+#: telebot.types.InlineQueryResultVenue:45
+msgid "Optional. Thumbnail width"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:35
+#: telebot.types.InlineQueryResultContact:35
+#: telebot.types.InlineQueryResultDocument:46
+#: telebot.types.InlineQueryResultLocation:47
+#: telebot.types.InlineQueryResultVenue:48
+msgid "Optional. Thumbnail height"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:39
+msgid ":class:`telebot.types.InlineQueryResultArticle`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:1
+msgid ""
+"Represents a link to an MP3 audio file. By default, this audio file will "
+"be sent by the user. Alternatively, you can use input_message_content to "
+"send a message with the specified content instead of the audio."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultaudio"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:5
+#: telebot.types.InlineQueryResultCachedAudio:5
+msgid "Type of the result, must be audio"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:8
+#: telebot.types.InlineQueryResultCachedAudio:8
+#: telebot.types.InlineQueryResultCachedDocument:8
+#: telebot.types.InlineQueryResultCachedGif:8
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:8
+#: telebot.types.InlineQueryResultCachedPhoto:8
+#: telebot.types.InlineQueryResultCachedSticker:8
+#: telebot.types.InlineQueryResultCachedVideo:8
+#: telebot.types.InlineQueryResultCachedVoice:8
+#: telebot.types.InlineQueryResultDocument:8
+#: telebot.types.InlineQueryResultGame:8 telebot.types.InlineQueryResultGif:8
+#: telebot.types.InlineQueryResultMpeg4Gif:8
+#: telebot.types.InlineQueryResultPhoto:8
+#: telebot.types.InlineQueryResultVideo:8
+#: telebot.types.InlineQueryResultVoice:8
+msgid "Unique identifier for this result, 1-64 bytes"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:11
+msgid "A valid URL for the audio file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:14
+msgid "Title"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:17
+#: telebot.types.InlineQueryResultCachedAudio:14
+#: telebot.types.InlineQueryResultCachedVoice:17
+#: telebot.types.InlineQueryResultVoice:17
+msgid "Optional. Caption, 0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:20
+#: telebot.types.InlineQueryResultCachedAudio:17
+#: telebot.types.InputMediaAudio:20
+msgid ""
+"Optional. Mode for parsing entities in the audio caption. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:24
+#: telebot.types.InlineQueryResultCachedAudio:21
+#: telebot.types.InlineQueryResultCachedDocument:27
+#: telebot.types.InlineQueryResultCachedGif:23
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:23
+#: telebot.types.InlineQueryResultCachedPhoto:27
+#: telebot.types.InlineQueryResultCachedVideo:27
+#: telebot.types.InlineQueryResultCachedVoice:24
+#: telebot.types.InlineQueryResultDocument:21
+#: telebot.types.InlineQueryResultGif:39
+#: telebot.types.InlineQueryResultMpeg4Gif:39
+#: telebot.types.InlineQueryResultPhoto:36
+#: telebot.types.InlineQueryResultVideo:30
+#: telebot.types.InlineQueryResultVoice:24 telebot.types.InputMediaAnimation:24
+#: telebot.types.InputMediaAudio:24 telebot.types.InputMediaDocument:24
+#: telebot.types.InputMediaPhoto:17 telebot.types.InputMediaVideo:24
+msgid ""
+"Optional. List of special entities that appear in the caption, which can "
+"be specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:28
+msgid "Optional. Performer"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:31
+msgid "Optional. Audio duration in seconds"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:37
+#: telebot.types.InlineQueryResultCachedAudio:28
+msgid "Optional. Content of the message to be sent instead of the audio"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:41
+msgid ":class:`telebot.types.InlineQueryResultAudio`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:1
+msgid ""
+"Bases: :py:class:`abc.ABC`, :py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:1
+msgid ""
+"This object represents one result of an inline query. Telegram clients "
+"currently support results of the following 20 types:"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:3
+msgid ":class:`InlineQueryResultCachedAudio`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:4
+msgid ":class:`InlineQueryResultCachedDocument`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:5
+msgid ":class:`InlineQueryResultCachedGif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:6
+msgid ":class:`InlineQueryResultCachedMpeg4Gif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:7
+msgid ":class:`InlineQueryResultCachedPhoto`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:8
+msgid ":class:`InlineQueryResultCachedSticker`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:9
+msgid ":class:`InlineQueryResultCachedVideo`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:10
+msgid ":class:`InlineQueryResultCachedVoice`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:11
+msgid ":class:`InlineQueryResultArticle`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:12
+msgid ":class:`InlineQueryResultAudio`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:13
+msgid ":class:`InlineQueryResultContact`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:14
+msgid ":class:`InlineQueryResultGame`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:15
+msgid ":class:`InlineQueryResultDocument`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:16
+msgid ":class:`InlineQueryResultGif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:17
+msgid ":class:`InlineQueryResultLocation`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:18
+msgid ":class:`InlineQueryResultMpeg4Gif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:19
+msgid ":class:`InlineQueryResultPhoto`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:20
+msgid ":class:`InlineQueryResultVenue`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:21
+msgid ":class:`InlineQueryResultVideo`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:22
+msgid ":class:`InlineQueryResultVoice`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:24
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresult"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedAudio:1
+#: telebot.types.InlineQueryResultCachedDocument:1
+#: telebot.types.InlineQueryResultCachedGif:1
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:1
+#: telebot.types.InlineQueryResultCachedPhoto:1
+#: telebot.types.InlineQueryResultCachedSticker:1
+#: telebot.types.InlineQueryResultCachedVideo:1
+#: telebot.types.InlineQueryResultCachedVoice:1
+msgid "Bases: :py:class:`telebot.types.InlineQueryResultCachedBase`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedAudio:1
+msgid ""
+"Represents a link to an MP3 audio file stored on the Telegram servers. By"
+" default, this audio file will be sent by the user. Alternatively, you "
+"can use input_message_content to send a message with the specified "
+"content instead of the audio."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedAudio:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedaudio"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedAudio:11
+msgid "A valid file identifier for the audio file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedAudio:32
+msgid ":class:`telebot.types.InlineQueryResultCachedAudio`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedBase:1
+msgid "Base class of all InlineQueryResultCached* classes."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:1
+msgid ""
+"Represents a link to a file stored on the Telegram servers. By default, "
+"this file will be sent by the user with an optional caption. "
+"Alternatively, you can use input_message_content to send a message with "
+"the specified content instead of the file."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcacheddocument"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:5
+#: telebot.types.InlineQueryResultDocument:5
+msgid "Type of the result, must be document"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:11
+#: telebot.types.InlineQueryResultCachedVideo:14
+#: telebot.types.InlineQueryResultDocument:11
+#: telebot.types.InlineQueryResultVideo:20
+msgid "Title for the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:14
+msgid "A valid file identifier for the file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:20
+#: telebot.types.InlineQueryResultDocument:14
+#: telebot.types.InputMediaDocument:17
+msgid ""
+"Optional. Caption of the document to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:23
+#: telebot.types.InlineQueryResultDocument:17
+#: telebot.types.InputMediaDocument:20
+msgid ""
+"Optional. Mode for parsing entities in the document caption. See "
+"formatting options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:34
+#: telebot.types.InlineQueryResultDocument:37
+msgid "Optional. Content of the message to be sent instead of the file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:38
+msgid ":class:`telebot.types.InlineQueryResultCachedDocument`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:1
+msgid ""
+"Represents a link to an animated GIF file stored on the Telegram servers."
+" By default, this animated GIF file will be sent by the user with an "
+"optional caption. Alternatively, you can use input_message_content to "
+"send a message with specified content instead of the animation."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedgif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:5
+#: telebot.types.InlineQueryResultGif:5
+msgid "Type of the result, must be gif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:11
+msgid "A valid file identifier for the GIF file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:14
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:14
+#: telebot.types.InlineQueryResultCachedPhoto:14
+#: telebot.types.InlineQueryResultGif:30
+#: telebot.types.InlineQueryResultMpeg4Gif:30
+#: telebot.types.InlineQueryResultPhoto:23
+msgid "Optional. Title for the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:17
+#: telebot.types.InlineQueryResultGif:33
+msgid ""
+"Optional. Caption of the GIF file to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:20
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:20
+#: telebot.types.InlineQueryResultGif:36
+#: telebot.types.InlineQueryResultMpeg4Gif:36
+msgid ""
+"Optional. Mode for parsing entities in the caption. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:30
+#: telebot.types.InlineQueryResultGif:46
+msgid "Optional. Content of the message to be sent instead of the GIF animation"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:34
+msgid ":class:`telebot.types.InlineQueryResultCachedGif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:1
+msgid ""
+"Represents a link to a video animation (H.264/MPEG-4 AVC video without "
+"sound) stored on the Telegram servers. By default, this animated MPEG-4 "
+"file will be sent by the user with an optional caption. Alternatively, "
+"you can use input_message_content to send a message with the specified "
+"content instead of the animation."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:5
+#: telebot.types.InlineQueryResultMpeg4Gif:5
+msgid "Type of the result, must be mpeg4_gif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:11
+msgid "A valid file identifier for the MPEG4 file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:17
+#: telebot.types.InlineQueryResultMpeg4Gif:33
+msgid ""
+"Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:30
+#: telebot.types.InlineQueryResultMpeg4Gif:46
+msgid "Optional. Content of the message to be sent instead of the video animation"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:34
+msgid ":class:`telebot.types.InlineQueryResultCachedMpeg4Gif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:1
+msgid ""
+"Represents a link to a photo stored on the Telegram servers. By default, "
+"this photo will be sent by the user with an optional caption. "
+"Alternatively, you can use input_message_content to send a message with "
+"the specified content instead of the photo."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedphoto"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:5
+#: telebot.types.InlineQueryResultPhoto:5
+msgid "Type of the result, must be photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:11
+msgid "A valid file identifier of the photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:20
+#: telebot.types.InlineQueryResultPhoto:29 telebot.types.InputMediaPhoto:10
+msgid ""
+"Optional. Caption of the photo to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:23
+#: telebot.types.InlineQueryResultPhoto:32 telebot.types.InputMediaPhoto:13
+msgid ""
+"Optional. Mode for parsing entities in the photo caption. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:34
+#: telebot.types.InlineQueryResultPhoto:43
+msgid "Optional. Content of the message to be sent instead of the photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:38
+msgid ":class:`telebot.types.InlineQueryResultCachedPhoto`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:1
+msgid ""
+"Represents a link to a sticker stored on the Telegram servers. By "
+"default, this sticker will be sent by the user. Alternatively, you can "
+"use input_message_content to send a message with the specified content "
+"instead of the sticker."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedsticker"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:5
+msgid "Type of the result, must be sticker"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:11
+msgid "A valid file identifier of the sticker"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:17
+msgid "Optional. Content of the message to be sent instead of the sticker"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:21
+msgid ":class:`telebot.types.InlineQueryResultCachedSticker`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:1
+msgid ""
+"Represents a link to a video file stored on the Telegram servers. By "
+"default, this video file will be sent by the user with an optional "
+"caption. Alternatively, you can use input_message_content to send a "
+"message with the specified content instead of the video."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedvideo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:5
+#: telebot.types.InlineQueryResultVideo:5
+msgid "Type of the result, must be video"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:11
+msgid "A valid file identifier for the video file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:20
+#: telebot.types.InlineQueryResultVideo:23 telebot.types.InputMediaVideo:17
+msgid ""
+"Optional. Caption of the video to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:23
+#: telebot.types.InlineQueryResultVideo:26 telebot.types.InputMediaVideo:20
+msgid ""
+"Optional. Mode for parsing entities in the video caption. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:34
+msgid "Optional. Content of the message to be sent instead of the video"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:38
+msgid ":class:`telebot.types.InlineQueryResultCachedVideo`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:1
+msgid ""
+"Represents a link to a voice message stored on the Telegram servers. By "
+"default, this voice message will be sent by the user. Alternatively, you "
+"can use input_message_content to send a message with the specified "
+"content instead of the voice message."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedvoice"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:5
+#: telebot.types.InlineQueryResultVoice:5
+msgid "Type of the result, must be voice"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:11
+msgid "A valid file identifier for the voice message"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:14
+msgid "Voice message title"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:20
+#: telebot.types.InlineQueryResultVoice:20
+msgid ""
+"Optional. Mode for parsing entities in the voice message caption. See "
+"formatting options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:31
+msgid "Optional. Content of the message to be sent instead of the voice message"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:35
+msgid ":class:`telebot.types.InlineQueryResultCachedVoice`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:1
+msgid ""
+"Represents a contact with a phone number. By default, this contact will "
+"be sent by the user. Alternatively, you can use input_message_content to "
+"send a message with the specified content instead of the contact."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcontact"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:5
+msgid "Type of the result, must be contact"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:20
+#: telebot.types.InputContactMessageContent:14
+msgid ""
+"Optional. Additional data about the contact in the form of a vCard, "
+"0-2048 bytes"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:26
+msgid "Optional. Content of the message to be sent instead of the contact"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:39
+msgid ":class:`telebot.types.InlineQueryResultContact`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:1
+msgid ""
+"Represents a link to a file. By default, this file will be sent by the "
+"user with an optional caption. Alternatively, you can use "
+"input_message_content to send a message with the specified content "
+"instead of the file. Currently, only .PDF and .ZIP files can be sent "
+"using this method."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultdocument"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:25
+msgid "A valid URL for the file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:28
+msgid ""
+"MIME type of the content of the file, either “application/pdf” or "
+"“application/zip”"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:40
+msgid "Optional. URL of the thumbnail (JPEG only) for the file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:50
+msgid ":class:`telebot.types.InlineQueryResultDocument`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGame:1
+msgid "Represents a Game."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGame:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultgame"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGame:5
+msgid "Type of the result, must be game"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGame:11
+msgid "Short name of the game"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGame:18
+msgid ":class:`telebot.types.InlineQueryResultGame`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:1
+msgid ""
+"Represents a link to an animated GIF file. By default, this animated GIF "
+"file will be sent by the user with optional caption. Alternatively, you "
+"can use input_message_content to send a message with the specified "
+"content instead of the animation."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultgif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:11
+msgid "A valid URL for the GIF file. File size must not exceed 1MB"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:14
+msgid "Optional. Width of the GIF"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:17
+msgid "Optional. Height of the GIF"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:20
+msgid "Optional. Duration of the GIF in seconds"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:23
+#: telebot.types.InlineQueryResultMpeg4Gif:23
+msgid ""
+"URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the "
+"result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:26
+#: telebot.types.InlineQueryResultMpeg4Gif:26
+msgid ""
+"Optional. MIME type of the thumbnail, must be one of “image/jpeg”, "
+"“image/gif”, or “video/mp4”. Defaults to “image/jpeg”"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:50
+msgid ":class:`telebot.types.InlineQueryResultGif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:1
+msgid ""
+"Represents a location on a map. By default, the location will be sent by "
+"the user. Alternatively, you can use input_message_content to send a "
+"message with the specified content instead of the location."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultlocation"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:5
+msgid "Type of the result, must be location"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:11
+msgid "Location latitude in degrees"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:14
+msgid "Location longitude in degrees"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:17
+msgid "Location title"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:20
+#: telebot.types.InputLocationMessageContent:11 telebot.types.Location:11
+msgid ""
+"Optional. The radius of uncertainty for the location, measured in meters;"
+" 0-1500"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:23
+#: telebot.types.InputLocationMessageContent:14
+msgid ""
+"Optional. Period in seconds for which the location can be updated, should"
+" be between 60 and 86400."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:27
+#: telebot.types.InputLocationMessageContent:18
+msgid ""
+"Optional. For live locations, a direction in which the user is moving, in"
+" degrees. Must be between 1 and 360 if specified."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:31
+#: telebot.types.InputLocationMessageContent:22
+msgid ""
+"Optional. For live locations, a maximum distance for proximity alerts "
+"about approaching another chat member, in meters. Must be between 1 and "
+"100000 if specified."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:38
+msgid "Optional. Content of the message to be sent instead of the location"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:51
+msgid ":class:`telebot.types.InlineQueryResultLocation`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:1
+msgid ""
+"Represents a link to a video animation (H.264/MPEG-4 AVC video without "
+"sound). By default, this animated MPEG-4 file will be sent by the user "
+"with optional caption. Alternatively, you can use input_message_content "
+"to send a message with the specified content instead of the animation."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:11
+msgid "A valid URL for the MPEG4 file. File size must not exceed 1MB"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:14
+#: telebot.types.InlineQueryResultVideo:34 telebot.types.InputMediaVideo:28
+msgid "Optional. Video width"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:17
+#: telebot.types.InlineQueryResultVideo:37 telebot.types.InputMediaVideo:31
+msgid "Optional. Video height"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:20
+#: telebot.types.InlineQueryResultVideo:40 telebot.types.InputMediaVideo:34
+msgid "Optional. Video duration in seconds"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:50
+msgid ":class:`telebot.types.InlineQueryResultMpeg4Gif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:1
+msgid ""
+"Represents a link to a photo. By default, this photo will be sent by the "
+"user with optional caption. Alternatively, you can use "
+"input_message_content to send a message with the specified content "
+"instead of the photo."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultphoto"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:11
+msgid ""
+"A valid URL of the photo. Photo must be in JPEG format. Photo size must "
+"not exceed 5MB"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:14
+msgid "URL of the thumbnail for the photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:17
+msgid "Optional. Width of the photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:20
+msgid "Optional. Height of the photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:47
+msgid ":class:`telebot.types.InlineQueryResultPhoto`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:1
+msgid ""
+"Represents a venue. By default, the venue will be sent by the user. "
+"Alternatively, you can use input_message_content to send a message with "
+"the specified content instead of the venue."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultvenue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:5
+msgid "Type of the result, must be venue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:11
+msgid "Latitude of the venue location in degrees"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:14
+msgid "Longitude of the venue location in degrees"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:17
+msgid "Title of the venue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:20
+#: telebot.types.InputVenueMessageContent:14 telebot.types.Venue:11
+msgid "Address of the venue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:23
+msgid "Optional. Foursquare identifier of the venue if known"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:26
+#: telebot.types.InputVenueMessageContent:20
+msgid ""
+"Optional. Foursquare type of the venue, if known. (For example, "
+"“arts_entertainment/default”, “arts_entertainment/aquarium” or "
+"“food/icecream”.)"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:30
+#: telebot.types.InputVenueMessageContent:24 telebot.types.Venue:21
+msgid "Optional. Google Places identifier of the venue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:33
+#: telebot.types.InputVenueMessageContent:27 telebot.types.Venue:24
+msgid "Optional. Google Places type of the venue. (See supported types.)"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:39
+msgid "Optional. Content of the message to be sent instead of the venue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:52
+msgid ":class:`telebot.types.InlineQueryResultVenue`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:1
+msgid ""
+"Represents a link to a page containing an embedded video player or a "
+"video file. By default, this video file will be sent by the user with an "
+"optional caption. Alternatively, you can use input_message_content to "
+"send a message with the specified content instead of the video."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultvideo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:11
+msgid "A valid URL for the embedded video player or video file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:14
+msgid "MIME type of the content of the video URL, “text/html” or “video/mp4”"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:17
+msgid "URL of the thumbnail (JPEG only) for the video"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:49
+msgid ""
+"Optional. Content of the message to be sent instead of the video. This "
+"field is required if InlineQueryResultVideo is used to send an HTML-page "
+"as a result (e.g., a YouTube video)."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:54
+msgid ":class:`telebot.types.InlineQueryResultVideo`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:1
+msgid ""
+"Represents a link to a voice recording in an .OGG container encoded with "
+"OPUS. By default, this voice recording will be sent by the user. "
+"Alternatively, you can use input_message_content to send a message with "
+"the specified content instead of the the voice message."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultvoice"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:11
+msgid "A valid URL for the voice recording"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:14
+msgid "Recording title"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:28
+msgid "Optional. Recording duration in seconds"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:34
+msgid "Optional. Content of the message to be sent instead of the voice recording"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:38
+msgid ":class:`telebot.types.InlineQueryResultVoice`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:1 telebot.types.LabeledPrice:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonSerializable`, "
+":py:class:`telebot.types.Dictionaryable`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:1
+msgid ""
+"This object represents a button to be shown above inline query results. "
+"You must use exactly one of the optional fields."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultsbutton"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:9
+msgid ""
+"Optional. Description of the Web App that will be launched when the user "
+"presses the button. The Web App will be able to switch back to the inline"
+" mode using the method web_app_switch_inline_query inside the Web App."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:13
+msgid ""
+"Optional. Deep-linking parameter for the /start message sent to the bot "
+"when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ "
+"and - are allowed. Example: An inline bot that sends YouTube videos can "
+"ask the user to connect the bot to their YouTube account to adapt search "
+"results accordingly. To do this, it displays a 'Connect your YouTube "
+"account' button above the results, or even before showing any. The user "
+"presses the button, switches to a private chat with the bot and, in doing"
+" so, passes a start parameter that instructs the bot to return an OAuth "
+"link. Once done, the bot can offer a switch_inline button so that the "
+"user can easily return to the chat where they wanted to use the bot's "
+"inline capabilities."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:23
+msgid ":class:`InlineQueryResultsButton`"
+msgstr ""
+
+#: of telebot.types.InputContactMessageContent:1
+#: telebot.types.InputInvoiceMessageContent:1
+#: telebot.types.InputLocationMessageContent:1
+#: telebot.types.InputTextMessageContent:1
+#: telebot.types.InputVenueMessageContent:1
+#: telebot.types.KeyboardButtonPollType:1
+#: telebot.types.KeyboardButtonRequestChat:1
+#: telebot.types.KeyboardButtonRequestUsers:1
+msgid "Bases: :py:class:`telebot.types.Dictionaryable`"
+msgstr ""
+
+#: of telebot.types.InputContactMessageContent:1
+msgid ""
+"Represents the content of a contact message to be sent as the result of "
+"an inline query."
+msgstr ""
+
+#: of telebot.types.InputContactMessageContent:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputcontactmessagecontent"
+msgstr ""
+
+#: of telebot.types.InputContactMessageContent:18
+msgid ":class:`telebot.types.InputContactMessageContent`"
+msgstr ""
+
+#: of telebot.types.InputFile:1
+msgid "A class to send files through Telegram Bot API."
+msgstr ""
+
+#: of telebot.types.InputFile:3
+msgid ""
+"You need to pass a file, which should be an instance of "
+":class:`io.IOBase` or :class:`pathlib.Path`, or :obj:`str`."
+msgstr ""
+
+#: of telebot.types.InputFile:6
+msgid ""
+"If you pass an :obj:`str` as a file, it will be opened and closed by the "
+"class."
+msgstr ""
+
+#: of telebot.types.InputFile:8
+msgid "A file to send."
+msgstr ""
+
+#: of telebot.types.InputFile:11
+msgid "Example on sending a file using this class"
+msgstr ""
+
+#: of telebot.types.InputFile.file:1
+msgid "File object."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:1
+msgid ""
+"Represents the content of an invoice message to be sent as the result of "
+"an inline query."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputinvoicemessagecontent"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:5
+msgid "Product name, 1-32 characters"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:8
+msgid "Product description, 1-255 characters"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:11
+msgid ""
+"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to "
+"the user, use for your internal processes."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:15
+msgid "Payment provider token, obtained via @BotFather"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:18
+msgid "Three-letter ISO 4217 currency code, see more on currencies"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:21
+msgid ""
+"Price breakdown, a JSON-serialized list of components (e.g. product "
+"price, tax, discount, delivery cost, delivery tax, bonus, etc.)"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:25
+msgid ""
+"Optional. The maximum accepted amount for tips in the smallest units of "
+"the currency (integer, not float/double). For example, for a maximum tip "
+"of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in "
+"currencies.json, it shows the number of digits past the decimal point for"
+" each currency (2 for the majority of currencies). Defaults to 0"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:31
+msgid ""
+"Optional. A JSON-serialized array of suggested amounts of tip in the "
+"smallest units of the currency (integer, not float/double). At most 4 "
+"suggested tip amounts can be specified. The suggested tip amounts must be"
+" positive, passed in a strictly increased order and must not exceed "
+"max_tip_amount."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:36
+msgid ""
+"Optional. A JSON-serialized object for data about the invoice, which will"
+" be shared with the payment provider. A detailed description of the "
+"required fields should be provided by the payment provider."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:40
+msgid ""
+"Optional. URL of the product photo for the invoice. Can be a photo of the"
+" goods or a marketing image for a service."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:44
+msgid "Optional. Photo size in bytes"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:47
+msgid "Optional. Photo width"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:50
+msgid "Optional. Photo height"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:53
+msgid ""
+"Optional. Pass True, if you require the user's full name to complete the "
+"order"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:56
+msgid ""
+"Optional. Pass True, if you require the user's phone number to complete "
+"the order"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:59
+msgid ""
+"Optional. Pass True, if you require the user's email address to complete "
+"the order"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:62
+msgid ""
+"Optional. Pass True, if you require the user's shipping address to "
+"complete the order"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:66
+msgid "Optional. Pass True, if the user's phone number should be sent to provider"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:69
+msgid ""
+"Optional. Pass True, if the user's email address should be sent to "
+"provider"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:72
+msgid "Optional. Pass True, if the final price depends on the shipping method"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:76
+msgid ":class:`telebot.types.InputInvoiceMessageContent`"
+msgstr ""
+
+#: of telebot.types.InputLocationMessageContent:1
+msgid ""
+"Represents the content of a location message to be sent as the result of "
+"an inline query."
+msgstr ""
+
+#: of telebot.types.InputLocationMessageContent:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputlocationmessagecontent"
+msgstr ""
+
+#: of telebot.types.InputLocationMessageContent:5
+msgid "Latitude of the location in degrees"
+msgstr ""
+
+#: of telebot.types.InputLocationMessageContent:8
+msgid "Longitude of the location in degrees"
+msgstr ""
+
+#: of telebot.types.InputLocationMessageContent:27
+msgid ":class:`telebot.types.InputLocationMessageContent`"
+msgstr ""
+
+#: of telebot.types.InputMedia:1 telebot.types.InputSticker:1
+#: telebot.types.KeyboardButton:1
+msgid ""
+"Bases: :py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.InputMedia:1
+msgid ""
+"This object represents the content of a media message to be sent. It "
+"should be one of"
+msgstr ""
+
+#: of telebot.types.InputMedia:3
+msgid ":class:`InputMediaAnimation`"
+msgstr ""
+
+#: of telebot.types.InputMedia:4
+msgid ":class:`InputMediaDocument`"
+msgstr ""
+
+#: of telebot.types.InputMedia:5
+msgid ":class:`InputMediaAudio`"
+msgstr ""
+
+#: of telebot.types.InputMedia:6
+msgid ":class:`InputMediaPhoto`"
+msgstr ""
+
+#: of telebot.types.InputMedia:7
+msgid ":class:`InputMediaVideo`"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:1 telebot.types.InputMediaAudio:1
+#: telebot.types.InputMediaDocument:1 telebot.types.InputMediaPhoto:1
+#: telebot.types.InputMediaVideo:1
+msgid "Bases: :py:class:`telebot.types.InputMedia`"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:1
+msgid ""
+"Represents an animation file (GIF or H.264/MPEG-4 AVC video without "
+"sound) to be sent."
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputmediaanimation"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:5 telebot.types.InputMediaAudio:5
+#: telebot.types.InputMediaDocument:5 telebot.types.InputMediaPhoto:5
+#: telebot.types.InputMediaVideo:5
+msgid ""
+"File to send. Pass a file_id to send a file that exists on the Telegram "
+"servers (recommended), pass an HTTP URL for Telegram to get a file from "
+"the Internet, or pass “attach://” to upload a new one "
+"using multipart/form-data under name. More information"
+" on Sending Files »"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:10 telebot.types.InputMediaAudio:10
+#: telebot.types.InputMediaDocument:10 telebot.types.InputMediaVideo:10
+msgid ""
+"Optional. Thumbnail of the file sent; can be ignored if thumbnail "
+"generation for the file is supported server-side. The thumbnail should be"
+" in JPEG format and less than 200 kB in size. A thumbnail's width and "
+"height should not exceed 320. Ignored if the file is not uploaded using "
+"multipart/form-data. Thumbnails can't be reused and can be only uploaded "
+"as a new file, so you can pass “attach://” if the "
+"thumbnail was uploaded using multipart/form-data under "
+". More information on Sending Files »"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:17
+msgid ""
+"Optional. Caption of the animation to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:20
+msgid ""
+"Optional. Mode for parsing entities in the animation caption. See "
+"formatting options for more details."
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:28
+msgid "Optional. Animation width"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:31
+msgid "Optional. Animation height"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:34
+msgid "Optional. Animation duration in seconds"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:37
+msgid "Optional. True, if the uploaded animation is a spoiler"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:41
+msgid ":class:`telebot.types.InputMediaAnimation`"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:1
+msgid "Represents an audio file to be treated as music to be sent."
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#inputmediaaudio"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:17
+msgid ""
+"Optional. Caption of the audio to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:28
+msgid "Optional. Duration of the audio in seconds"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:31
+msgid "Optional. Performer of the audio"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:34
+msgid "Optional. Title of the audio"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:38
+msgid ":class:`telebot.types.InputMediaAudio`"
+msgstr ""
+
+#: of telebot.types.InputMediaDocument:1
+msgid "Represents a general file to be sent."
+msgstr ""
+
+#: of telebot.types.InputMediaDocument:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputmediadocument"
+msgstr ""
+
+#: of telebot.types.InputMediaDocument:28
+msgid ""
+"Optional. Disables automatic server-side content type detection for files"
+" uploaded using multipart/form-data. Always True, if the document is sent"
+" as part of an album."
+msgstr ""
+
+#: of telebot.types.InputMediaDocument:33
+msgid ":class:`telebot.types.InputMediaDocument`"
+msgstr ""
+
+#: of telebot.types.InputMediaPhoto:1
+msgid "Represents a photo to be sent."
+msgstr ""
+
+#: of telebot.types.InputMediaPhoto:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#inputmediaphoto"
+msgstr ""
+
+#: of telebot.types.InputMediaPhoto:21
+msgid "Optional. True, if the uploaded photo is a spoiler"
+msgstr ""
+
+#: of telebot.types.InputMediaPhoto:25
+msgid ":class:`telebot.types.InputMediaPhoto`"
+msgstr ""
+
+#: of telebot.types.InputMediaVideo:1
+msgid "Represents a video to be sent."
+msgstr ""
+
+#: of telebot.types.InputMediaVideo:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#inputmediavideo"
+msgstr ""
+
+#: of telebot.types.InputMediaVideo:37
+msgid "Optional. Pass True, if the uploaded video is suitable for streaming"
+msgstr ""
+
+#: of telebot.types.InputMediaVideo:40
+msgid "Optional. True, if the uploaded video is a spoiler"
+msgstr ""
+
+#: of telebot.types.InputMediaVideo:44
+msgid ":class:`telebot.types.InputMediaVideo`"
+msgstr ""
+
+#: of telebot.types.InputSticker:1
+msgid "This object describes a sticker to be added to a sticker set."
+msgstr ""
+
+#: of telebot.types.InputSticker:3
+msgid ""
+"The added sticker. Pass a file_id as a String to send a file that already"
+" exists on the Telegram servers, pass an HTTP URL as a String for "
+"Telegram to get a file from the Internet, or upload a new one using "
+"multipart/form-data. Animated and video stickers can't be uploaded via "
+"HTTP URL."
+msgstr ""
+
+#: of telebot.types.InputSticker:8
+msgid "One or more(up to 20) emoji(s) corresponding to the sticker"
+msgstr ""
+
+#: of telebot.types.InputSticker:11
+msgid ""
+"Optional. Position where the mask should be placed on faces. For “mask” "
+"stickers only."
+msgstr ""
+
+#: of telebot.types.InputSticker:14
+msgid ""
+"Optional. List of 0-20 search keywords for the sticker with total length "
+"of up to 64 characters. For “regular” and “custom_emoji” stickers only."
+msgstr ""
+
+#: of telebot.types.InputSticker:19
+msgid ":class:`telebot.types.InputSticker`"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:1
+msgid ""
+"Represents the content of a text message to be sent as the result of an "
+"inline query."
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputtextmessagecontent"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:5
+msgid "Text of the message to be sent, 1-4096 characters"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:8
+msgid ""
+"Optional. Mode for parsing entities in the message text. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:12
+msgid ""
+"Optional. List of special entities that appear in message text, which can"
+" be specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:16 telebot.types.KeyboardButton:25
+#: telebot.types.StickerSet:20
+msgid "deprecated"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:19
+msgid "Optional. Link preview generation options for the message"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:23
+msgid ":class:`telebot.types.InputTextMessageContent`"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:1
+msgid ""
+"Represents the content of a venue message to be sent as the result of an "
+"inline query."
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputvenuemessagecontent"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:5
+msgid "Latitude of the venue in degrees"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:8
+msgid "Longitude of the venue in degrees"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:11 telebot.types.Venue:8
+msgid "Name of the venue"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:17
+msgid "Optional. Foursquare identifier of the venue, if known"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:31
+msgid ":class:`telebot.types.InputVenueMessageContent`"
+msgstr ""
+
+#: of telebot.types.Invoice:1
+msgid "This object contains basic information about an invoice."
+msgstr ""
+
+#: of telebot.types.Invoice:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#invoice"
+msgstr ""
+
+#: of telebot.types.Invoice:5
+msgid "Product name"
+msgstr ""
+
+#: of telebot.types.Invoice:8
+msgid "Product description"
+msgstr ""
+
+#: of telebot.types.Invoice:11
+msgid ""
+"Unique bot deep-linking parameter that can be used to generate this "
+"invoice"
+msgstr ""
+
+#: of telebot.types.Invoice:14 telebot.types.PreCheckoutQuery:11
+#: telebot.types.SuccessfulPayment:5
+msgid "Three-letter ISO 4217 currency code"
+msgstr ""
+
+#: of telebot.types.Invoice:17 telebot.types.PreCheckoutQuery:14
+#: telebot.types.SuccessfulPayment:8
+msgid ""
+"Total price in the smallest units of the currency (integer, not "
+"float/double). For example, for a price of US$ 1.45 pass amount = 145. "
+"See the exp parameter in currencies.json, it shows the number of digits "
+"past the decimal point for each currency (2 for the majority of "
+"currencies)."
+msgstr ""
+
+#: of telebot.types.Invoice:23
+msgid ":class:`telebot.types.Invoice`"
+msgstr ""
+
+#: of telebot.types.JsonDeserializable:1
+msgid ""
+"Subclasses of this class are guaranteed to be able to be created from a "
+"json-style dict or json formatted string. All subclasses of this class "
+"must override de_json."
+msgstr ""
+
+#: of telebot.types.JsonSerializable:1
+msgid ""
+"Subclasses of this class are guaranteed to be able to be converted to "
+"JSON format. All subclasses of this class must override to_json."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:1
+msgid ""
+"This object represents one button of the reply keyboard. For simple text "
+"buttons String can be used instead of this object to specify text of the "
+"button. Optional fields web_app, request_contact, request_location, and "
+"request_poll are mutually exclusive."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#keyboardbutton"
+msgstr ""
+
+#: of telebot.types.KeyboardButton:5
+msgid ""
+"Text of the button. If none of the optional fields are used, it will be "
+"sent as a message when the button is pressed"
+msgstr ""
+
+#: of telebot.types.KeyboardButton:9
+msgid ""
+"Optional. If True, the user's phone number will be sent as a contact when"
+" the button is pressed. Available in private chats only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:13
+msgid ""
+"Optional. If True, the user's current location will be sent when the "
+"button is pressed. Available in private chats only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:17
+msgid ""
+"Optional. If specified, the user will be asked to create a poll and send "
+"it to the bot when the button is pressed. Available in private chats "
+"only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:21
+msgid ""
+"Optional. If specified, the described Web App will be launched when the "
+"button is pressed. The Web App will be able to send a “web_app_data” "
+"service message. Available in private chats only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:28
+msgid ""
+"Optional. If specified, pressing the button will open a list of suitable "
+"users. Identifiers of selected users will be sent to the bot in a "
+"“users_shared” service message. Available in private chats only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:32
+msgid ""
+"Optional. If specified, pressing the button will open a list of suitable "
+"chats. Tapping on a chat will send its identifier to the bot in a "
+"“chat_shared” service message. Available in private chats only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:37
+msgid ":class:`telebot.types.KeyboardButton`"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonPollType:1
+msgid ""
+"This object represents type of a poll, which is allowed to be created and"
+" sent when the corresponding button is pressed."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonPollType:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#keyboardbuttonpolltype"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonPollType:5
+msgid ""
+"Optional. If quiz is passed, the user will be allowed to create only "
+"polls in the quiz mode. If regular is passed, only regular polls will be "
+"allowed. Otherwise, the user will be allowed to create a poll of any "
+"type."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonPollType:10
+msgid ":class:`telebot.types.KeyboardButtonPollType`"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:1
+msgid ""
+"This object defines the criteria used to request a suitable chat. The "
+"identifier of the selected chat will be shared with the bot when the "
+"corresponding button is pressed."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#keyboardbuttonrequestchat"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:6
+msgid ""
+"Signed 32-bit identifier of the request, which will be received back in "
+"the ChatShared object. Must be unique within the message"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:10
+msgid ""
+"Pass True to request a channel chat, pass False to request a group or a "
+"supergroup chat."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:13
+msgid ""
+"Optional. Pass True to request a forum supergroup, pass False to request "
+"a non-forum chat. If not specified, no additional restrictions are "
+"applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:17
+msgid ""
+"Optional. Pass True to request a supergroup or a channel with a username,"
+" pass False to request a chat without a username. If not specified, no "
+"additional restrictions are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:21
+msgid ""
+"Optional. Pass True to request a chat owned by the user. Otherwise, no "
+"additional restrictions are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:24
+msgid ""
+"Optional. A JSON-serialized object listing the required administrator "
+"rights of the user in the chat. The rights must be a superset of "
+"bot_administrator_rights. If not specified, no additional restrictions "
+"are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:28
+msgid ""
+"Optional. A JSON-serialized object listing the required administrator "
+"rights of the bot in the chat. The rights must be a subset of "
+"user_administrator_rights. If not specified, no additional restrictions "
+"are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:32
+msgid ""
+"Optional. Pass True to request a chat where the bot is a member. "
+"Otherwise, no additional restrictions are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:36
+msgid ":class:`telebot.types.KeyboardButtonRequestChat`"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUser:1
+msgid "Bases: :py:class:`telebot.types.KeyboardButtonRequestUsers`"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUser:1
+msgid "Deprecated. Use KeyboardButtonRequestUsers instead."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:1
+msgid ""
+"This object defines the criteria used to request a suitable user. The "
+"identifier of the selected user will be shared with the bot when the "
+"corresponding button is pressed."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#keyboardbuttonrequestusers"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:6
+msgid ""
+"Signed 32-bit identifier of the request, which will be received back in "
+"the UsersShared object. Must be unique within the message"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:10
+msgid ""
+"Optional. Pass True to request a bot, pass False to request a regular "
+"user. If not specified, no additional restrictions are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:14
+msgid ""
+"Optional. Pass True to request a premium user, pass False to request a "
+"non-premium user. If not specified, no additional restrictions are "
+"applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:18
+msgid "Optional. The maximum number of users to be selected; 1-10. Defaults to 1."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:22
+msgid ":class:`telebot.types.KeyboardButtonRequestUsers`"
+msgstr ""
+
+#: of telebot.types.LabeledPrice:1
+msgid "This object represents a portion of the price for goods or services."
+msgstr ""
+
+#: of telebot.types.LabeledPrice:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#labeledprice"
+msgstr ""
+
+#: of telebot.types.LabeledPrice:5
+msgid "Portion label"
+msgstr ""
+
+#: of telebot.types.LabeledPrice:8
+msgid ""
+"Price of the product in the smallest units of the currency (integer, not "
+"float/double). For example, for a price of US$ 1.45 pass amount = 145. "
+"See the exp parameter in currencies.json, it shows the number of digits "
+"past the decimal point for each currency (2 for the majority of "
+"currencies)."
+msgstr ""
+
+#: of telebot.types.LabeledPrice:14
+msgid ":class:`telebot.types.LabeledPrice`"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:1 telebot.types.ReactionType:1
+#: telebot.types.ReplyParameters:1 telebot.types.SwitchInlineQueryChosenChat:1
+#: telebot.types.User:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonDeserializable`, "
+":py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:1
+msgid "Describes the options used for link preview generation."
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#linkpreviewoptions"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:5
+msgid "Optional. True, if the link preview is disabled"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:8
+msgid ""
+"Optional. URL to use for the link preview. If empty, then the first URL "
+"found in the message text will be used"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:11
+msgid ""
+"Optional. True, if the media in the link preview is supposed to be "
+"shrunk; ignored if the URL isn't explicitly specified or media size "
+"change isn't supported for the preview"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:14
+msgid ""
+"Optional. True, if the media in the link preview is supposed to be "
+"enlarged; ignored if the URL isn't explicitly specified or media size "
+"change isn't supported for the preview"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:17
+msgid ""
+"Optional. True, if the link preview must be shown above the message text;"
+" otherwise, the link preview will be shown below the message text"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:21
+msgid ":class:`LinkPreviewOptions`"
+msgstr ""
+
+#: of telebot.types.Location:1
+msgid "This object represents a point on the map."
+msgstr ""
+
+#: of telebot.types.Location:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#location"
+msgstr ""
+
+#: of telebot.types.Location:5
+msgid "Longitude as defined by sender"
+msgstr ""
+
+#: of telebot.types.Location:8
+msgid "Latitude as defined by sender"
+msgstr ""
+
+#: of telebot.types.Location:14
+msgid ""
+"Optional. Time relative to the message sending date, during which the "
+"location can be updated; in seconds. For active live locations only."
+msgstr ""
+
+#: of telebot.types.Location:18
+msgid ""
+"Optional. The direction in which user is moving, in degrees; 1-360. For "
+"active live locations only."
+msgstr ""
+
+#: of telebot.types.Location:21
+msgid ""
+"Optional. The maximum distance for proximity alerts about approaching "
+"another chat member, in meters. For sent live locations only."
+msgstr ""
+
+#: of telebot.types.Location:26
+msgid ":class:`telebot.types.Location`"
+msgstr ""
+
+#: of telebot.types.LoginUrl:1
+msgid ""
+"This object represents a parameter of the inline keyboard button used to "
+"automatically authorize a user. Serves as a great replacement for the "
+"Telegram Login Widget when the user is coming from Telegram. All the user"
+" needs to do is tap/click a button and confirm that they want to log in:"
+msgstr ""
+
+#: of telebot.types.LoginUrl:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#loginurl"
+msgstr ""
+
+#: of telebot.types.LoginUrl:5
+msgid ""
+"An HTTPS URL to be opened with user authorization data added to the query"
+" string when the button is pressed. If the user refuses to provide "
+"authorization data, the original URL without information about the user "
+"will be opened. The data added is the same as described in Receiving "
+"authorization data. NOTE: You must always check the hash of the received "
+"data to verify the authentication and the integrity of the data as "
+"described in Checking authorization."
+msgstr ""
+
+#: of telebot.types.LoginUrl:12
+msgid "Optional. New text of the button in forwarded messages."
+msgstr ""
+
+#: of telebot.types.LoginUrl:15
+msgid ""
+"Optional. Username of a bot, which will be used for user authorization. "
+"See Setting up a bot for more details. If not specified, the current "
+"bot's username will be assumed. The url's domain must be the same as the "
+"domain linked with the bot. See Linking your domain to the bot for more "
+"details."
+msgstr ""
+
+#: of telebot.types.LoginUrl:20
+msgid ""
+"Optional. Pass True to request the permission for your bot to send "
+"messages to the user."
+msgstr ""
+
+#: of telebot.types.LoginUrl:25
+msgid ":class:`telebot.types.LoginUrl`"
+msgstr ""
+
+#: of telebot.types.MaskPosition:1
+msgid ""
+"Bases: :py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonDeserializable`, "
+":py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.MaskPosition:1
+msgid ""
+"This object describes the position on faces where a mask should be placed"
+" by default."
+msgstr ""
+
+#: of telebot.types.MaskPosition:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#maskposition"
+msgstr ""
+
+#: of telebot.types.MaskPosition:5
+msgid ""
+"The part of the face relative to which the mask should be placed. One of "
+"“forehead”, “eyes”, “mouth”, or “chin”."
+msgstr ""
+
+#: of telebot.types.MaskPosition:9
+msgid ""
+"Shift by X-axis measured in widths of the mask scaled to the face size, "
+"from left to right. For example, choosing -1.0 will place mask just to "
+"the left of the default mask position."
+msgstr ""
+
+#: of telebot.types.MaskPosition:13
+msgid ""
+"Shift by Y-axis measured in heights of the mask scaled to the face size, "
+"from top to bottom. For example, 1.0 will place the mask just below the "
+"default mask position."
+msgstr ""
+
+#: of telebot.types.MaskPosition:17
+msgid "Mask scaling coefficient. For example, 2.0 means double size."
+msgstr ""
+
+#: of telebot.types.MaskPosition:21
+msgid ":class:`telebot.types.MaskPosition`"
+msgstr ""
+
+#: of telebot.types.MenuButton:1
+msgid ""
+"This object describes the bot's menu button in a private chat. It should "
+"be one of"
+msgstr ""
+
+#: of telebot.types.MenuButton:3
+msgid ":class:`MenuButtonCommands`"
+msgstr ""
+
+#: of telebot.types.MenuButton:4
+msgid ":class:`MenuButtonWebApp`"
+msgstr ""
+
+#: of telebot.types.MenuButton:5
+msgid ":class:`MenuButtonDefault`"
+msgstr ""
+
+#: of telebot.types.MenuButton:7
+msgid ""
+"If a menu button other than MenuButtonDefault is set for a private chat, "
+"then it is applied in the chat. Otherwise the default menu button is "
+"applied. By default, the menu button opens the list of bot commands."
+msgstr ""
+
+#: of telebot.types.MenuButtonCommands:1 telebot.types.MenuButtonDefault:1
+#: telebot.types.MenuButtonWebApp:1
+msgid "Bases: :py:class:`telebot.types.MenuButton`"
+msgstr ""
+
+#: of telebot.types.MenuButtonCommands:1
+msgid "Represents a menu button, which opens the bot's list of commands."
+msgstr ""
+
+#: of telebot.types.MenuButtonCommands:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#menubuttoncommands"
+msgstr ""
+
+#: of telebot.types.MenuButtonCommands:5
+msgid "Type of the button, must be commands"
+msgstr ""
+
+#: of telebot.types.MenuButtonCommands:9
+msgid ":class:`telebot.types.MenuButtonCommands`"
+msgstr ""
+
+#: of telebot.types.MenuButtonDefault:1
+msgid "Describes that no specific value for the menu button was set."
+msgstr ""
+
+#: of telebot.types.MenuButtonDefault:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#menubuttondefault"
+msgstr ""
+
+#: of telebot.types.MenuButtonDefault:5
+msgid "Type of the button, must be default"
+msgstr ""
+
+#: of telebot.types.MenuButtonDefault:9
+msgid ":class:`telebot.types.MenuButtonDefault`"
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:1
+msgid "Represents a menu button, which launches a Web App."
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#menubuttonwebapp"
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:5
+msgid "Type of the button, must be web_app"
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:8
+msgid "Text on the button"
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:11
+msgid ""
+"Description of the Web App that will be launched when the user presses "
+"the button. The Web App will be able to send an arbitrary message on "
+"behalf of the user using the method answerWebAppQuery."
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:16
+msgid ":class:`telebot.types.MenuButtonWebApp`"
+msgstr ""
+
+#: of telebot.types.Message:1
+msgid "This object represents a message."
+msgstr ""
+
+#: of telebot.types.Message:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#message"
+msgstr ""
+
+#: of telebot.types.Message:5
+msgid "Unique message identifier inside this chat"
+msgstr ""
+
+#: of telebot.types.Message:8
+msgid ""
+"Optional. Unique identifier of a message thread to which the message "
+"belongs; for supergroups only"
+msgstr ""
+
+#: of telebot.types.Message:11
+msgid ""
+"Optional. Sender of the message; empty for messages sent to channels. For"
+" backward compatibility, the field contains a fake sender user in non-"
+"channel chats, if the message was sent on behalf of a chat."
+msgstr ""
+
+#: of telebot.types.Message:15
+msgid ""
+"Optional. Sender of the message, sent on behalf of a chat. For example, "
+"the channel itself for channel posts, the supergroup itself for messages "
+"from anonymous group administrators, the linked channel for messages "
+"automatically forwarded to the discussion group. For backward "
+"compatibility, the field from contains a fake sender user in non-channel "
+"chats, if the message was sent on behalf of a chat."
+msgstr ""
+
+#: of telebot.types.Message:21
+msgid "Date the message was sent in Unix time"
+msgstr ""
+
+#: of telebot.types.Message:24
+msgid "Conversation the message belongs to"
+msgstr ""
+
+#: of telebot.types.Message:33
+msgid "deprecated. message in the channel"
+msgstr ""
+
+#: of telebot.types.Message:49
+msgid "Optional. True, if the message is sent to a forum topic"
+msgstr ""
+
+#: of telebot.types.Message:52
+msgid ""
+"Optional. :obj:`bool`, if the message is a channel post that was "
+"automatically forwarded to the connected discussion group"
+msgstr ""
+
+#: of telebot.types.Message:56
+msgid ""
+"Optional. For replies, the original message. Note that the Message object"
+" in this field will not contain further reply_to_message fields even if "
+"it itself is a reply."
+msgstr ""
+
+#: of telebot.types.Message:60
+msgid ""
+"Optional. Information about the message that is being replied to, which "
+"may come from another chat or forum topic"
+msgstr ""
+
+#: of telebot.types.Message:63
+msgid ""
+"Optional. For replies that quote part of the original message, the quoted"
+" part of the message"
+msgstr ""
+
+#: of telebot.types.Message:66
+msgid "Optional. Bot through which the message was sent"
+msgstr ""
+
+#: of telebot.types.Message:69
+msgid "Optional. Date the message was last edited in Unix time"
+msgstr ""
+
+#: of telebot.types.Message:72
+msgid "Optional. :obj:`bool`, if the message can't be forwarded"
+msgstr ""
+
+#: of telebot.types.Message:75
+msgid ""
+"Optional. The unique identifier of a media message group this message "
+"belongs to"
+msgstr ""
+
+#: of telebot.types.Message:78
+msgid ""
+"Optional. Signature of the post author for messages in channels, or the "
+"custom title of an anonymous group administrator"
+msgstr ""
+
+#: of telebot.types.Message:82
+msgid "Optional. For text messages, the actual UTF-8 text of the message"
+msgstr ""
+
+#: of telebot.types.Message:85
+msgid ""
+"Optional. For text messages, special entities like usernames, URLs, bot "
+"commands, etc. that appear in the text"
+msgstr ""
+
+#: of telebot.types.Message:89
+msgid ""
+"Optional. Options used for link preview generation for the message, if it"
+" is a text message and link preview options were changed"
+msgstr ""
+
+#: of telebot.types.Message:93
+msgid ""
+"Optional. Message is an animation, information about the animation. For "
+"backward compatibility, when this field is set, the document field will "
+"also be set"
+msgstr ""
+
+#: of telebot.types.Message:121
+msgid ""
+"Optional. Caption for the animation, audio, document, photo, video or "
+"voice"
+msgstr ""
+
+#: of telebot.types.Message:124
+msgid ""
+"Optional. For messages with a caption, special entities like usernames, "
+"URLs, bot commands, etc. that appear in the caption"
+msgstr ""
+
+#: of telebot.types.Message:143
+msgid ""
+"Optional. Message is a venue, information about the venue. For backward "
+"compatibility, when this field is set, the location field will also be "
+"set"
+msgstr ""
+
+#: of telebot.types.Message:150
+msgid ""
+"Optional. New members that were added to the group or supergroup and "
+"information about them (the bot itself may be one of these members)"
+msgstr ""
+
+#: of telebot.types.Message:154
+msgid ""
+"Optional. A member was removed from the group, information about them "
+"(this member may be the bot itself)"
+msgstr ""
+
+#: of telebot.types.Message:158
+msgid "Optional. A chat title was changed to this value"
+msgstr ""
+
+#: of telebot.types.Message:161
+msgid "Optional. A chat photo was change to this value"
+msgstr ""
+
+#: of telebot.types.Message:164
+msgid "Optional. Service message: the chat photo was deleted"
+msgstr ""
+
+#: of telebot.types.Message:167
+msgid "Optional. Service message: the group has been created"
+msgstr ""
+
+#: of telebot.types.Message:170
+msgid ""
+"Optional. Service message: the supergroup has been created. This field "
+"can't be received in a message coming through updates, because bot can't "
+"be a member of a supergroup when it is created. It can only be found in "
+"reply_to_message if someone replies to a very first message in a directly"
+" created supergroup."
+msgstr ""
+
+#: of telebot.types.Message:175
+msgid ""
+"Optional. Service message: the channel has been created. This field can't"
+" be received in a message coming through updates, because bot can't be a "
+"member of a channel when it is created. It can only be found in "
+"reply_to_message if someone replies to a very first message in a channel."
+msgstr ""
+
+#: of telebot.types.Message:180
+msgid "Optional. Service message: auto-delete timer settings changed in the chat"
+msgstr ""
+
+#: of telebot.types.Message:184
+msgid ""
+"Optional. The group has been migrated to a supergroup with the specified "
+"identifier. This number may have more than 32 significant bits and some "
+"programming languages may have difficulty/silent defects in interpreting "
+"it. But it has at most 52 significant bits, so a signed 64-bit integer or"
+" double-precision float type are safe for storing this identifier."
+msgstr ""
+
+#: of telebot.types.Message:190
+msgid ""
+"Optional. The supergroup has been migrated from a group with the "
+"specified identifier. This number may have more than 32 significant bits "
+"and some programming languages may have difficulty/silent defects in "
+"interpreting it. But it has at most 52 significant bits, so a signed "
+"64-bit integer or double-precision float type are safe for storing this "
+"identifier."
+msgstr ""
+
+#: of telebot.types.Message:196
+msgid ""
+"Optional. Specified message was pinned. Note that the Message object in "
+"this field will not contain further reply_to_message fields even if it is"
+" itself a reply."
+msgstr ""
+
+#: of telebot.types.Message:203
+msgid ""
+"Optional. Message is a service message about a successful payment, "
+"information about the payment. More about payments »"
+msgstr ""
+
+#: of telebot.types.Message:207
+msgid "Optional. Service message: a user was shared with the bot"
+msgstr ""
+
+#: of telebot.types.Message:210
+msgid "Optional. Service message: a chat was shared with the bot"
+msgstr ""
+
+#: of telebot.types.Message:213
+msgid ""
+"Optional. The domain name of the website on which the user has logged in."
+" More about Telegram Login »"
+msgstr ""
+
+#: of telebot.types.Message:217
+msgid ""
+"Optional. Service message: the user allowed the bot added to the "
+"attachment menu to write messages"
+msgstr ""
+
+#: of telebot.types.Message:221
+msgid "Optional. Telegram Passport data"
+msgstr ""
+
+#: of telebot.types.Message:224
+msgid ""
+"Optional. Service message. A user in the chat triggered another user's "
+"proximity alert while sharing Live Location."
+msgstr ""
+
+#: of telebot.types.Message:228
+msgid "Optional. Service message: forum topic created"
+msgstr ""
+
+#: of telebot.types.Message:231
+msgid "Optional. Service message: forum topic edited"
+msgstr ""
+
+#: of telebot.types.Message:234
+msgid "Optional. Service message: forum topic closed"
+msgstr ""
+
+#: of telebot.types.Message:237
+msgid "Optional. Service message: forum topic reopened"
+msgstr ""
+
+#: of telebot.types.Message:240
+msgid "Optional. Service message: the 'General' forum topic hidden"
+msgstr ""
+
+#: of telebot.types.Message:243
+msgid "Optional. Service message: the 'General' forum topic unhidden"
+msgstr ""
+
+#: of telebot.types.Message:246
+msgid "Optional. Service message: a giveaway has been created"
+msgstr ""
+
+#: of telebot.types.Message:249
+msgid "Optional. The message is a scheduled giveaway message"
+msgstr ""
+
+#: of telebot.types.Message:252
+msgid "Optional. Service message: giveaway winners(public winners)"
+msgstr ""
+
+#: of telebot.types.Message:255
+msgid "Optional. Service message: giveaway completed, without public winners"
+msgstr ""
+
+#: of telebot.types.Message:258
+msgid "Optional. Service message: video chat scheduled"
+msgstr ""
+
+#: of telebot.types.Message:261
+msgid "Optional. Service message: video chat started"
+msgstr ""
+
+#: of telebot.types.Message:264
+msgid "Optional. Service message: video chat ended"
+msgstr ""
+
+#: of telebot.types.Message:267
+msgid "Optional. Service message: new participants invited to a video chat"
+msgstr ""
+
+#: of telebot.types.Message:270
+msgid "Optional. Service message: data sent by a Web App"
+msgstr ""
+
+#: of telebot.types.Message:273
+msgid ""
+"Optional. Inline keyboard attached to the message. login_url buttons are "
+"represented as ordinary url buttons."
+msgstr ""
+
+#: of telebot.types.Message
+msgid "forward_origin"
+msgstr ""
+
+#: of telebot.types.Message:46
+msgid "Optional. For forwarded messages, information about the original message;"
+msgstr ""
+
+#: of telebot.types.Message:278
+msgid ":class:`telebot.types.Message`"
+msgstr ""
+
+#: of telebot.types.Message.html_caption:1
+msgid "Returns html-rendered caption."
+msgstr ""
+
+#: of telebot.types.Message.html_text:1
+msgid "Returns html-rendered text."
+msgstr ""
+
+#: of telebot.types.Message.parse_chat:1
+msgid "Parses chat."
+msgstr ""
+
+#: of telebot.types.Message.parse_entities:1
+msgid "Parses message entity array."
+msgstr ""
+
+#: of telebot.types.Message.parse_photo:1
+msgid "Parses photo array."
+msgstr ""
+
+#: of telebot.types.MessageAutoDeleteTimerChanged:1
+msgid ""
+"This object represents a service message about a change in auto-delete "
+"timer settings."
+msgstr ""
+
+#: of telebot.types.MessageAutoDeleteTimerChanged:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#messageautodeletetimerchanged"
+msgstr ""
+
+#: of telebot.types.MessageAutoDeleteTimerChanged:5
+msgid "New auto-delete time for messages in the chat; in seconds"
+msgstr ""
+
+#: of telebot.types.MessageAutoDeleteTimerChanged:9
+msgid ":class:`telebot.types.MessageAutoDeleteTimerChanged`"
+msgstr ""
+
+#: of telebot.types.MessageEntity:1
+msgid ""
+"This object represents one special entity in a text message. For example,"
+" hashtags, usernames, URLs, etc."
+msgstr ""
+
+#: of telebot.types.MessageEntity:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#messageentity"
+msgstr ""
+
+#: of telebot.types.MessageEntity:5
+msgid ""
+"Type of the entity. Currently, can be “mention” (@username), “hashtag” "
+"(#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” "
+"(https://telegram.org), “email” (do-not-reply@telegram.org), "
+"“phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic "
+"text), “underline” (underlined text), “strikethrough” (strikethrough "
+"text), “spoiler” (spoiler message), “code” (monowidth string), “pre” "
+"(monowidth block), “text_link” (for clickable text URLs), “text_mention” "
+"(for users without usernames), “custom_emoji” (for inline custom emoji "
+"stickers)"
+msgstr ""
+
+#: of telebot.types.MessageEntity:13
+msgid "Offset in UTF-16 code units to the start of the entity"
+msgstr ""
+
+#: of telebot.types.MessageEntity:16
+msgid "Length of the entity in UTF-16 code units"
+msgstr ""
+
+#: of telebot.types.MessageEntity:19
+msgid ""
+"Optional. For “text_link” only, URL that will be opened after user taps "
+"on the text"
+msgstr ""
+
+#: of telebot.types.MessageEntity:22
+msgid "Optional. For “text_mention” only, the mentioned user"
+msgstr ""
+
+#: of telebot.types.MessageEntity:25
+msgid "Optional. For “pre” only, the programming language of the entity text"
+msgstr ""
+
+#: of telebot.types.MessageEntity:28
+msgid ""
+"Optional. For “custom_emoji” only, unique identifier of the custom emoji."
+" Use get_custom_emoji_stickers to get full information about the sticker."
+msgstr ""
+
+#: of telebot.types.MessageEntity:33
+msgid ":class:`telebot.types.MessageEntity`"
+msgstr ""
+
+#: of telebot.types.MessageEntity.to_list_of_dicts:1
+msgid "Converts a list of MessageEntity objects to a list of dictionaries."
+msgstr ""
+
+#: of telebot.types.MessageID:1
+msgid "This object represents a unique message identifier."
+msgstr ""
+
+#: of telebot.types.MessageID:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#messageid"
+msgstr ""
+
+#: of telebot.types.MessageID:5
+msgid "Unique message identifier"
+msgstr ""
+
+#: of telebot.types.MessageID:9
+msgid ":class:`telebot.types.MessageId`"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:1
+msgid "This object describes the origin of a message."
+msgstr ""
+
+#: of telebot.types.MessageOrigin:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#messageorigin"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:5
+msgid "Type of the message origin"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:8
+msgid "Date the message was sent originally in Unix time"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:11
+msgid "User that sent the message originally (for MessageOriginUser)"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:14
+msgid ""
+"Name of the user that sent the message originally (for "
+"MessageOriginHiddenUser)"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:17
+msgid "Chat that sent the message originally (for MessageOriginChat)"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:20
+msgid "Optional. Author signature for certain cases"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:24
+msgid ":class:`MessageOrigin`"
+msgstr ""
+
+#: of telebot.types.MessageOriginChannel:1 telebot.types.MessageOriginChat:1
+#: telebot.types.MessageOriginHiddenUser:1 telebot.types.MessageOriginUser:1
+msgid "Bases: :py:class:`telebot.types.MessageOrigin`"
+msgstr ""
+
+#: of telebot.types.MessageOriginChannel:1
+msgid "The message was originally sent to a channel chat."
+msgstr ""
+
+#: of telebot.types.MessageOriginChannel:3
+msgid "Channel chat to which the message was originally sent"
+msgstr ""
+
+#: of telebot.types.MessageOriginChannel:9
+msgid "Optional. Signature of the original post author"
+msgstr ""
+
+#: of telebot.types.MessageOriginChat:1
+msgid "The message was originally sent on behalf of a chat to a group chat."
+msgstr ""
+
+#: of telebot.types.MessageOriginChat:3
+msgid "Chat that sent the message originally"
+msgstr ""
+
+#: of telebot.types.MessageOriginChat:6
+msgid ""
+"Optional. For messages originally sent by an anonymous chat "
+"administrator, original message author signature"
+msgstr ""
+
+#: of telebot.types.MessageOriginHiddenUser:1
+msgid "The message was originally sent by an unknown user."
+msgstr ""
+
+#: of telebot.types.MessageOriginHiddenUser:3
+msgid "Name of the user that sent the message originally"
+msgstr ""
+
+#: of telebot.types.MessageOriginUser:1
+msgid "The message was originally sent by a known user."
+msgstr ""
+
+#: of telebot.types.MessageOriginUser:3
+msgid "User that sent the message originally"
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:1
+#: telebot.types.MessageReactionUpdated:1
+msgid ""
+"This object represents a service message about a change in the list of "
+"the current user's reactions to a message."
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#messagereactioncountupdated"
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:5
+msgid "The chat containing the message"
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:11
+#: telebot.types.MessageReactionUpdated:17
+msgid "Date of the change in Unix time"
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:14
+msgid "List of reactions that are present on the message"
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:18
+msgid ":class:`MessageReactionCountUpdated`"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#messagereactionupdated"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:5
+msgid "The chat containing the message the user reacted to"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:8
+msgid "Unique identifier of the message inside the chat"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:11
+msgid "Optional. The user that changed the reaction, if the user isn't anonymous"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:14
+msgid ""
+"Optional. The chat on behalf of which the reaction was changed, if the "
+"user is anonymous"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:20
+msgid "Previous list of reaction types that were set by the user"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:23
+msgid "New list of reaction types that have been set by the user"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:27
+msgid ":class:`MessageReactionUpdated`"
+msgstr ""
+
+#: of telebot.types.OrderInfo:1
+msgid "This object represents information about an order."
+msgstr ""
+
+#: of telebot.types.OrderInfo:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#orderinfo"
+msgstr ""
+
+#: of telebot.types.OrderInfo:5
+msgid "Optional. User name"
+msgstr ""
+
+#: of telebot.types.OrderInfo:8
+msgid "Optional. User's phone number"
+msgstr ""
+
+#: of telebot.types.OrderInfo:11
+msgid "Optional. User email"
+msgstr ""
+
+#: of telebot.types.OrderInfo:14
+msgid "Optional. User shipping address"
+msgstr ""
+
+#: of telebot.types.OrderInfo:18
+msgid ":class:`telebot.types.OrderInfo`"
+msgstr ""
+
+#: of telebot.types.PhotoSize:1
+msgid "This object represents one size of a photo or a file / sticker thumbnail."
+msgstr ""
+
+#: of telebot.types.PhotoSize:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#photosize"
+msgstr ""
+
+#: of telebot.types.PhotoSize:12
+msgid "Photo width"
+msgstr ""
+
+#: of telebot.types.PhotoSize:15
+msgid "Photo height"
+msgstr ""
+
+#: of telebot.types.PhotoSize:18 telebot.types.Sticker:51
+#: telebot.types.VideoNote:21
+msgid "Optional. File size in bytes"
+msgstr ""
+
+#: of telebot.types.PhotoSize:22
+msgid ":class:`telebot.types.PhotoSize`"
+msgstr ""
+
+#: of telebot.types.Poll:1
+msgid "This object contains information about a poll."
+msgstr ""
+
+#: of telebot.types.Poll:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#poll"
+msgstr ""
+
+#: of telebot.types.Poll:5 telebot.types.PollAnswer:5
+msgid "Unique poll identifier"
+msgstr ""
+
+#: of telebot.types.Poll:8
+msgid "Poll question, 1-300 characters"
+msgstr ""
+
+#: of telebot.types.Poll:11
+msgid "List of poll options"
+msgstr ""
+
+#: of telebot.types.Poll:14
+msgid "Total number of users that voted in the poll"
+msgstr ""
+
+#: of telebot.types.Poll:17
+msgid "True, if the poll is closed"
+msgstr ""
+
+#: of telebot.types.Poll:20
+msgid "True, if the poll is anonymous"
+msgstr ""
+
+#: of telebot.types.Poll:23
+msgid "Poll type, currently can be “regular” or “quiz”"
+msgstr ""
+
+#: of telebot.types.Poll:26
+msgid "True, if the poll allows multiple answers"
+msgstr ""
+
+#: of telebot.types.Poll:29
+msgid ""
+"Optional. 0-based identifier of the correct answer option. Available only"
+" for polls in the quiz mode, which are closed, or was sent (not "
+"forwarded) by the bot or to the private chat with the bot."
+msgstr ""
+
+#: of telebot.types.Poll:33
+msgid ""
+"Optional. Text that is shown when a user chooses an incorrect answer or "
+"taps on the lamp icon in a quiz-style poll, 0-200 characters"
+msgstr ""
+
+#: of telebot.types.Poll:37
+msgid ""
+"Optional. Special entities like usernames, URLs, bot commands, etc. that "
+"appear in the explanation"
+msgstr ""
+
+#: of telebot.types.Poll:41
+msgid "Optional. Amount of time in seconds the poll will be active after creation"
+msgstr ""
+
+#: of telebot.types.Poll:44
+msgid ""
+"Optional. Point in time (Unix timestamp) when the poll will be "
+"automatically closed"
+msgstr ""
+
+#: of telebot.types.Poll:48
+msgid ":class:`telebot.types.Poll`"
+msgstr ""
+
+#: of telebot.types.Poll.add:1
+msgid "Add an option to the poll."
+msgstr ""
+
+#: of telebot.types.Poll.add:3
+msgid "Option to add"
+msgstr ""
+
+#: of telebot.types.PollAnswer:1
+msgid "This object represents an answer of a user in a non-anonymous poll."
+msgstr ""
+
+#: of telebot.types.PollAnswer:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#pollanswer"
+msgstr ""
+
+#: of telebot.types.PollAnswer:8
+msgid ""
+"Optional. The chat that changed the answer to the poll, if the voter is "
+"anonymous"
+msgstr ""
+
+#: of telebot.types.PollAnswer:11
+msgid "Optional. The user, who changed the answer to the poll"
+msgstr ""
+
+#: of telebot.types.PollAnswer:14
+msgid ""
+"0-based identifiers of answer options, chosen by the user. May be empty "
+"if the user retracted their vote."
+msgstr ""
+
+#: of telebot.types.PollAnswer:19
+msgid ":class:`telebot.types.PollAnswer`"
+msgstr ""
+
+#: of telebot.types.PollOption:1
+msgid "This object contains information about one answer option in a poll."
+msgstr ""
+
+#: of telebot.types.PollOption:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#polloption"
+msgstr ""
+
+#: of telebot.types.PollOption:5
+msgid "Option text, 1-100 characters"
+msgstr ""
+
+#: of telebot.types.PollOption:8
+msgid "Number of users that voted for this option"
+msgstr ""
+
+#: of telebot.types.PollOption:12
+msgid ":class:`telebot.types.PollOption`"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:1
+msgid "This object contains information about an incoming pre-checkout query."
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#precheckoutquery"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:5 telebot.types.ShippingQuery:5
+msgid "Unique query identifier"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:8 telebot.types.ShippingQuery:8
+msgid "User who sent the query"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:19 telebot.types.ShippingQuery:11
+#: telebot.types.SuccessfulPayment:13
+msgid "Bot specified invoice payload"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:22 telebot.types.SuccessfulPayment:16
+msgid "Optional. Identifier of the shipping option chosen by the user"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:25 telebot.types.SuccessfulPayment:19
+msgid "Optional. Order information provided by the user"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:29
+msgid ":class:`telebot.types.PreCheckoutQuery`"
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:1
+msgid ""
+"This object represents the content of a service message, sent whenever a "
+"user in the chat triggers a proximity alert set by another user."
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#proximityalerttriggered"
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:5
+msgid "User that triggered the alert"
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:8
+msgid "User that set the alert"
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:11
+msgid "The distance between the users"
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:15
+msgid ":class:`telebot.types.ProximityAlertTriggered`"
+msgstr ""
+
+#: of telebot.types.ReactionCount:1
+msgid ""
+"This object represents a reaction added to a message along with the "
+"number of times it was added."
+msgstr ""
+
+#: of telebot.types.ReactionCount:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#reactioncount"
+msgstr ""
+
+#: of telebot.types.ReactionCount:5 telebot.types.ReactionType:5
+msgid "Type of the reaction"
+msgstr ""
+
+#: of telebot.types.ReactionCount:8
+msgid "Number of times the reaction was added"
+msgstr ""
+
+#: of telebot.types.ReactionCount:12
+msgid ":class:`ReactionCount`"
+msgstr ""
+
+#: of telebot.types.ReactionType:1
+msgid "This object represents a reaction type."
+msgstr ""
+
+#: of telebot.types.ReactionType:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#reactiontype"
+msgstr ""
+
+#: of telebot.types.ReactionType:9
+msgid ":class:`ReactionType`"
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:1 telebot.types.ReactionTypeEmoji:1
+msgid "Bases: :py:class:`telebot.types.ReactionType`"
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:1
+msgid "This object represents a custom emoji reaction type."
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reactiontypecustomemoji"
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:5
+msgid "Type of the reaction, must be custom_emoji"
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:8
+msgid "Identifier of the custom emoji"
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:12
+msgid ":class:`ReactionTypeCustomEmoji`"
+msgstr ""
+
+#: of telebot.types.ReactionTypeEmoji:1
+msgid "This object represents an emoji reaction type."
+msgstr ""
+
+#: of telebot.types.ReactionTypeEmoji:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reactiontypeemoji"
+msgstr ""
+
+#: of telebot.types.ReactionTypeEmoji:5
+msgid "Type of the reaction, must be emoji"
+msgstr ""
+
+#: of telebot.types.ReactionTypeEmoji:8
+msgid "Reaction emoji. List is available on the API doc."
+msgstr ""
+
+#: of telebot.types.ReactionTypeEmoji:12
+msgid ":class:`ReactionTypeEmoji`"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:1
+msgid ""
+"This object represents a custom keyboard with reply options (see "
+"Introduction to bots for details and examples)."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:3
+msgid "Example on creating ReplyKeyboardMarkup object"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:16
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#replykeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:18
+msgid ""
+":obj:`list` of button rows, each represented by an :obj:`list` of "
+":class:`telebot.types.KeyboardButton` objects"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:22
+msgid ""
+"Optional. Requests clients to resize the keyboard vertically for optimal "
+"fit (e.g., make the keyboard smaller if there are just two rows of "
+"buttons). Defaults to false, in which case the custom keyboard is always "
+"of the same height as the app's standard keyboard."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:27
+msgid ""
+"Optional. Requests clients to hide the keyboard as soon as it's been "
+"used. The keyboard will still be available, but clients will "
+"automatically display the usual letter-keyboard in the chat - the user "
+"can press a special button in the input field to see the custom keyboard "
+"again. Defaults to false."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:32
+msgid ""
+"Optional. The placeholder to be shown in the input field when the "
+"keyboard is active; 1-64 characters"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:36
+msgid ""
+"Optional. Use this parameter if you want to show the keyboard to specific"
+" users only. Targets: 1) users that are @mentioned in the text of the "
+"Message object; 2) if the bot's message is a reply (has "
+"reply_to_message_id), sender of the original message.Example: A user "
+"requests to change the bot's language, bot replies to the request with a "
+"keyboard to select the new language. Other users in the group don't see "
+"the keyboard."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:42
+msgid ""
+"Optional. Use this parameter if you want to show the keyboard to specific"
+" users only. Targets: 1) users that are @mentioned in the text of the "
+"Message object; 2) if the bot's message is a reply (has "
+"reply_to_message_id), sender of the original message. Example: A user "
+"requests to change the bot's language, bot replies to the request with a "
+"keyboard to select the new language. Other users in the group don't see "
+"the keyboard."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:42
+msgid ""
+"Optional. Use this parameter if you want to show the keyboard to specific"
+" users only. Targets: 1) users that are @mentioned in the text of the "
+"Message object; 2) if the bot's message is a reply (has "
+"reply_to_message_id), sender of the original message."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:46
+msgid ""
+"Example: A user requests to change the bot's language, bot replies to the"
+" request with a keyboard to select the new language. Other users in the "
+"group don't see the keyboard."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:50
+#: telebot.types.ReplyKeyboardMarkup.add:14
+#: telebot.types.ReplyKeyboardMarkup.row:9
+msgid ":class:`telebot.types.ReplyKeyboardMarkup`"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup.add:1
+msgid ""
+"This function adds strings to the keyboard, while not exceeding "
+"row_width. E.g. ReplyKeyboardMarkup#add(\"A\", \"B\", \"C\") yields the "
+"json result {keyboard: [[\"A\"], [\"B\"], [\"C\"]]} when row_width is set"
+" to 1. When row_width is set to 2, the following is the result of this "
+"function: {keyboard: [[\"A\", \"B\"], [\"C\"]]} See "
+"https://core.telegram.org/bots/api#replykeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup.add:7
+msgid "KeyboardButton to append to the keyboard"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup.row:1
+msgid ""
+"Adds a list of KeyboardButton to the keyboard. This function does not "
+"consider row_width. ReplyKeyboardMarkup#row(\"A\")#row(\"B\", "
+"\"C\")#to_json() outputs '{keyboard: [[\"A\"], [\"B\", \"C\"]]}' See "
+"https://core.telegram.org/bots/api#replykeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup.row:5
+msgid "strings"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardRemove:1
+msgid ""
+"Upon receiving a message with this object, Telegram clients will remove "
+"the current custom keyboard and display the default letter-keyboard. By "
+"default, custom keyboards are displayed until a new keyboard is sent by a"
+" bot. An exception is made for one-time keyboards that are hidden "
+"immediately after the user presses a button (see ReplyKeyboardMarkup)."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardRemove:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#replykeyboardremove"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardRemove:5
+msgid ""
+"Requests clients to remove the custom keyboard (user will not be able to "
+"summon this keyboard; if you want to hide the keyboard from sight but "
+"keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup) Note "
+"that this parameter is set to True by default by the library. You cannot "
+"modify it."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardRemove:11
+msgid ""
+"Optional. Use this parameter if you want to remove the keyboard for "
+"specific users only. Targets: 1) users that are @mentioned in the text of"
+" the Message object; 2) if the bot's message is a reply (has "
+"reply_to_message_id), sender of the original message.Example: A user "
+"votes in a poll, bot returns confirmation message in reply to the vote "
+"and removes the keyboard for that user, while still showing the keyboard "
+"with poll options to users who haven't voted yet."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardRemove:19
+msgid ":class:`telebot.types.ReplyKeyboardRemove`"
+msgstr ""
+
+#: of telebot.types.ReplyParameters:1
+msgid "Describes reply parameters for the message that is being sent."
+msgstr ""
+
+#: of telebot.types.ReplyParameters:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#replyparameters"
+msgstr ""
+
+#: of telebot.types.ReplyParameters:5
+msgid ""
+"Identifier of the message that will be replied to in the current chat, or"
+" in the chat chat_id if it is specified"
+msgstr ""
+
+#: of telebot.types.ReplyParameters:8
+msgid ""
+"Optional. If the message to be replied to is from a different chat, "
+"unique identifier for the chat or username of the channel (in the format "
+"@channelusername)"
+msgstr ""
+
+#: of telebot.types.ReplyParameters:11
+msgid ""
+"Optional. Pass True if the message should be sent even if the specified "
+"message to be replied to is not found; can be used only for replies in "
+"the same chat and forum topic."
+msgstr ""
+
+#: of telebot.types.ReplyParameters:14
+msgid ""
+"Optional. Quoted part of the message to be replied to; 0-1024 characters "
+"after entities parsing. The quote must be an exact substring of the "
+"message to be replied to, including bold, italic, underline, "
+"strikethrough, spoiler, and custom_emoji entities. The message will fail "
+"to send if the quote isn't found in the original message."
+msgstr ""
+
+#: of telebot.types.ReplyParameters:17
+msgid ""
+"Optional. Mode for parsing entities in the quote. See formatting options "
+"for more details."
+msgstr ""
+
+#: of telebot.types.ReplyParameters:20
+msgid ""
+"Optional. A JSON-serialized list of special entities that appear in the "
+"quote. It can be specified instead of quote_parse_mode."
+msgstr ""
+
+#: of telebot.types.ReplyParameters:23
+msgid ""
+"Optional. Position of the quote in the original message in UTF-16 code "
+"units"
+msgstr ""
+
+#: of telebot.types.ReplyParameters:27
+msgid ":class:`ReplyParameters`"
+msgstr ""
+
+#: of telebot.types.SentWebAppMessage:1 telebot.types.WebAppData:1
+#: telebot.types.WebAppInfo:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonDeserializable`, "
+":py:class:`telebot.types.Dictionaryable`"
+msgstr ""
+
+#: of telebot.types.SentWebAppMessage:1
+msgid "Describes an inline message sent by a Web App on behalf of a user."
+msgstr ""
+
+#: of telebot.types.SentWebAppMessage:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#sentwebappmessage"
+msgstr ""
+
+#: of telebot.types.SentWebAppMessage:5
+msgid ""
+"Optional. Identifier of the sent inline message. Available only if there "
+"is an inline keyboard attached to the message."
+msgstr ""
+
+#: of telebot.types.SentWebAppMessage:10
+msgid ":class:`telebot.types.SentWebAppMessage`"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:1
+msgid "This object represents a shipping address."
+msgstr ""
+
+#: of telebot.types.ShippingAddress:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#shippingaddress"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:5
+msgid "Two-letter ISO 3166-1 alpha-2 country code"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:8
+msgid "State, if applicable"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:11
+msgid "City"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:14
+msgid "First line for the address"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:17
+msgid "Second line for the address"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:20
+msgid "Address post code"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:24
+msgid ":class:`telebot.types.ShippingAddress`"
+msgstr ""
+
+#: of telebot.types.ShippingOption:1
+msgid "This object represents one shipping option."
+msgstr ""
+
+#: of telebot.types.ShippingOption:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#shippingoption"
+msgstr ""
+
+#: of telebot.types.ShippingOption:5
+msgid "Shipping option identifier"
+msgstr ""
+
+#: of telebot.types.ShippingOption:8
+msgid "Option title"
+msgstr ""
+
+#: of telebot.types.ShippingOption:11
+msgid "List of price portions"
+msgstr ""
+
+#: of telebot.types.ShippingOption:15
+msgid ":class:`telebot.types.ShippingOption`"
+msgstr ""
+
+#: of telebot.types.ShippingOption.add_price:1
+msgid "Add LabeledPrice to ShippingOption"
+msgstr ""
+
+#: of telebot.types.ShippingOption.add_price:3
+msgid "LabeledPrices"
+msgstr ""
+
+#: of telebot.types.ShippingOption.add_price:6
+msgid "None"
+msgstr ""
+
+#: of telebot.types.ShippingQuery:1
+msgid "This object contains information about an incoming shipping query."
+msgstr ""
+
+#: of telebot.types.ShippingQuery:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#shippingquery"
+msgstr ""
+
+#: of telebot.types.ShippingQuery:14
+msgid "User specified shipping address"
+msgstr ""
+
+#: of telebot.types.ShippingQuery:18
+msgid ":class:`telebot.types.ShippingQuery`"
+msgstr ""
+
+#: of telebot.types.Sticker:1
+msgid "This object represents a sticker."
+msgstr ""
+
+#: of telebot.types.Sticker:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#sticker"
+msgstr ""
+
+#: of telebot.types.Sticker:12
+msgid ""
+"Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. "
+"The type of the sticker is independent from its format, which is "
+"determined by the fields is_animated and is_video."
+msgstr ""
+
+#: of telebot.types.Sticker:16
+msgid "Sticker width"
+msgstr ""
+
+#: of telebot.types.Sticker:19
+msgid "Sticker height"
+msgstr ""
+
+#: of telebot.types.Sticker:22
+msgid "True, if the sticker is animated"
+msgstr ""
+
+#: of telebot.types.Sticker:25
+msgid "True, if the sticker is a video sticker"
+msgstr ""
+
+#: of telebot.types.Sticker:28
+msgid "Optional. Sticker thumbnail in the .WEBP or .JPG format"
+msgstr ""
+
+#: of telebot.types.Sticker:31
+msgid "Optional. Emoji associated with the sticker"
+msgstr ""
+
+#: of telebot.types.Sticker:34
+msgid "Optional. Name of the sticker set to which the sticker belongs"
+msgstr ""
+
+#: of telebot.types.Sticker:37
+msgid "Optional. Premium animation for the sticker, if the sticker is premium"
+msgstr ""
+
+#: of telebot.types.Sticker:40
+msgid "Optional. For mask stickers, the position where the mask should be placed"
+msgstr ""
+
+#: of telebot.types.Sticker:43
+msgid "Optional. For custom emoji stickers, unique identifier of the custom emoji"
+msgstr ""
+
+#: of telebot.types.Sticker:46
+msgid ""
+"Optional. True, if the sticker must be repainted to a text color in "
+"messages, the color of the Telegram Premium badge in emoji status, white "
+"color on chat photos, or another appropriate color in other places"
+msgstr ""
+
+#: of telebot.types.Sticker:55
+msgid ":class:`telebot.types.Sticker`"
+msgstr ""
+
+#: of telebot.types.StickerSet:1
+msgid "This object represents a sticker set."
+msgstr ""
+
+#: of telebot.types.StickerSet:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#stickerset"
+msgstr ""
+
+#: of telebot.types.StickerSet:5
+msgid "Sticker set name"
+msgstr ""
+
+#: of telebot.types.StickerSet:8
+msgid "Sticker set title"
+msgstr ""
+
+#: of telebot.types.StickerSet:11
+msgid ""
+"Type of stickers in the set, currently one of “regular”, “mask”, "
+"“custom_emoji”"
+msgstr ""
+
+#: of telebot.types.StickerSet:14
+msgid "True, if the sticker set contains animated stickers"
+msgstr ""
+
+#: of telebot.types.StickerSet:17
+msgid "True, if the sticker set contains video stickers"
+msgstr ""
+
+#: of telebot.types.StickerSet:23
+msgid "List of all set stickers"
+msgstr ""
+
+#: of telebot.types.StickerSet:26
+msgid "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"
+msgstr ""
+
+#: of telebot.types.StickerSet:30
+msgid ":class:`telebot.types.StickerSet`"
+msgstr ""
+
+#: of telebot.types.StickerSet.contains_masks:1
+msgid "Deprecated since Bot API 6.2, use sticker_type instead."
+msgstr ""
+
+#: of telebot.types.Story:1
+msgid ""
+"This object represents a message about a forwarded story in the chat. "
+"Currently holds no information."
+msgstr ""
+
+#: of telebot.types.SuccessfulPayment:1
+msgid "This object contains basic information about a successful payment."
+msgstr ""
+
+#: of telebot.types.SuccessfulPayment:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#successfulpayment"
+msgstr ""
+
+#: of telebot.types.SuccessfulPayment:22
+msgid "Telegram payment identifier"
+msgstr ""
+
+#: of telebot.types.SuccessfulPayment:25
+msgid "Provider payment identifier"
+msgstr ""
+
+#: of telebot.types.SuccessfulPayment:29
+msgid ":class:`telebot.types.SuccessfulPayment`"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:1
+msgid ""
+"Represents an inline button that switches the current user to inline mode"
+" in a chosen chat, with an optional default inline query."
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:6
+msgid ""
+"Optional. The default inline query to be inserted in the input field. If "
+"left empty, only the bot's username will be inserted"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:10
+msgid "Optional. True, if private chats with users can be chosen"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:13
+msgid "Optional. True, if private chats with bots can be chosen"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:16
+msgid "Optional. True, if group and supergroup chats can be chosen"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:19
+msgid "Optional. True, if channel chats can be chosen"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:23
+msgid ":class:`SwitchInlineQueryChosenChat`"
+msgstr ""
+
+#: of telebot.types.TextQuote:1
+msgid ""
+"This object contains information about the quoted part of a message that "
+"is replied to by the given message."
+msgstr ""
+
+#: of telebot.types.TextQuote:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#textquote"
+msgstr ""
+
+#: of telebot.types.TextQuote:5
+msgid ""
+"Text of the quoted part of a message that is replied to by the given "
+"message"
+msgstr ""
+
+#: of telebot.types.TextQuote:8
+msgid ""
+"Optional. Special entities that appear in the quote. Currently, only "
+"bold, italic, underline, strikethrough, spoiler, and custom_emoji "
+"entities are kept in quotes."
+msgstr ""
+
+#: of telebot.types.TextQuote:11
+msgid ""
+"Approximate quote position in the original message in UTF-16 code units "
+"as specified by the sender"
+msgstr ""
+
+#: of telebot.types.TextQuote:14
+msgid ""
+"Optional. True, if the quote was chosen manually by the message sender. "
+"Otherwise, the quote was added automatically by the server."
+msgstr ""
+
+#: of telebot.types.TextQuote:18
+msgid ":class:`TextQuote`"
+msgstr ""
+
+#: of telebot.types.Update:1
+msgid ""
+"This object represents an incoming update.At most one of the optional "
+"parameters can be present in any given update."
+msgstr ""
+
+#: of telebot.types.Update:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#update"
+msgstr ""
+
+#: of telebot.types.Update:5
+msgid ""
+"The update's unique identifier. Update identifiers start from a certain "
+"positive number and increase sequentially. This ID becomes especially "
+"handy if you're using webhooks, since it allows you to ignore repeated "
+"updates or to restore the correct update sequence, should they get out of"
+" order. If there are no new updates for at least a week, then identifier "
+"of the next update will be chosen randomly instead of sequentially."
+msgstr ""
+
+#: of telebot.types.Update:11
+msgid "Optional. New incoming message of any kind - text, photo, sticker, etc."
+msgstr ""
+
+#: of telebot.types.Update:14
+msgid "Optional. New version of a message that is known to the bot and was edited"
+msgstr ""
+
+#: of telebot.types.Update:17
+msgid ""
+"Optional. New incoming channel post of any kind - text, photo, sticker, "
+"etc."
+msgstr ""
+
+#: of telebot.types.Update:20
+msgid ""
+"Optional. New version of a channel post that is known to the bot and was "
+"edited"
+msgstr ""
+
+#: of telebot.types.Update:23
+msgid ""
+"Optional. A reaction to a message was changed by a user. The bot must be "
+"an administrator in the chat and must explicitly specify "
+"\"message_reaction\" in the list of allowed_updates to receive these "
+"updates. The update isn't received for reactions set by bots."
+msgstr ""
+
+#: of telebot.types.Update:27
+msgid ""
+"Optional. Reactions to a message with anonymous reactions were changed. "
+"The bot must be an administrator in the chat and must explicitly specify "
+"\"message_reaction_count\" in the list of allowed_updates to receive "
+"these updates."
+msgstr ""
+
+#: of telebot.types.Update:31
+msgid "Optional. New incoming inline query"
+msgstr ""
+
+#: of telebot.types.Update:34
+msgid ""
+"Optional. The result of an inline query that was chosen by a user and "
+"sent to their chat partner. Please see our documentation on the feedback "
+"collecting for details on how to enable these updates for your bot."
+msgstr ""
+
+#: of telebot.types.Update:39
+msgid "Optional. New incoming callback query"
+msgstr ""
+
+#: of telebot.types.Update:42
+msgid ""
+"Optional. New incoming shipping query. Only for invoices with flexible "
+"price"
+msgstr ""
+
+#: of telebot.types.Update:45
+msgid ""
+"Optional. New incoming pre-checkout query. Contains full information "
+"about checkout"
+msgstr ""
+
+#: of telebot.types.Update:49
+msgid ""
+"Optional. New poll state. Bots receive only updates about stopped polls "
+"and polls, which are sent by the bot"
+msgstr ""
+
+#: of telebot.types.Update:53
+msgid ""
+"Optional. A user changed their answer in a non-anonymous poll. Bots "
+"receive new votes only in polls that were sent by the bot itself."
+msgstr ""
+
+#: of telebot.types.Update:57
+msgid ""
+"Optional. The bot's chat member status was updated in a chat. For private"
+" chats, this update is received only when the bot is blocked or unblocked"
+" by the user."
+msgstr ""
+
+#: of telebot.types.Update:61
+msgid ""
+"Optional. A chat member's status was updated in a chat. The bot must be "
+"an administrator in the chat and must explicitly specify “chat_member” in"
+" the list of allowed_updates to receive these updates."
+msgstr ""
+
+#: of telebot.types.Update:65
+msgid ""
+"Optional. A request to join the chat has been sent. The bot must have the"
+" can_invite_users administrator right in the chat to receive these "
+"updates."
+msgstr ""
+
+#: of telebot.types.Update:69
+msgid ""
+"Optional. A chat boost was added or changed. The bot must be an "
+"administrator in the chat to receive these updates."
+msgstr ""
+
+#: of telebot.types.Update:72
+msgid ""
+"Optional. A chat boost was removed. The bot must be an administrator in "
+"the chat to receive these updates."
+msgstr ""
+
+#: of telebot.types.Update:76
+msgid ":class:`telebot.types.Update`"
+msgstr ""
+
+#: of telebot.types.User:1
+msgid "This object represents a Telegram user or bot."
+msgstr ""
+
+#: of telebot.types.User:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#user"
+msgstr ""
+
+#: of telebot.types.User:5
+msgid ""
+"Unique identifier for this user or bot. This number may have more than 32"
+" significant bits and some programming languages may have "
+"difficulty/silent defects in interpreting it. But it has at most 52 "
+"significant bits, so a 64-bit integer or double-precision float type are "
+"safe for storing this identifier."
+msgstr ""
+
+#: of telebot.types.User:10
+msgid "True, if this user is a bot"
+msgstr ""
+
+#: of telebot.types.User:13
+msgid "User's or bot's first name"
+msgstr ""
+
+#: of telebot.types.User:16
+msgid "Optional. User's or bot's last name"
+msgstr ""
+
+#: of telebot.types.User:19
+msgid "Optional. User's or bot's username"
+msgstr ""
+
+#: of telebot.types.User:22
+msgid "Optional. IETF language tag of the user's language"
+msgstr ""
+
+#: of telebot.types.User:25
+msgid "Optional. :obj:`bool`, if this user is a Telegram Premium user"
+msgstr ""
+
+#: of telebot.types.User:28
+msgid "Optional. :obj:`bool`, if this user added the bot to the attachment menu"
+msgstr ""
+
+#: of telebot.types.User:31
+msgid ""
+"Optional. True, if the bot can be invited to groups. Returned only in "
+"getMe."
+msgstr ""
+
+#: of telebot.types.User:34
+msgid ""
+"Optional. True, if privacy mode is disabled for the bot. Returned only in"
+" getMe."
+msgstr ""
+
+#: of telebot.types.User:38
+msgid ""
+"Optional. True, if the bot supports inline queries. Returned only in "
+"getMe."
+msgstr ""
+
+#: of telebot.types.User:42
+msgid ":class:`telebot.types.User`"
+msgstr ""
+
+#: of telebot.types.User.full_name:1
+msgid "User's full name"
+msgstr ""
+
+#: of telebot.types.User.full_name
+msgid "type"
+msgstr ""
+
+#: of telebot.types.User.full_name:3
+msgid "return"
+msgstr ""
+
+#: of telebot.types.UserChatBoosts:1
+msgid "This object represents a list of boosts added to a chat by a user."
+msgstr ""
+
+#: of telebot.types.UserChatBoosts:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#userchatboosts"
+msgstr ""
+
+#: of telebot.types.UserChatBoosts:5
+msgid "The list of boosts added to the chat by the user"
+msgstr ""
+
+#: of telebot.types.UserChatBoosts:9
+msgid ":class:`UserChatBoosts`"
+msgstr ""
+
+#: of telebot.types.UserProfilePhotos:1
+msgid "This object represent a user's profile pictures."
+msgstr ""
+
+#: of telebot.types.UserProfilePhotos:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#userprofilephotos"
+msgstr ""
+
+#: of telebot.types.UserProfilePhotos:5
+msgid "Total number of profile pictures the target user has"
+msgstr ""
+
+#: of telebot.types.UserProfilePhotos:8
+msgid "Requested profile pictures (in up to 4 sizes each)"
+msgstr ""
+
+#: of telebot.types.UserProfilePhotos:12
+msgid ":class:`telebot.types.UserProfilePhotos`"
+msgstr ""
+
+#: of telebot.types.UsersShared:1
+msgid ""
+"This object contains information about the users whose identifiers were "
+"shared with the bot using a KeyboardButtonRequestUsers button."
+msgstr ""
+
+#: of telebot.types.UsersShared:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#usersshared"
+msgstr ""
+
+#: of telebot.types.UsersShared:6
+msgid "Identifier of the request"
+msgstr ""
+
+#: of telebot.types.UsersShared:9
+msgid ""
+"Identifiers of the shared users. These numbers may have more than 32 "
+"significant bits and some programming languages may have "
+"difficulty/silent defects in interpreting them. But they have at most 52 "
+"significant bits, so 64-bit integers or double-precision float types are "
+"safe for storing these identifiers. The bot may not have access to the "
+"users and could be unable to use these identifiers unless the users are "
+"already known to the bot by some other means."
+msgstr ""
+
+#: of telebot.types.UsersShared:18
+msgid ":class:`UsersShared`"
+msgstr ""
+
+#: of telebot.types.Venue:1
+msgid "This object represents a venue."
+msgstr ""
+
+#: of telebot.types.Venue:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#venue"
+msgstr ""
+
+#: of telebot.types.Venue:5
+msgid "Venue location. Can't be a live location"
+msgstr ""
+
+#: of telebot.types.Venue:14
+msgid "Optional. Foursquare identifier of the venue"
+msgstr ""
+
+#: of telebot.types.Venue:17
+msgid ""
+"Optional. Foursquare type of the venue. (For example, "
+"“arts_entertainment/default”, “arts_entertainment/aquarium” or "
+"“food/icecream”.)"
+msgstr ""
+
+#: of telebot.types.Venue:28
+msgid ":class:`telebot.types.Venue`"
+msgstr ""
+
+#: of telebot.types.Video:1
+msgid "This object represents a video file."
+msgstr ""
+
+#: of telebot.types.Video:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#video"
+msgstr ""
+
+#: of telebot.types.Video:21 telebot.types.VideoNote:18
+msgid "Optional. Video thumbnail"
+msgstr ""
+
+#: of telebot.types.Video:36
+msgid ":class:`telebot.types.Video`"
+msgstr ""
+
+#: of telebot.types.VideoChatEnded:1
+msgid ""
+"This object represents a service message about a video chat ended in the "
+"chat."
+msgstr ""
+
+#: of telebot.types.VideoChatEnded:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#videochatended"
+msgstr ""
+
+#: of telebot.types.VideoChatEnded:5
+msgid "Video chat duration in seconds"
+msgstr ""
+
+#: of telebot.types.VideoChatEnded:9
+msgid ":class:`telebot.types.VideoChatEnded`"
+msgstr ""
+
+#: of telebot.types.VideoChatParticipantsInvited:1
+msgid ""
+"This object represents a service message about new members invited to a "
+"video chat."
+msgstr ""
+
+#: of telebot.types.VideoChatParticipantsInvited:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#videochatparticipantsinvited"
+msgstr ""
+
+#: of telebot.types.VideoChatParticipantsInvited:5
+msgid "New members that were invited to the video chat"
+msgstr ""
+
+#: of telebot.types.VideoChatParticipantsInvited:9
+msgid ":class:`telebot.types.VideoChatParticipantsInvited`"
+msgstr ""
+
+#: of telebot.types.VideoChatScheduled:1
+msgid ""
+"This object represents a service message about a video chat scheduled in "
+"the chat."
+msgstr ""
+
+#: of telebot.types.VideoChatScheduled:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#videochatscheduled"
+msgstr ""
+
+#: of telebot.types.VideoChatScheduled:5
+msgid ""
+"Point in time (Unix timestamp) when the video chat is supposed to be "
+"started by a chat administrator"
+msgstr ""
+
+#: of telebot.types.VideoChatScheduled:10
+msgid ":class:`telebot.types.VideoChatScheduled`"
+msgstr ""
+
+#: of telebot.types.VideoChatStarted:1
+msgid ""
+"This object represents a service message about a video chat started in "
+"the chat. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.VideoNote:1
+msgid ""
+"This object represents a video message (available in Telegram apps as of "
+"v.4.0)."
+msgstr ""
+
+#: of telebot.types.VideoNote:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#videonote"
+msgstr ""
+
+#: of telebot.types.VideoNote:12
+msgid ""
+"Video width and height (diameter of the video message) as defined by "
+"sender"
+msgstr ""
+
+#: of telebot.types.VideoNote:25
+msgid ":class:`telebot.types.VideoNote`"
+msgstr ""
+
+#: of telebot.types.Voice:1
+msgid "This object represents a voice note."
+msgstr ""
+
+#: of telebot.types.Voice:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#voice"
+msgstr ""
+
+#: of telebot.types.Voice:24
+msgid ":class:`telebot.types.Voice`"
+msgstr ""
+
+#: of telebot.types.VoiceChatEnded:1
+msgid "Bases: :py:class:`telebot.types.VideoChatEnded`"
+msgstr ""
+
+#: of telebot.types.VoiceChatEnded:1
+msgid "Deprecated, use :class:`VideoChatEnded` instead."
+msgstr ""
+
+#: of telebot.types.VoiceChatParticipantsInvited:1
+msgid "Bases: :py:class:`telebot.types.VideoChatParticipantsInvited`"
+msgstr ""
+
+#: of telebot.types.VoiceChatParticipantsInvited:1
+msgid "Deprecated, use :class:`VideoChatParticipantsInvited` instead."
+msgstr ""
+
+#: of telebot.types.VoiceChatScheduled:1
+msgid "Bases: :py:class:`telebot.types.VideoChatScheduled`"
+msgstr ""
+
+#: of telebot.types.VoiceChatScheduled:1
+msgid "Deprecated, use :class:`VideoChatScheduled` instead."
+msgstr ""
+
+#: of telebot.types.VoiceChatStarted:1
+msgid "Bases: :py:class:`telebot.types.VideoChatStarted`"
+msgstr ""
+
+#: of telebot.types.VoiceChatStarted:1
+msgid "Deprecated, use :class:`VideoChatStarted` instead."
+msgstr ""
+
+#: of telebot.types.WebAppData:1
+msgid "Describes data sent from a Web App to the bot."
+msgstr ""
+
+#: of telebot.types.WebAppData:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#webappdata"
+msgstr ""
+
+#: of telebot.types.WebAppData:5
+msgid ""
+"The data. Be aware that a bad client can send arbitrary data in this "
+"field."
+msgstr ""
+
+#: of telebot.types.WebAppData:8
+msgid ""
+"Text of the web_app keyboard button from which the Web App was opened. Be"
+" aware that a bad client can send arbitrary data in this field."
+msgstr ""
+
+#: of telebot.types.WebAppData:13
+msgid ":class:`telebot.types.WebAppData`"
+msgstr ""
+
+#: of telebot.types.WebAppInfo:1
+msgid "Describes a Web App."
+msgstr ""
+
+#: of telebot.types.WebAppInfo:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#webappinfo"
+msgstr ""
+
+#: of telebot.types.WebAppInfo:5
+msgid ""
+"An HTTPS URL of a Web App to be opened with additional data as specified "
+"in Initializing Web Apps"
+msgstr ""
+
+#: of telebot.types.WebAppInfo:9
+msgid ":class:`telebot.types.WebAppInfo`"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:1
+msgid "Describes the current status of a webhook."
+msgstr ""
+
+#: of telebot.types.WebhookInfo:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#webhookinfo"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:5
+msgid "Webhook URL, may be empty if webhook is not set up"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:8
+msgid "True, if a custom certificate was provided for webhook certificate checks"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:11
+msgid "Number of updates awaiting delivery"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:14
+msgid "Optional. Currently used webhook IP address"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:17
+msgid ""
+"Optional. Unix time for the most recent error that happened when trying "
+"to deliver an update via webhook"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:21
+msgid ""
+"Optional. Error message in human-readable format for the most recent "
+"error that happened when trying to deliver an update via webhook"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:25
+msgid ""
+"Optional. Unix time of the most recent error that happened when trying to"
+" synchronize available updates with Telegram datacenters"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:29
+msgid ""
+"Optional. The maximum allowed number of simultaneous HTTPS connections to"
+" the webhook for update delivery"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:33
+msgid ""
+"Optional. A list of update types the bot is subscribed to. Defaults to "
+"all update types except chat_member"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:38
+msgid ":class:`telebot.types.WebhookInfo`"
+msgstr ""
+
+#: of telebot.types.WriteAccessAllowed:1
+msgid ""
+"This object represents a service message about a user allowing a bot to "
+"write messages after adding it to the attachment menu, launching a Web "
+"App from a link, or accepting an explicit request from a Web App sent by "
+"the method requestWriteAccess."
+msgstr ""
+
+#: of telebot.types.WriteAccessAllowed:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#writeaccessallowed"
+msgstr ""
+
+#: of telebot.types.WriteAccessAllowed:7
+msgid ""
+"Optional. True, if the access was granted after the user accepted an "
+"explicit request from a Web App sent by the method requestWriteAccess"
+msgstr ""
+
+#: of telebot.types.WriteAccessAllowed:11
+msgid "Optional. Name of the Web App which was launched from a link"
+msgstr ""
+
+#: of telebot.types.WriteAccessAllowed:14
+msgid ""
+"Optional. True, if the access was granted when the bot was added to the "
+"attachment or side menu"
+msgstr ""
+
+#~ msgid "Type of the result, must be animation"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "True, if the user is allowed to"
+#~ " send audios, documents, photos, videos,"
+#~ " video notes and voice notes"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. True, if the user is "
+#~ "allowed to send audios, documents, "
+#~ "photos, videos, video notes and voice"
+#~ " notes, implies can_send_messages"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. True, if the user is "
+#~ "allowed to send animations, games, "
+#~ "stickers and use inline bots, implies"
+#~ " can_send_media_messages"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. True, if the user is "
+#~ "allowed to add web page previews "
+#~ "to their messages, implies "
+#~ "can_send_media_messages"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. Message with the callback "
+#~ "button that originated the query. Note"
+#~ " that message content and message "
+#~ "date will not be available if the"
+#~ " message is too old"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "deprecated. True, if the user is "
+#~ "allowed to send audios, documents, "
+#~ "photos, videos, video notes and voice"
+#~ " notes"
+#~ msgstr ""
+
+#~ msgid "Optional. Disables link previews for links in the sent message"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. If specified, pressing the "
+#~ "button will open a list of "
+#~ "suitable users. Tapping on any user "
+#~ "will send their identifier to the "
+#~ "bot in a “user_shared” service message."
+#~ " Available in private chats only."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Telegram documentation: "
+#~ "https://core.telegram.org/bots/api#keyboardbuttonrequestuser"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Signed 32-bit identifier of the request,"
+#~ " which will be received back in "
+#~ "the UserShared object. Must be unique"
+#~ " within the message"
+#~ msgstr ""
+
+#~ msgid ":class:`telebot.types.KeyboardButtonRequestUser`"
+#~ msgstr ""
+
+#~ msgid "Optional. For forwarded messages, sender of the original message"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. For messages forwarded from "
+#~ "channels or from anonymous administrators, "
+#~ "information about the original sender "
+#~ "chat"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. For messages forwarded from "
+#~ "channels, identifier of the original "
+#~ "message in the channel"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. For forwarded messages that "
+#~ "were originally sent in channels or "
+#~ "by an anonymous chat administrator, "
+#~ "signature of the message sender if "
+#~ "present"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. Sender's name for messages "
+#~ "forwarded from users who disallow adding"
+#~ " a link to their account in "
+#~ "forwarded messages"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. For forwarded messages, date "
+#~ "the original message was sent in "
+#~ "Unix time"
+#~ msgstr ""
+
+#~ msgid "The user, who changed the answer to the poll"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "True, if the sticker set contains "
+#~ "masks. Deprecated since Bot API 6.2, "
+#~ "use sticker_type instead."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "This object contains information about "
+#~ "the user whose identifier was shared "
+#~ "with the bot using a "
+#~ "`telebot.types.KeyboardButtonRequestUser` button."
+#~ msgstr ""
+
+#~ msgid "Telegram documentation: https://core.telegram.org/bots/api#usershared"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Identifier of the shared user. This "
+#~ "number may have more than 32 "
+#~ "significant bits and some programming "
+#~ "languages may have difficulty/silent defects"
+#~ " in interpreting it. But it has "
+#~ "at most 52 significant bits, so a"
+#~ " 64-bit integer or double-precision "
+#~ "float type are safe for storing "
+#~ "this identifier. The bot may not "
+#~ "have access to the user and could"
+#~ " be unable to use this identifier,"
+#~ " unless the user is already known "
+#~ "to the bot by some other means."
+#~ msgstr ""
+
+#~ msgid ":class:`telebot.types.UserShared`"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "This object represents a service message"
+#~ " about a user allowed to post "
+#~ "messages in the chat. Currently holds"
+#~ " no information."
+#~ msgstr ""
+
diff --git a/docs/source/locales/en/LC_MESSAGES/util.po b/docs/source/locales/en/LC_MESSAGES/util.po
new file mode 100644
index 000000000..0d5f4b500
--- /dev/null
+++ b/docs/source/locales/en/LC_MESSAGES/util.po
@@ -0,0 +1,355 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2023-07-08 23:07+0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../source/util.rst:3
+msgid "Utils"
+msgstr ""
+
+#: ../../source/util.rst:5
+msgid "Utils in pyTelegramBotAPI"
+msgstr ""
+
+#: ../../source/util.rst:5
+msgid "ptba, pytba, pyTelegramBotAPI, utils, guide"
+msgstr ""
+
+#: ../../source/util.rst:11
+msgid "util file"
+msgstr ""
+
+#: of telebot.util.antiflood:1
+msgid ""
+"Use this function inside loops in order to avoid getting TooManyRequests "
+"error. Example:"
+msgstr ""
+
+#: of telebot.service_utils.is_bytes telebot.service_utils.is_dict
+#: telebot.service_utils.is_pil_image telebot.util.antiflood
+#: telebot.util.escape telebot.util.extract_arguments
+#: telebot.util.extract_command telebot.util.is_command
+#: telebot.util.parse_web_app_data telebot.util.quick_markup
+#: telebot.util.smart_split telebot.util.split_string telebot.util.user_link
+#: telebot.util.validate_web_app_data telebot.util.webhook_google_functions
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.util.antiflood:10
+msgid "The function to call"
+msgstr ""
+
+#: of telebot.util.antiflood:13
+msgid "Number of retries to send"
+msgstr ""
+
+#: of telebot.util.antiflood:16
+msgid "The arguments to pass to the function"
+msgstr ""
+
+#: of telebot.util.antiflood:19
+msgid "The keyword arguments to pass to the function"
+msgstr ""
+
+#: of telebot.service_utils.generate_random_token
+#: telebot.service_utils.is_bytes telebot.service_utils.is_dict
+#: telebot.service_utils.is_pil_image telebot.util.antiflood
+#: telebot.util.escape telebot.util.extract_arguments
+#: telebot.util.extract_command telebot.util.is_command
+#: telebot.util.parse_web_app_data telebot.util.quick_markup
+#: telebot.util.smart_split telebot.util.split_string telebot.util.user_link
+#: telebot.util.validate_web_app_data telebot.util.webhook_google_functions
+msgid "Returns"
+msgstr ""
+
+#: of telebot.util.antiflood:22
+msgid "None"
+msgstr ""
+
+#: of telebot.service_utils.chunks:1
+msgid "Yield successive n-sized chunks from lst."
+msgstr ""
+
+#: ../../docstring of telebot.util.content_type_media:1
+msgid "Contains all media content types."
+msgstr ""
+
+#: ../../docstring of telebot.util.content_type_service:1
+msgid "Contains all service content types such as `User joined the group`."
+msgstr ""
+
+#: of telebot.util.escape:1
+msgid ""
+"Replaces the following chars in `text` ('&' with '&', '<' with '<'"
+" and '>' with '>')."
+msgstr ""
+
+#: of telebot.util.escape:3
+msgid "the text to escape"
+msgstr ""
+
+#: of telebot.util.escape:4
+msgid "the escaped text"
+msgstr ""
+
+#: of telebot.util.extract_arguments:1
+msgid "Returns the argument after the command."
+msgstr ""
+
+#: of telebot.util.extract_arguments:3 telebot.util.extract_command:4
+msgid "Examples:"
+msgstr ""
+
+#: of telebot.util.extract_arguments:10
+msgid "String to extract the arguments from a command"
+msgstr ""
+
+#: of telebot.util.extract_arguments:13
+msgid "the arguments if `text` is a command (according to is_command), else None."
+msgstr ""
+
+#: of telebot.service_utils.generate_random_token
+#: telebot.service_utils.is_bytes telebot.service_utils.is_dict
+#: telebot.service_utils.is_pil_image telebot.util.extract_arguments
+#: telebot.util.extract_command telebot.util.is_command
+#: telebot.util.quick_markup telebot.util.smart_split telebot.util.split_string
+#: telebot.util.user_link
+msgid "Return type"
+msgstr ""
+
+#: of telebot.util.extract_arguments:14 telebot.util.extract_command:16
+msgid ":obj:`str` or :obj:`None`"
+msgstr ""
+
+#: of telebot.util.extract_command:1
+msgid ""
+"Extracts the command from `text` (minus the '/') if `text` is a command "
+"(see is_command). If `text` is not a command, this function returns None."
+msgstr ""
+
+#: of telebot.util.extract_command:12
+msgid "String to extract the command from"
+msgstr ""
+
+#: of telebot.util.extract_command:15
+msgid "the command if `text` is a command (according to is_command), else None."
+msgstr ""
+
+#: of telebot.service_utils.generate_random_token:1
+msgid ""
+"Generates a random token consisting of letters and digits, 16 characters "
+"long."
+msgstr ""
+
+#: of telebot.service_utils.generate_random_token:3
+msgid "a random token"
+msgstr ""
+
+#: of telebot.service_utils.generate_random_token:4 telebot.util.user_link:22
+msgid ":obj:`str`"
+msgstr ""
+
+#: of telebot.service_utils.is_bytes:1
+msgid "Returns True if the given object is a bytes object."
+msgstr ""
+
+#: of telebot.service_utils.is_bytes:3 telebot.service_utils.is_dict:3
+#: telebot.service_utils.is_pil_image:3
+msgid "object to be checked"
+msgstr ""
+
+#: of telebot.service_utils.is_bytes:6
+msgid "True if the given object is a bytes object."
+msgstr ""
+
+#: of telebot.service_utils.is_bytes:7 telebot.service_utils.is_dict:7
+#: telebot.service_utils.is_pil_image:7 telebot.util.is_command:7
+msgid ":obj:`bool`"
+msgstr ""
+
+#: of telebot.util.is_command:1
+msgid ""
+"Checks if `text` is a command. Telegram chat commands start with the '/' "
+"character."
+msgstr ""
+
+#: of telebot.util.is_command:3
+msgid "Text to check."
+msgstr ""
+
+#: of telebot.util.is_command:6
+msgid "True if `text` is a command, else False."
+msgstr ""
+
+#: of telebot.service_utils.is_dict:1
+msgid "Returns True if the given object is a dictionary."
+msgstr ""
+
+#: of telebot.service_utils.is_dict:6
+msgid "True if the given object is a dictionary."
+msgstr ""
+
+#: of telebot.service_utils.is_pil_image:1
+msgid "Returns True if the given object is a PIL.Image.Image object."
+msgstr ""
+
+#: of telebot.service_utils.is_pil_image:6
+msgid "True if the given object is a PIL.Image.Image object."
+msgstr ""
+
+#: of telebot.service_utils.is_string:1
+msgid "Returns True if the given object is a string."
+msgstr ""
+
+#: of telebot.util.parse_web_app_data:1
+msgid "Parses web app data."
+msgstr ""
+
+#: of telebot.util.parse_web_app_data:3 telebot.util.validate_web_app_data:3
+msgid "The bot token"
+msgstr ""
+
+#: of telebot.util.parse_web_app_data:6 telebot.util.validate_web_app_data:6
+msgid "The raw init data"
+msgstr ""
+
+#: of telebot.util.parse_web_app_data:9 telebot.util.validate_web_app_data:9
+msgid "The parsed init data"
+msgstr ""
+
+#: of telebot.util.quick_markup:1
+msgid ""
+"Returns a reply markup from a dict in this format: {'text': kwargs} This "
+"is useful to avoid always typing 'btn1 = InlineKeyboardButton(...)' 'btn2"
+" = InlineKeyboardButton(...)'"
+msgstr ""
+
+#: of telebot.util.quick_markup:4 telebot.util.user_link:5
+msgid "Example:"
+msgstr ""
+
+#: of telebot.util.quick_markup:6
+msgid "Using quick_markup:"
+msgstr ""
+
+#: of telebot.util.quick_markup:31
+msgid ""
+"a dict containing all buttons to create in this format: {text: kwargs} "
+"{str:}"
+msgstr ""
+
+#: of telebot.util.quick_markup:34
+msgid "number of :class:`telebot.types.InlineKeyboardButton` objects on each row"
+msgstr ""
+
+#: of telebot.util.quick_markup:37
+msgid "InlineKeyboardMarkup"
+msgstr ""
+
+#: of telebot.util.quick_markup:38
+msgid ":obj:`types.InlineKeyboardMarkup`"
+msgstr ""
+
+#: of telebot.util.smart_split:1
+msgid ""
+"Splits one string into multiple strings, with a maximum amount of "
+"`chars_per_string` characters per string. This is very useful for "
+"splitting one giant message into multiples. If `chars_per_string` > 4096:"
+" `chars_per_string` = 4096. Splits by '\\n', '. ' or ' ' in exactly this "
+"priority."
+msgstr ""
+
+#: of telebot.util.smart_split:6 telebot.util.split_string:4
+msgid "The text to split"
+msgstr ""
+
+#: of telebot.util.smart_split:9
+msgid "The number of maximum characters per part the text is split to."
+msgstr ""
+
+#: of telebot.util.smart_split:12 telebot.util.split_string:10
+msgid "The splitted text as a list of strings."
+msgstr ""
+
+#: of telebot.util.smart_split:13 telebot.util.split_string:11
+msgid ":obj:`list` of :obj:`str`"
+msgstr ""
+
+#: of telebot.util.split_string:1
+msgid ""
+"Splits one string into multiple strings, with a maximum amount of "
+"`chars_per_string` characters per string. This is very useful for "
+"splitting one giant message into multiples."
+msgstr ""
+
+#: of telebot.util.split_string:7
+msgid "The number of characters per line the text is split into."
+msgstr ""
+
+#: ../../docstring of telebot.util.update_types:1
+msgid "All update types, should be used for allowed_updates parameter in polling."
+msgstr ""
+
+#: of telebot.util.user_link:1
+msgid ""
+"Returns an HTML user link. This is useful for reports. Attention: Don't "
+"forget to set parse_mode to 'HTML'!"
+msgstr ""
+
+#: of telebot.util.user_link:11
+msgid ""
+"You can use formatting.* for all other formatting options(bold, italic, "
+"links, and etc.) This method is kept for backward compatibility, and it "
+"is recommended to use formatting.* for more options."
+msgstr ""
+
+#: of telebot.util.user_link:15
+msgid "the user (not the user_id)"
+msgstr ""
+
+#: of telebot.util.user_link:18
+msgid "include the user_id"
+msgstr ""
+
+#: of telebot.util.user_link:21
+msgid "HTML user link"
+msgstr ""
+
+#: of telebot.util.validate_web_app_data:1
+msgid "Validates web app data."
+msgstr ""
+
+#: of telebot.util.webhook_google_functions:1
+msgid "A webhook endpoint for Google Cloud Functions FaaS."
+msgstr ""
+
+#: of telebot.util.webhook_google_functions:3
+msgid "The bot instance"
+msgstr ""
+
+#: of telebot.util.webhook_google_functions:6
+msgid "The request object"
+msgstr ""
+
+#: of telebot.util.webhook_google_functions:9
+msgid "The response object"
+msgstr ""
+
+#~ msgid "int row width"
+#~ msgstr ""
+
diff --git a/docs/source/locales/ru/LC_MESSAGES/async_version.po b/docs/source/locales/ru/LC_MESSAGES/async_version.po
new file mode 100644
index 000000000..e4547a9be
--- /dev/null
+++ b/docs/source/locales/ru/LC_MESSAGES/async_version.po
@@ -0,0 +1,6641 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-01-06 13:19+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../source/async_version/index.rst:3
+msgid "AsyncTeleBot"
+msgstr ""
+
+#: ../../source/async_version/index.rst:6
+msgid "Asynchronous pyTelegramBotAPI"
+msgstr "Асинхронный pyTelegramBotAPI"
+
+#: ../../source/async_version/index.rst:6
+msgid "ptba, pytba, pyTelegramBotAPI, asynctelebot, documentation"
+msgstr "ptba, pytba, pyTelegramBotAPI, asynctelebot, документация"
+
+#: ../../source/async_version/index.rst:12
+msgid "AsyncTeleBot methods"
+msgstr "Методы класса AsyncTeleBot"
+
+#: of telebot.async_telebot.AsyncTeleBot:1
+#: telebot.async_telebot.ExceptionHandler:1 telebot.async_telebot.Handler:1
+#: telebot.asyncio_filters.TextFilter:1
+#: telebot.asyncio_handler_backends.BaseMiddleware:1
+#: telebot.asyncio_handler_backends.CancelUpdate:1
+#: telebot.asyncio_handler_backends.ContinueHandling:1
+#: telebot.asyncio_handler_backends.SkipHandler:1
+#: telebot.asyncio_handler_backends.State:1
+#: telebot.asyncio_handler_backends.StatesGroup:1
+#: telebot.ext.aio.webhooks.AsyncWebhookListener:1
+msgid "Bases: :py:class:`object`"
+msgstr "Базовые классы: :py:class:`object`"
+
+#: of telebot.async_telebot.AsyncTeleBot:1
+msgid "This is the main asynchronous class for Bot."
+msgstr "Это основной класс для асинхронного бота."
+
+#: of telebot.async_telebot.AsyncTeleBot:3
+msgid "It allows you to add handlers for different kind of updates."
+msgstr "Позволяет добавить хендлеры для различных апдейтов."
+
+#: of telebot.async_telebot.AsyncTeleBot:5
+msgid "Usage:"
+msgstr "Использование:"
+
+#: of telebot.async_telebot.AsyncTeleBot:7
+msgid "Using asynchronous implementation of TeleBot."
+msgstr "Использование асинхронной реализации TeleBot-а."
+
+#: of telebot.async_telebot.AsyncTeleBot:16
+msgid ""
+"See more examples in examples/ directory: "
+"https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples"
+msgstr ""
+"Больше примеров в папке examples/ : "
+"https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples"
+
+#: of telebot.async_telebot.AsyncTeleBot:21
+msgid "Install coloredlogs module to specify colorful_logs=True"
+msgstr "Установите пакет coloredlogs для использования colorful_los=True"
+
+#: of telebot.async_telebot.AsyncTeleBot
+#: telebot.async_telebot.AsyncTeleBot.add_custom_filter
+#: telebot.async_telebot.AsyncTeleBot.add_data
+#: telebot.async_telebot.AsyncTeleBot.add_sticker_to_set
+#: telebot.async_telebot.AsyncTeleBot.answer_callback_query
+#: telebot.async_telebot.AsyncTeleBot.answer_inline_query
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query
+#: telebot.async_telebot.AsyncTeleBot.answer_web_app_query
+#: telebot.async_telebot.AsyncTeleBot.approve_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.callback_query_handler
+#: telebot.async_telebot.AsyncTeleBot.channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_join_request_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.chosen_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.close_general_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.copy_message
+#: telebot.async_telebot.AsyncTeleBot.copy_messages
+#: telebot.async_telebot.AsyncTeleBot.create_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.create_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.create_invoice_link
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.delete_message
+#: telebot.async_telebot.AsyncTeleBot.delete_messages
+#: telebot.async_telebot.AsyncTeleBot.delete_my_commands
+#: telebot.async_telebot.AsyncTeleBot.delete_state
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_webhook
+#: telebot.async_telebot.AsyncTeleBot.download_file
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.edit_general_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.edit_message_caption
+#: telebot.async_telebot.AsyncTeleBot.edit_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler
+#: telebot.async_telebot.AsyncTeleBot.enable_saving_states
+#: telebot.async_telebot.AsyncTeleBot.export_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.forward_message
+#: telebot.async_telebot.AsyncTeleBot.forward_messages
+#: telebot.async_telebot.AsyncTeleBot.get_chat
+#: telebot.async_telebot.AsyncTeleBot.get_chat_administrators
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member_count
+#: telebot.async_telebot.AsyncTeleBot.get_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers
+#: telebot.async_telebot.AsyncTeleBot.get_file
+#: telebot.async_telebot.AsyncTeleBot.get_file_url
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores
+#: telebot.async_telebot.AsyncTeleBot.get_my_commands
+#: telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.get_my_description
+#: telebot.async_telebot.AsyncTeleBot.get_my_name
+#: telebot.async_telebot.AsyncTeleBot.get_my_short_description
+#: telebot.async_telebot.AsyncTeleBot.get_state
+#: telebot.async_telebot.AsyncTeleBot.get_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.get_updates
+#: telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts
+#: telebot.async_telebot.AsyncTeleBot.get_user_profile_photos
+#: telebot.async_telebot.AsyncTeleBot.get_webhook_info
+#: telebot.async_telebot.AsyncTeleBot.hide_general_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.infinity_polling
+#: telebot.async_telebot.AsyncTeleBot.inline_handler
+#: telebot.async_telebot.AsyncTeleBot.leave_chat
+#: telebot.async_telebot.AsyncTeleBot.message_handler
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_count_handler
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_handler
+#: telebot.async_telebot.AsyncTeleBot.my_chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.poll_answer_handler
+#: telebot.async_telebot.AsyncTeleBot.poll_handler
+#: telebot.async_telebot.AsyncTeleBot.polling
+#: telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler
+#: telebot.async_telebot.AsyncTeleBot.process_new_updates
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member
+#: telebot.async_telebot.AsyncTeleBot.register_callback_query_handler
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler
+#: telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.reopen_general_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.reply_to
+#: telebot.async_telebot.AsyncTeleBot.reset_data
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member
+#: telebot.async_telebot.AsyncTeleBot.retrieve_data
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.run_webhooks
+#: telebot.async_telebot.AsyncTeleBot.send_animation
+#: telebot.async_telebot.AsyncTeleBot.send_audio
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action
+#: telebot.async_telebot.AsyncTeleBot.send_contact
+#: telebot.async_telebot.AsyncTeleBot.send_dice
+#: telebot.async_telebot.AsyncTeleBot.send_document
+#: telebot.async_telebot.AsyncTeleBot.send_game
+#: telebot.async_telebot.AsyncTeleBot.send_invoice
+#: telebot.async_telebot.AsyncTeleBot.send_location
+#: telebot.async_telebot.AsyncTeleBot.send_media_group
+#: telebot.async_telebot.AsyncTeleBot.send_message
+#: telebot.async_telebot.AsyncTeleBot.send_photo
+#: telebot.async_telebot.AsyncTeleBot.send_poll
+#: telebot.async_telebot.AsyncTeleBot.send_sticker
+#: telebot.async_telebot.AsyncTeleBot.send_venue
+#: telebot.async_telebot.AsyncTeleBot.send_video
+#: telebot.async_telebot.AsyncTeleBot.send_video_note
+#: telebot.async_telebot.AsyncTeleBot.send_voice
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description
+#: telebot.async_telebot.AsyncTeleBot.set_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_game_score
+#: telebot.async_telebot.AsyncTeleBot.set_message_reaction
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands
+#: telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.set_my_description
+#: telebot.async_telebot.AsyncTeleBot.set_my_name
+#: telebot.async_telebot.AsyncTeleBot.set_my_short_description
+#: telebot.async_telebot.AsyncTeleBot.set_state
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_keywords
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title
+#: telebot.async_telebot.AsyncTeleBot.set_update_listener
+#: telebot.async_telebot.AsyncTeleBot.set_webhook
+#: telebot.async_telebot.AsyncTeleBot.setup_middleware
+#: telebot.async_telebot.AsyncTeleBot.shipping_query_handler
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.stop_poll
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.unhide_general_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.upload_sticker_file
+#: telebot.asyncio_filters.TextFilter
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot:24
+msgid "Token of a bot, obtained from @BotFather"
+msgstr "Токен бота, нужно получить от @BotFather"
+
+#: of telebot.async_telebot.AsyncTeleBot:27
+msgid "Default parse mode, defaults to None"
+msgstr "Глобальный parse_mode, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot:30
+msgid "Offset used in get_updates, defaults to None"
+msgstr "Смещение, используемое в get_updates, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot:33
+msgid ""
+"Exception handler, which will handle the exception occured, defaults to "
+"None"
+msgstr "Класс для обработки исключений, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot:36
+msgid "Storage for states, defaults to StateMemoryStorage()"
+msgstr "Хранилище состояний (стейтов), по умолчанию StateMemoryStorage()"
+
+#: of telebot.async_telebot.AsyncTeleBot:39
+msgid "Default value for disable_web_page_preview, defaults to None"
+msgstr "Глобальное значение disable_web_page_preview, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot:42
+msgid "Default value for disable_notification, defaults to None"
+msgstr "Глобальное значение disable_notification, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot:45
+msgid "Default value for protect_content, defaults to None"
+msgstr "Глобальное значение protect_content, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot:48
+msgid "Default value for allow_sending_without_reply, defaults to None"
+msgstr "Глобальное значение allow_sending_without_reply, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot:51
+msgid "Outputs colorful logs"
+msgstr "Использовать разноцветные логи"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_custom_filter:1
+msgid "Create custom filter."
+msgstr "Создать кастомный фильтр."
+
+#: of telebot.async_telebot.AsyncTeleBot.add_custom_filter:3
+msgid "Example on checking the text of a message"
+msgstr "Пример проверки текста сообщения"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_custom_filter:12
+msgid "Class with check(message) method."
+msgstr "Класс с методом check(message)"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_custom_filter
+#: telebot.async_telebot.AsyncTeleBot.add_data
+#: telebot.async_telebot.AsyncTeleBot.add_sticker_to_set
+#: telebot.async_telebot.AsyncTeleBot.answer_callback_query
+#: telebot.async_telebot.AsyncTeleBot.answer_inline_query
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query
+#: telebot.async_telebot.AsyncTeleBot.answer_web_app_query
+#: telebot.async_telebot.AsyncTeleBot.approve_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.callback_query_handler
+#: telebot.async_telebot.AsyncTeleBot.channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_join_request_handler
+#: telebot.async_telebot.AsyncTeleBot.chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.chosen_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.close
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.copy_message
+#: telebot.async_telebot.AsyncTeleBot.copy_messages
+#: telebot.async_telebot.AsyncTeleBot.create_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.create_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.create_invoice_link
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.delete_message
+#: telebot.async_telebot.AsyncTeleBot.delete_messages
+#: telebot.async_telebot.AsyncTeleBot.delete_my_commands
+#: telebot.async_telebot.AsyncTeleBot.delete_state
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_webhook
+#: telebot.async_telebot.AsyncTeleBot.download_file
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.edit_message_caption
+#: telebot.async_telebot.AsyncTeleBot.edit_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler
+#: telebot.async_telebot.AsyncTeleBot.export_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.forward_message
+#: telebot.async_telebot.AsyncTeleBot.forward_messages
+#: telebot.async_telebot.AsyncTeleBot.get_chat
+#: telebot.async_telebot.AsyncTeleBot.get_chat_administrators
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member_count
+#: telebot.async_telebot.AsyncTeleBot.get_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers
+#: telebot.async_telebot.AsyncTeleBot.get_file
+#: telebot.async_telebot.AsyncTeleBot.get_file_url
+#: telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores
+#: telebot.async_telebot.AsyncTeleBot.get_my_commands
+#: telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.get_my_description
+#: telebot.async_telebot.AsyncTeleBot.get_my_name
+#: telebot.async_telebot.AsyncTeleBot.get_my_short_description
+#: telebot.async_telebot.AsyncTeleBot.get_state
+#: telebot.async_telebot.AsyncTeleBot.get_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.get_updates
+#: telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts
+#: telebot.async_telebot.AsyncTeleBot.get_user_profile_photos
+#: telebot.async_telebot.AsyncTeleBot.get_webhook_info
+#: telebot.async_telebot.AsyncTeleBot.infinity_polling
+#: telebot.async_telebot.AsyncTeleBot.inline_handler
+#: telebot.async_telebot.AsyncTeleBot.leave_chat
+#: telebot.async_telebot.AsyncTeleBot.log_out
+#: telebot.async_telebot.AsyncTeleBot.message_handler
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_count_handler
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_handler
+#: telebot.async_telebot.AsyncTeleBot.my_chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.poll_answer_handler
+#: telebot.async_telebot.AsyncTeleBot.poll_handler
+#: telebot.async_telebot.AsyncTeleBot.polling
+#: telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler
+#: telebot.async_telebot.AsyncTeleBot.process_new_updates
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member
+#: telebot.async_telebot.AsyncTeleBot.register_callback_query_handler
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler
+#: telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.reply_to
+#: telebot.async_telebot.AsyncTeleBot.reset_data
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member
+#: telebot.async_telebot.AsyncTeleBot.retrieve_data
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.run_webhooks
+#: telebot.async_telebot.AsyncTeleBot.send_animation
+#: telebot.async_telebot.AsyncTeleBot.send_audio
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action
+#: telebot.async_telebot.AsyncTeleBot.send_contact
+#: telebot.async_telebot.AsyncTeleBot.send_dice
+#: telebot.async_telebot.AsyncTeleBot.send_document
+#: telebot.async_telebot.AsyncTeleBot.send_game
+#: telebot.async_telebot.AsyncTeleBot.send_invoice
+#: telebot.async_telebot.AsyncTeleBot.send_location
+#: telebot.async_telebot.AsyncTeleBot.send_media_group
+#: telebot.async_telebot.AsyncTeleBot.send_message
+#: telebot.async_telebot.AsyncTeleBot.send_photo
+#: telebot.async_telebot.AsyncTeleBot.send_poll
+#: telebot.async_telebot.AsyncTeleBot.send_sticker
+#: telebot.async_telebot.AsyncTeleBot.send_venue
+#: telebot.async_telebot.AsyncTeleBot.send_video
+#: telebot.async_telebot.AsyncTeleBot.send_video_note
+#: telebot.async_telebot.AsyncTeleBot.send_voice
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description
+#: telebot.async_telebot.AsyncTeleBot.set_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_game_score
+#: telebot.async_telebot.AsyncTeleBot.set_message_reaction
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands
+#: telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.set_my_description
+#: telebot.async_telebot.AsyncTeleBot.set_my_name
+#: telebot.async_telebot.AsyncTeleBot.set_my_short_description
+#: telebot.async_telebot.AsyncTeleBot.set_state
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_keywords
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title
+#: telebot.async_telebot.AsyncTeleBot.set_update_listener
+#: telebot.async_telebot.AsyncTeleBot.set_webhook
+#: telebot.async_telebot.AsyncTeleBot.setup_middleware
+#: telebot.async_telebot.AsyncTeleBot.shipping_query_handler
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.stop_poll
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.upload_sticker_file
+#: telebot.asyncio_filters.TextFilter
+#: telebot.ext.aio.webhooks.AsyncWebhookListener.run_app
+msgid "Returns"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_custom_filter:15
+#: telebot.async_telebot.AsyncTeleBot.add_data:10
+#: telebot.async_telebot.AsyncTeleBot.callback_query_handler:9
+#: telebot.async_telebot.AsyncTeleBot.channel_post_handler:17
+#: telebot.async_telebot.AsyncTeleBot.chat_boost_handler:8
+#: telebot.async_telebot.AsyncTeleBot.chat_join_request_handler:10
+#: telebot.async_telebot.AsyncTeleBot.chat_member_handler:11
+#: telebot.async_telebot.AsyncTeleBot.chosen_inline_handler:10
+#: telebot.async_telebot.AsyncTeleBot.delete_state:9
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:22
+#: telebot.async_telebot.AsyncTeleBot.infinity_polling:35
+#: telebot.async_telebot.AsyncTeleBot.inline_handler:9
+#: telebot.async_telebot.AsyncTeleBot.my_chat_member_handler:10
+#: telebot.async_telebot.AsyncTeleBot.poll_answer_handler:10
+#: telebot.async_telebot.AsyncTeleBot.poll_handler:8
+#: telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler:9
+#: telebot.async_telebot.AsyncTeleBot.process_new_updates:8
+#: telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:23
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:13
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:26
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:26
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:13
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:14
+#: telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler:8
+#: telebot.async_telebot.AsyncTeleBot.reset_data:9
+#: telebot.async_telebot.AsyncTeleBot.set_state:18
+#: telebot.async_telebot.AsyncTeleBot.set_update_listener:15
+#: telebot.async_telebot.AsyncTeleBot.setup_middleware:10
+#: telebot.async_telebot.AsyncTeleBot.shipping_query_handler:9
+#: telebot.asyncio_filters.TextFilter:22
+#: telebot.ext.aio.webhooks.AsyncWebhookListener.run_app:4
+msgid "None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_data:1
+msgid "Add data to states."
+msgstr "Добавить данные в состояние (стейт)."
+
+#: of telebot.async_telebot.AsyncTeleBot.add_data:3
+#: telebot.async_telebot.AsyncTeleBot.delete_state:3
+#: telebot.async_telebot.AsyncTeleBot.get_state:4
+#: telebot.async_telebot.AsyncTeleBot.reset_data:3
+#: telebot.async_telebot.AsyncTeleBot.set_state:9
+msgid "User's identifier"
+msgstr "id пользователя"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_data:6
+#: telebot.async_telebot.AsyncTeleBot.delete_state:6
+#: telebot.async_telebot.AsyncTeleBot.get_state:7
+#: telebot.async_telebot.AsyncTeleBot.reset_data:6
+#: telebot.async_telebot.AsyncTeleBot.set_state:15
+msgid "Chat's identifier"
+msgstr "id чата"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_data:9
+msgid "Data to add"
+msgstr "Данные для добавления"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:1
+msgid ""
+"Use this method to add a new sticker to a set created by the bot. The "
+"format of the added sticker must match the format of the other stickers "
+"in the set. Emoji sticker sets can have up to 200 stickers. Animated and "
+"video sticker sets can have up to 50 stickers. Static sticker sets can "
+"have up to 120 stickers. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:8
+msgid ""
+"**_sticker, mask_position, emojis parameters are deprecated, use stickers"
+" instead"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:10
+msgid "Telegram documentation: https://core.telegram.org/bots/api#addstickertoset"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#addstickertoset"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:12
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:10
+msgid "User identifier of created sticker set owner"
+msgstr "id пользователя, создавшего стикерпак"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:15
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set:3
+#: telebot.async_telebot.AsyncTeleBot.get_sticker_set:5
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail:4
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list:4
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:6
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title:4
+msgid "Sticker set name"
+msgstr "Имя стикерпака"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:18
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:21
+msgid "One or more emoji corresponding to the sticker"
+msgstr "Один или несколько эмодзи, относящихся к стикеру"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:21
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:24
+msgid ""
+"PNG image with the sticker, must be up to 512 kilobytes in size, "
+"dimensions must not exceed 512px, and either width or height must be "
+"exactly 512px. Pass a file_id as a String to send a file that already "
+"exists on the Telegram servers, pass an HTTP URL as a String for Telegram"
+" to get a file from the Internet, or upload a new one using multipart"
+"/form-data."
+msgstr ""
+"Изображение стикера в формате PNG, весом не более 512 килобайт, размеры "
+"не должны превышать 512px, либо ширина, либо высота должны быть ровно "
+"512px. Передайте file_id в формате str, чтобы отправить уже загруженный "
+"на сервера Telegram файл, передайте HTTP URL в формате str, чтобы "
+"Telegram скачал файл из интернета, или загрузите новый файл с помощью "
+"multipart/form-data."
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:26
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:29
+msgid "TGS animation with the sticker, uploaded using multipart/form-data."
+msgstr ""
+"Анимированный стикер в формате TGS, загруженный с помощью multipart/form-"
+"data."
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:29
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:32
+msgid "WebM animation with the sticker, uploaded using multipart/form-data."
+msgstr ""
+"Анимированный стикер в формате WebM, загруженный с помощью multipart"
+"/form-data."
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:32
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:42
+msgid ""
+"A JSON-serialized object for position where the mask should be placed on "
+"faces"
+msgstr "Позиция для размещения маски на лицах в формате JSON"
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:35
+msgid ""
+"A JSON-serialized list of 1-50 initial stickers to be added to the "
+"sticker set"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:38
+#: telebot.async_telebot.AsyncTeleBot.answer_callback_query:22
+#: telebot.async_telebot.AsyncTeleBot.answer_inline_query:38
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:21
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query:18
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic:13
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:56
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic:13
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set:6
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic:22
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:13
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_keywords:11
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:11
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:15
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:13
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages:11
+msgid "On success, True is returned."
+msgstr "В случае успеха возвращается True."
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set
+#: telebot.async_telebot.AsyncTeleBot.answer_callback_query
+#: telebot.async_telebot.AsyncTeleBot.answer_inline_query
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query
+#: telebot.async_telebot.AsyncTeleBot.answer_web_app_query
+#: telebot.async_telebot.AsyncTeleBot.approve_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.copy_message
+#: telebot.async_telebot.AsyncTeleBot.copy_messages
+#: telebot.async_telebot.AsyncTeleBot.create_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.create_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.create_invoice_link
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.delete_message
+#: telebot.async_telebot.AsyncTeleBot.delete_my_commands
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.delete_webhook
+#: telebot.async_telebot.AsyncTeleBot.download_file
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.edit_message_caption
+#: telebot.async_telebot.AsyncTeleBot.edit_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text
+#: telebot.async_telebot.AsyncTeleBot.export_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.forward_message
+#: telebot.async_telebot.AsyncTeleBot.forward_messages
+#: telebot.async_telebot.AsyncTeleBot.get_chat
+#: telebot.async_telebot.AsyncTeleBot.get_chat_administrators
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member_count
+#: telebot.async_telebot.AsyncTeleBot.get_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers
+#: telebot.async_telebot.AsyncTeleBot.get_file_url
+#: telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores
+#: telebot.async_telebot.AsyncTeleBot.get_my_commands
+#: telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.get_state
+#: telebot.async_telebot.AsyncTeleBot.get_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.get_updates
+#: telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts
+#: telebot.async_telebot.AsyncTeleBot.get_user_profile_photos
+#: telebot.async_telebot.AsyncTeleBot.get_webhook_info
+#: telebot.async_telebot.AsyncTeleBot.log_out
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic
+#: telebot.async_telebot.AsyncTeleBot.reply_to
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member
+#: telebot.async_telebot.AsyncTeleBot.retrieve_data
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link
+#: telebot.async_telebot.AsyncTeleBot.send_animation
+#: telebot.async_telebot.AsyncTeleBot.send_audio
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action
+#: telebot.async_telebot.AsyncTeleBot.send_contact
+#: telebot.async_telebot.AsyncTeleBot.send_dice
+#: telebot.async_telebot.AsyncTeleBot.send_document
+#: telebot.async_telebot.AsyncTeleBot.send_game
+#: telebot.async_telebot.AsyncTeleBot.send_invoice
+#: telebot.async_telebot.AsyncTeleBot.send_location
+#: telebot.async_telebot.AsyncTeleBot.send_media_group
+#: telebot.async_telebot.AsyncTeleBot.send_message
+#: telebot.async_telebot.AsyncTeleBot.send_photo
+#: telebot.async_telebot.AsyncTeleBot.send_poll
+#: telebot.async_telebot.AsyncTeleBot.send_sticker
+#: telebot.async_telebot.AsyncTeleBot.send_venue
+#: telebot.async_telebot.AsyncTeleBot.send_video
+#: telebot.async_telebot.AsyncTeleBot.send_video_note
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description
+#: telebot.async_telebot.AsyncTeleBot.set_chat_menu_button
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo
+#: telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_game_score
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands
+#: telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_keywords
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title
+#: telebot.async_telebot.AsyncTeleBot.set_webhook
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location
+#: telebot.async_telebot.AsyncTeleBot.stop_poll
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message
+#: telebot.async_telebot.AsyncTeleBot.upload_sticker_file
+msgid "Return type"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.add_sticker_to_set:39
+#: telebot.async_telebot.AsyncTeleBot.answer_callback_query:23
+#: telebot.async_telebot.AsyncTeleBot.answer_inline_query:39
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:22
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query:19
+#: telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:15
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_member:25
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:17
+#: telebot.async_telebot.AsyncTeleBot.close:9
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic:14
+#: telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:57
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:15
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_photo:13
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set:11
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic:14
+#: telebot.async_telebot.AsyncTeleBot.delete_message:23
+#: telebot.async_telebot.AsyncTeleBot.delete_my_commands:17
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set:7
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set:7
+#: telebot.async_telebot.AsyncTeleBot.delete_webhook:13
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic:23
+#: telebot.async_telebot.AsyncTeleBot.leave_chat:8
+#: telebot.async_telebot.AsyncTeleBot.log_out:11
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message:19
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member:70
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:14
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member:61
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action:26
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:18
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description:14
+#: telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:15
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions:21
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo:16
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title:17
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail:11
+#: telebot.async_telebot.AsyncTeleBot.set_message_reaction:18
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands:18
+#: telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:18
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list:11
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_keywords:12
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position:12
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:12
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:16
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title:11
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member:20
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:15
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages:12
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:14
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages:12
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message:15
+msgid ":obj:`bool`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:1
+msgid ""
+"Use this method to send answers to callback queries sent from inline "
+"keyboards. The answer will be displayed to the user as a notification at "
+"the top of the chat screen or as an alert."
+msgstr ""
+"Используйте этот метод для отправки ответов на callback запросы, "
+"отправленные с помощью inline кнопок. Ответ будет показан пользователю "
+"как уведомление поверх чата или pop-up предупреждение."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answercallbackquery"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#answercallbackquery"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:6
+#: telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:10
+#: telebot.async_telebot.AsyncTeleBot.answer_shipping_query:5
+#: telebot.async_telebot.AsyncTeleBot.answer_web_app_query:8
+msgid "Unique identifier for the query to be answered"
+msgstr "Уникальный id запроса для ответа"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:9
+msgid ""
+"Text of the notification. If not specified, nothing will be shown to the "
+"user, 0-200 characters"
+msgstr ""
+"Текст уведомления. если не задан, то уведомление не будет показано, 0-200"
+" символов"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:12
+msgid ""
+"If True, an alert will be shown by the client instead of a notification "
+"at the top of the chat screen. Defaults to false."
+msgstr ""
+"Если True, вместо уведомления поверх чата будет показано pop-up "
+"предупреждение, по умолчанию False."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:15
+msgid ""
+"URL that will be opened by the user's client. If you have created a Game "
+"and accepted the conditions via @BotFather, specify the URL that opens "
+"your game - note that this will only work if the query comes from a "
+"callback_game button."
+msgstr ""
+"URL, который будет открыт пользовательским клиентом. Если вы создали игру"
+" и приняли условия через @BotFather, задайте URL, открывающий вашу игру -"
+" учитывайте, что это сработает только если запрос был отправлен с помощью"
+" callback_game кнопки."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_callback_query:19
+msgid ""
+"The maximum amount of time in seconds that the result of the callback "
+"query may be cached client-side. Telegram apps will support caching "
+"starting in version 3.14. Defaults to 0."
+msgstr ""
+"Максимальная длительность хранения ответа на callback запрос "
+"пользовательским клиентом в секундах. Приложения Telegram поддерживают "
+"хранение ответов начиная с версии 3.14, по умолчанию 0."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:1
+msgid ""
+"Use this method to send answers to an inline query. On success, True is "
+"returned. No more than 50 results per query are allowed."
+msgstr ""
+"Используйте этот метод для отправки ответов на inline запрос. В случае "
+"успеха возвращается True. Разрешено отправить не более 50 результатов на "
+"один запрос."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answerinlinequery"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#answerinlinequery"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:6
+msgid "Unique identifier for the answered query"
+msgstr "Уникальный id запроса для ответа"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:9
+msgid "Array of results for the inline query"
+msgstr "Массив результатов для ответа на inline запрос"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:12
+msgid ""
+"The maximum amount of time in seconds that the result of the inline query"
+" may be cached on the server."
+msgstr ""
+"Максимальная длительность хранения результатов inline запроса на сервере "
+"в секундах."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:16
+msgid ""
+"Pass True, if results may be cached on the server side only for the user "
+"that sent the query."
+msgstr ""
+"Передайте True, если результаты должны быть сохранены на сервере только "
+"для пользователя, отправившего запрос."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:20
+msgid ""
+"Pass the offset that a client should send in the next query with the same"
+" text to receive more results."
+msgstr ""
+"Передайте смещение, которое клиент должен отправить в следующем запросе с"
+" таким же текстом, чтобы получить новые результаты."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:24
+msgid ""
+"Deep-linking parameter for the /start message sent to the bot when user "
+"presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - "
+"are allowed. Example: An inline bot that sends YouTube videos can ask the"
+" user to connect the bot to their YouTube account to adapt search results"
+" accordingly. To do this, it displays a 'Connect your YouTube account' "
+"button above the results, or even before showing any. The user presses "
+"the button, switches to a private chat with the bot and, in doing so, "
+"passes a start parameter that instructs the bot to return an OAuth link. "
+"Once done, the bot can offer a switch_inline button so that the user can "
+"easily return to the chat where they wanted to use the bot's inline "
+"capabilities."
+msgstr ""
+"Параметр для команды /start, отправляемой боту, когда пользователь "
+"нажимает кнопку переключения. 1-64 символа, разрешены только A-Z, a-z, "
+"0-9, _ и -. Пример: Inline бот, который отправляет видео с YouTube может "
+"попросить пользователя подключить бота к его YouTube аккаунту, чтобы "
+"поиск соответствовал предпочтениям пользователя. Чтобы это сделать, бот "
+"отправляет пользователю кнопку 'Подключить YouTube аккаунт' над "
+"результатами, или даже до их показа. Пользователь нажимает на кнопку, "
+"автоматически переходит в приватный чат с ботом и в это время передаёт "
+"стартовый параметр, по которому бот возвращает ссылку для авторизации "
+"(OAuth). Как только авторизация пройдена, бот может предложить "
+"switch_inline кнопку, чтобы пользователь мог легко вернуться в чат, где "
+"он хотел использовать возможности inline бота."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:32
+msgid ""
+"Parameter for the start message sent to the bot when user presses the "
+"switch button"
+msgstr ""
+"Параметр для передачи боту вместе с сообщением /start, отправленному при "
+"нажатии кнопки переключения"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_inline_query:35
+#, fuzzy
+msgid ""
+"A JSON-serialized object describing a button to be shown above inline "
+"query results"
+msgstr "Объект в формате JSON, описывающий сообщение, которое нужно отправить"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:1
+msgid ""
+"Once the user has confirmed their payment and shipping details, the Bot "
+"API sends the final confirmation in the form of an Update with the field "
+"pre_checkout_query. Use this method to respond to such pre-checkout "
+"queries. On success, True is returned."
+msgstr ""
+"Как только пользователь подтвердил детали оплаты и доставки, Bot API "
+"отправляет финальное подтверждение в виде апдейта с полем "
+"pre_checkout_query. Используйте этот метод для ответа на такие pre-"
+"checkout запросы. В случае успеха возвращается True."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:6
+msgid ""
+"The Bot API must receive an answer within 10 seconds after the pre-"
+"checkout query was sent."
+msgstr ""
+"Bot API должно получить ответ в течение 10 секунд после отправки pre-"
+"checkout запроса."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answerprecheckoutquery"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#answerprecheckoutquery"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:13
+msgid ""
+"Specify True if everything is alright (goods are available, etc.) and the"
+" bot is ready to proceed with the order. Use False if there are any "
+"problems."
+msgstr ""
+"Задайте True если всё правильно (выбранные товары доступны и т.д.) и бот "
+"готов обработать заказ. Задайте False если есть какие-то проблемы."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_pre_checkout_query:16
+msgid ""
+"Required if ok is False. Error message in human readable form that "
+"explains the reason for failure to proceed with the checkout (e.g. "
+"\"Sorry, somebody just bought the last of our amazing black T-shirts "
+"while you were busy filling out your payment details. Please choose a "
+"different color or garment!\"). Telegram will display this message to the"
+" user."
+msgstr ""
+"Обязательный в случае, когда ok - False. Сообщение об ошибке, которое "
+"может прочитать человек, объясняющее причину, по которой бот не может "
+"обработать заказ (например \"Извините, кто-то только что купил последнюю "
+"из наших прекрасных черных футболок с коротким рукавом пока вы заполняли "
+"детали оплаты. Пожалуйста выберите другой цвет или фасон!\"). Telegram "
+"покажет это сообщение пользователю."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_shipping_query:1
+msgid "Asks for an answer to a shipping question."
+msgstr "Запрашивает ответ на вопрос о доставке."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_shipping_query:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answershippingquery"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#answershippingquery"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_shipping_query:8
+msgid ""
+"Specify True if delivery to the specified address is possible and False "
+"if there are any problems (for example, if delivery to the specified "
+"address is not possible)"
+msgstr ""
+"Задайте True если доставка по выбранному адресу возможна и False, если "
+"есть какие-то проблемы (например, доставка по выбранному адресу не "
+"осуществляется)"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_shipping_query:11
+msgid ""
+"Required if ok is True. A JSON-serialized array of available shipping "
+"options."
+msgstr ""
+"Обязательный в случае, когда ok - True. Массив вариантов доставки в "
+"формате JSON."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_shipping_query:14
+msgid ""
+"Required if ok is False. Error message in human readable form that "
+"explains why it is impossible to complete the order (e.g. \"Sorry, "
+"delivery to your desired address is unavailable'). Telegram will display "
+"this message to the user."
+msgstr ""
+"Обязательный в случае, когда ok - False. Сообщение об ошибке, которое "
+"может прочитать человек, объясняющее причину, по которой невозможно "
+"завершить заказ (например \"Извините, доставка по запрошенному адресу "
+"недоступна\"). Telegram покажет это сообщение пользователю."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_web_app_query:1
+msgid ""
+"Use this method to set the result of an interaction with a Web App and "
+"send a corresponding message on behalf of the user to the chat from which"
+" the query originated. On success, a SentWebAppMessage object is "
+"returned."
+msgstr ""
+"Используйте этот метод, чтобы задать результат взаимодействия с Web App и"
+" отправить соответствующее сообщение от лица пользователя в чат, из "
+"которого пришел запрос. В случае успеха возвращается объект "
+"SentWebAppMessage."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_web_app_query:6
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#answerwebappquery"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#answerwebappquery"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_web_app_query:11
+msgid "A JSON-serialized object describing the message to be sent"
+msgstr "Объект в формате JSON, описывающий сообщение, которое нужно отправить"
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_web_app_query:14
+msgid "On success, a SentWebAppMessage object is returned."
+msgstr "В случае успеха возвращается объект SentWebAppMessage."
+
+#: of telebot.async_telebot.AsyncTeleBot.answer_web_app_query:15
+msgid ":class:`telebot.types.SentWebAppMessage`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:1
+msgid ""
+"Use this method to approve a chat join request. The bot must be an "
+"administrator in the chat for this to work and must have the "
+"can_invite_users administrator right. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы одобрить запрос на вступление в чат. Бот "
+"должен быть администратором чата и иметь права администратора "
+"can_invite_users. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#approvechatjoinrequest"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#approvechatjoinrequest"
+
+#: of telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:7
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:7
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set:7
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member:5
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:6
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions:7
+#: telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:7
+msgid ""
+"Unique identifier for the target chat or username of the target "
+"supergroup (in the format @supergroupusername)"
+msgstr ""
+"Уникальный id чата или username супергруппы (в формате "
+"@supergroupusername)"
+
+#: of telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:11
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_member:12
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:11
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member:8
+#: telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:8
+#: telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:6
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member:11
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member:14
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:10
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member:13
+msgid "Unique identifier of the target user"
+msgstr "Уникальный id сделавшего запрос пользователя"
+
+#: of telebot.async_telebot.AsyncTeleBot.approve_chat_join_request:14
+#: telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:16
+#: telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:14
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_photo:12
+#: telebot.async_telebot.AsyncTeleBot.delete_my_commands:16
+#: telebot.async_telebot.AsyncTeleBot.log_out:10
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message:18
+#: telebot.async_telebot.AsyncTeleBot.promote_chat_member:69
+#: telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:17
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description:13
+#: telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:14
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo:15
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title:16
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands:17
+#: telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:17
+#: telebot.async_telebot.AsyncTeleBot.set_my_description:12
+#: telebot.async_telebot.AsyncTeleBot.set_my_name:12
+#: telebot.async_telebot.AsyncTeleBot.set_my_short_description:12
+#: telebot.async_telebot.AsyncTeleBot.set_webhook:46
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:14
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages:11
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message:14
+msgid "True on success."
+msgstr "True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:1
+msgid ""
+"Use this method to ban a user in a group, a supergroup or a channel. In "
+"the case of supergroups and channels, the user will not be able to return"
+" to the chat on their own using invite links, etc., unless unbanned "
+"first. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы заблокировать пользователя в группе, "
+"супергруппе или канале. В случае супергрупп и каналов, пользователь не "
+"сможет вернуться в чат самостоятельно, используя ссылки с приглашением и "
+"т.д., пока не будет разблокирован. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:6
+msgid "Telegram documentation: https://core.telegram.org/bots/api#banchatmember"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#banchatmember"
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:8
+#: telebot.async_telebot.AsyncTeleBot.restrict_chat_member:10
+msgid ""
+"Unique identifier for the target group or username of the target "
+"supergroup or channel (in the format @channelusername)"
+msgstr ""
+"Уникальный id группы или username супергруппы или канала (в формате "
+"@channelusername)"
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:15
+msgid ""
+"Date when the user will be unbanned, unix time. If user is banned for "
+"more than 366 days or less than 30 seconds from the current time they are"
+" considered to be banned forever"
+msgstr ""
+"Дата, когда пользователь будет разблокирован, в формате UNIX time. Если "
+"пользователь заблокирован больше чем на 366 дней или меньше чем на 30 "
+"секунд, то он будет заблокирован до ручной разблокировки"
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:19
+msgid ""
+"Bool: Pass True to delete all messages from the chat for the user that is"
+" being removed. If False, the user will be able to see messages in the "
+"group that were sent before the user was removed. Always True for "
+"supergroups and channels."
+msgstr ""
+"Bool: Передайте True, чтобы удалить все сообщения пользователя из чата. "
+"Если False, пользователю будут доступны все сообщения в группе, "
+"отправленные до его блокировки. Всегда True для супергрупп и каналов."
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_member:24
+#: telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set:10
+#: telebot.async_telebot.AsyncTeleBot.delete_message:22
+#: telebot.async_telebot.AsyncTeleBot.delete_messages:14
+#: telebot.async_telebot.AsyncTeleBot.delete_sticker_set:6
+#: telebot.async_telebot.AsyncTeleBot.delete_webhook:12
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action:25
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail:10
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list:10
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position:11
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_title:10
+msgid "Returns True on success."
+msgstr "Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:1
+msgid ""
+"Use this method to ban a channel chat in a supergroup or a channel. The "
+"owner of the chat will not be able to send messages and join live streams"
+" on behalf of the chat, unless it is unbanned first. The bot must be an "
+"administrator in the supergroup or channel for this to work and must have"
+" the appropriate administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы заблокировать канал в супергруппе или "
+"канале. Владелец канала не сможет отправлять сообщения и участвовать в "
+"прямых эфирах от лица канала, пока канал не будет разблокирован. Бот "
+"должен быть администратором супергруппы или канала и иметь "
+"соответствующие права администратора.Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#banchatsenderchat"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#banchatsenderchat"
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:10
+#: telebot.async_telebot.AsyncTeleBot.close_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.close_general_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.copy_message:5
+#: telebot.async_telebot.AsyncTeleBot.copy_messages:3
+#: telebot.async_telebot.AsyncTeleBot.create_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.delete_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.delete_message:13
+#: telebot.async_telebot.AsyncTeleBot.delete_messages:8
+#: telebot.async_telebot.AsyncTeleBot.edit_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.edit_general_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.edit_message_live_location:13
+#: telebot.async_telebot.AsyncTeleBot.forward_message:8
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:3
+#: telebot.async_telebot.AsyncTeleBot.hide_general_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.pin_chat_message:7
+#: telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.reopen_general_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.send_animation:6
+#: telebot.async_telebot.AsyncTeleBot.send_audio:9
+#: telebot.async_telebot.AsyncTeleBot.send_dice:5
+#: telebot.async_telebot.AsyncTeleBot.send_document:5
+#: telebot.async_telebot.AsyncTeleBot.send_game:5
+#: telebot.async_telebot.AsyncTeleBot.send_location:5
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:6
+#: telebot.async_telebot.AsyncTeleBot.send_message:9
+#: telebot.async_telebot.AsyncTeleBot.send_photo:5
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:6
+#: telebot.async_telebot.AsyncTeleBot.send_video:5
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:6
+#: telebot.async_telebot.AsyncTeleBot.send_voice:7
+#: telebot.async_telebot.AsyncTeleBot.set_chat_description:6
+#: telebot.async_telebot.AsyncTeleBot.set_chat_title:9
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location:6
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:8
+#: telebot.async_telebot.AsyncTeleBot.unhide_general_forum_topic:7
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:7
+#: telebot.async_telebot.AsyncTeleBot.unpin_chat_message:7
+msgid ""
+"Unique identifier for the target chat or username of the target channel "
+"(in the format @channelusername)"
+msgstr "Уникальный id чата или username канала (в формате @channelusername)"
+
+#: of telebot.async_telebot.AsyncTeleBot.ban_chat_sender_chat:13
+msgid "Unique identifier of the target sender chat"
+msgstr "Уникальный id канала для блокировки"
+
+#: of telebot.async_telebot.AsyncTeleBot.callback_query_handler:1
+msgid ""
+"Handles new incoming callback query. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.CallbackQuery` object."
+msgstr ""
+"Обрабатывает новый callback запрос. В качестве параметра передаёт в "
+"декорируемую функцию объект :class:`telebot.types.CallbackQuery`."
+
+#: of telebot.async_telebot.AsyncTeleBot.callback_query_handler:4
+#: telebot.async_telebot.AsyncTeleBot.channel_post_handler:10
+#: telebot.async_telebot.AsyncTeleBot.chat_boost_handler:4
+#: telebot.async_telebot.AsyncTeleBot.chat_join_request_handler:5
+#: telebot.async_telebot.AsyncTeleBot.chat_member_handler:6
+#: telebot.async_telebot.AsyncTeleBot.chosen_inline_handler:5
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:10
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:11
+#: telebot.async_telebot.AsyncTeleBot.inline_handler:4
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_count_handler:4
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_handler:4
+#: telebot.async_telebot.AsyncTeleBot.my_chat_member_handler:5
+#: telebot.async_telebot.AsyncTeleBot.poll_answer_handler:5
+#: telebot.async_telebot.AsyncTeleBot.poll_handler:4
+#: telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler:4
+#: telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:15
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:15
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:15
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:15
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:6
+#: telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler:4
+#: telebot.async_telebot.AsyncTeleBot.shipping_query_handler:4
+msgid "Function executed as a filter"
+msgstr "Функция, используемая в качестве фильтра"
+
+#: of telebot.async_telebot.AsyncTeleBot.callback_query_handler:7
+#: telebot.async_telebot.AsyncTeleBot.channel_post_handler:16
+#: telebot.async_telebot.AsyncTeleBot.chat_boost_handler:7
+#: telebot.async_telebot.AsyncTeleBot.chat_join_request_handler:8
+#: telebot.async_telebot.AsyncTeleBot.chat_member_handler:9
+#: telebot.async_telebot.AsyncTeleBot.chosen_inline_handler:8
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:16
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:20
+#: telebot.async_telebot.AsyncTeleBot.inline_handler:7
+#: telebot.async_telebot.AsyncTeleBot.message_handler:50
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_count_handler:7
+#: telebot.async_telebot.AsyncTeleBot.message_reaction_handler:7
+#: telebot.async_telebot.AsyncTeleBot.my_chat_member_handler:8
+#: telebot.async_telebot.AsyncTeleBot.poll_answer_handler:8
+#: telebot.async_telebot.AsyncTeleBot.poll_handler:7
+#: telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler:7
+#: telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:21
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:11
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:21
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:24
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:24
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:11
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:11
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:12
+#: telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler:7
+#: telebot.async_telebot.AsyncTeleBot.shipping_query_handler:7
+msgid "Optional keyword arguments(custom filters)"
+msgstr "Необязательные именованные аргументы(кастомные фильтры)"
+
+#: of telebot.async_telebot.AsyncTeleBot.channel_post_handler:1
+msgid ""
+"Handles new incoming channel post of any kind - text, photo, sticker, "
+"etc. As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+"Обрабатывает новый пост любого типа в канале - текст, фото, стикер и т.д."
+" В качестве параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.Message`."
+
+#: of telebot.async_telebot.AsyncTeleBot.channel_post_handler:4
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:4
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:5
+#: telebot.async_telebot.AsyncTeleBot.message_handler:34
+msgid "Optional list of strings (commands to handle)."
+msgstr "Необязательный список строк - команд для обработки."
+
+#: of telebot.async_telebot.AsyncTeleBot.channel_post_handler:7
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:7
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:8
+#: telebot.async_telebot.AsyncTeleBot.message_handler:37
+msgid "Optional regular expression."
+msgstr "Необязательное регулярное выражение."
+
+#: of telebot.async_telebot.AsyncTeleBot.channel_post_handler:13
+#: telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:13
+#: telebot.async_telebot.AsyncTeleBot.edited_message_handler:14
+#: telebot.async_telebot.AsyncTeleBot.message_handler:44
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:6
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:6
+msgid "Supported message content types. Must be a list. Defaults to ['text']."
+msgstr "Обрабатываемые виды контента. Обязан быть списком. По умолчанию ['text']"
+
+#: of telebot.async_telebot.AsyncTeleBot.chat_boost_handler:1
+#, fuzzy
+msgid ""
+"Handles new incoming chat boost state. it passes "
+":class:`telebot.types.ChatBoostUpdated` object."
+msgstr ""
+"Обрабатывает новый callback запрос. В качестве параметра передаёт в "
+"декорируемую функцию объект :class:`telebot.types.CallbackQuery`."
+
+#: of telebot.async_telebot.AsyncTeleBot.chat_join_request_handler:1
+msgid ""
+"Handles a request to join the chat has been sent. The bot must have the "
+"can_invite_users administrator right in the chat to receive these "
+"updates. As a parameter to the decorator function, it passes "
+":class:`telebot.types.ChatJoinRequest` object."
+msgstr ""
+"Обрабатывает запрос на вступление в чат. Бот должен иметь права "
+"администратора can_invite_users в чате, чтобы получать такие апдейты. В "
+"качестве параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.ChatJoinRequest`."
+
+#: of telebot.async_telebot.AsyncTeleBot.chat_member_handler:1
+msgid ""
+"Handles update in a status of a user in a chat. The bot must be an "
+"administrator in the chat and must explicitly specify “chat_member” in "
+"the list of allowed_updates to receive these updates. As a parameter to "
+"the decorator function, it passes "
+":class:`telebot.types.ChatMemberUpdated` object."
+msgstr ""
+"Обрабатывает изменение статуса пользователя в чате. Бот должен быть "
+"администратором чата и явно указать “chat_member“ в allowed_updates, "
+"чтобы получать такие апдейты. В качестве параметра передаёт в "
+"декорируемую функцию объект :class:`telebot.types.ChatMemberUpdated`."
+
+#: of telebot.async_telebot.AsyncTeleBot.chosen_inline_handler:1
+msgid ""
+"The result of an inline query that was chosen by a user and sent to their"
+" chat partner. Please see our documentation on the feedback collecting "
+"for details on how to enable these updates for your bot. As a parameter "
+"to the decorator function, it passes "
+":class:`telebot.types.ChosenInlineResult` object."
+msgstr ""
+"Обрабатывает результат inline запроса, который был выбран пользователем и"
+" отправлен собеседнику в чате. Пожалуйста ознакомьтесь с документацией по"
+" сбору фидбека для получения таких апдейтов вашим ботом. В качестве "
+"параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.ChosenInlineResult`."
+
+#: of telebot.async_telebot.AsyncTeleBot.close:1
+msgid ""
+"Use this method to close the bot instance before moving it from one local"
+" server to another. You need to delete the webhook before calling this "
+"method to ensure that the bot isn't launched again after server restart. "
+"The method will return error 429 in the first 10 minutes after the bot is"
+" launched. Returns True on success."
+msgstr ""
+"Используйте этот метод чтобы закрыть инстанс бота прежде чем перемещать "
+"его с одного локального сервера на другой. Вы должны удалить вебхук перед"
+" вызовом этого метода, чтобы убедиться. что бот не будет запущен повторно"
+" после перезапуска сервера. Метод будет возвращать ошибку 429 в течение "
+"10 минут после запуска бота. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.close:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#close"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#close"
+
+#: of telebot.async_telebot.AsyncTeleBot.close_forum_topic:1
+msgid ""
+"Use this method to close an open topic in a forum supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the can_manage_topics administrator rights, unless it is the creator of "
+"the topic. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы закрыть открытый топик в чате супергруппы. "
+"Бот должен быть администратором чата и иметь права администратора "
+"can_manage_topics, за исключением случаев, когда бот является создателем "
+"топика. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.close_forum_topic:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#closeforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#closeforumtopic"
+
+#: of telebot.async_telebot.AsyncTeleBot.close_forum_topic:10
+msgid "Identifier of the topic to close"
+msgstr "id топика для закрытия"
+
+#: of telebot.async_telebot.AsyncTeleBot.close_general_forum_topic:1
+msgid ""
+"Use this method to close the 'General' topic in a forum supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы закрыть открытый топик в чате супергруппы. "
+"Бот должен быть администратором чата и иметь права администратора "
+"can_manage_topics, за исключением случаев, когда бот является создателем "
+"топика. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.close_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#closegeneralforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#closeforumtopic"
+
+#: of telebot.async_telebot.AsyncTeleBot.close_session:1
+msgid ""
+"Closes existing session of aiohttp. Use this function if you stop "
+"polling/webhooks."
+msgstr ""
+"Закрывает текущую aiohttp сессию. Используйте эту функцию для завершения "
+"работы поллинга или вебхука."
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:1
+#: telebot.async_telebot.AsyncTeleBot.copy_messages:1
+msgid "Use this method to copy messages of any kind."
+msgstr "Используйте этот метод для копирования любых сообщений."
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#copymessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#copymessage"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:8
+#: telebot.async_telebot.AsyncTeleBot.copy_messages:6
+#: telebot.async_telebot.AsyncTeleBot.forward_message:11
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:6
+msgid ""
+"Unique identifier for the chat where the original message was sent (or "
+"channel username in the format @channelusername)"
+msgstr ""
+"Уникальный id чата, в который было отправлено исходное сообщение (или "
+"username канала в формате @channelusername)"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:10
+#: telebot.async_telebot.AsyncTeleBot.forward_message:14
+msgid "Message identifier in the chat specified in from_chat_id"
+msgstr "id сообщения в чате, заданном в from_chat_id"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:13
+msgid ""
+"New caption for media, 0-1024 characters after entities parsing. If not "
+"specified, the original caption is kept"
+msgstr ""
+"Новая подпись для медиа, 0-1024 символа после форматирования. Если не "
+"задано, используется исходная подпись"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:16
+msgid "Mode for parsing entities in the new caption."
+msgstr "Режим форматирования новой подписи."
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:19
+msgid ""
+"A JSON-serialized list of special entities that appear in the new "
+"caption, which can be specified instead of parse_mode"
+msgstr ""
+"Список отформатированных частей новой подписи в формате JSON, можно "
+"использовать вместо parse_mode"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:22
+#: telebot.async_telebot.AsyncTeleBot.send_animation:45
+#: telebot.async_telebot.AsyncTeleBot.send_audio:39
+#: telebot.async_telebot.AsyncTeleBot.send_contact:20
+#: telebot.async_telebot.AsyncTeleBot.send_dice:12
+#: telebot.async_telebot.AsyncTeleBot.send_document:26
+#: telebot.async_telebot.AsyncTeleBot.send_game:11
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:67
+#: telebot.async_telebot.AsyncTeleBot.send_location:25
+#: telebot.async_telebot.AsyncTeleBot.send_message:24
+#: telebot.async_telebot.AsyncTeleBot.send_photo:22
+#: telebot.async_telebot.AsyncTeleBot.send_poll:44
+#: telebot.async_telebot.AsyncTeleBot.send_venue:27
+#: telebot.async_telebot.AsyncTeleBot.send_video:35
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:27
+#: telebot.async_telebot.AsyncTeleBot.send_voice:31
+msgid ""
+"Sends the message silently. Users will receive a notification with no "
+"sound."
+msgstr ""
+"Отправить сообщение, при получении которого пользователи получат "
+"уведомление без звука."
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:25
+#: telebot.async_telebot.AsyncTeleBot.send_animation:34
+#: telebot.async_telebot.AsyncTeleBot.send_audio:57
+#: telebot.async_telebot.AsyncTeleBot.send_contact:38
+#: telebot.async_telebot.AsyncTeleBot.send_document:50
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:95
+#: telebot.async_telebot.AsyncTeleBot.send_location:43
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:15
+#: telebot.async_telebot.AsyncTeleBot.send_photo:25
+#: telebot.async_telebot.AsyncTeleBot.send_poll:64
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:30
+#: telebot.async_telebot.AsyncTeleBot.send_venue:51
+#: telebot.async_telebot.AsyncTeleBot.send_video:38
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:42
+#: telebot.async_telebot.AsyncTeleBot.send_voice:43
+msgid "Protects the contents of the sent message from forwarding and saving"
+msgstr "Запретить пересылку и сохранение содержимого сообщения"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:28
+#: telebot.async_telebot.AsyncTeleBot.send_animation:37
+#: telebot.async_telebot.AsyncTeleBot.send_audio:29
+#: telebot.async_telebot.AsyncTeleBot.send_contact:23
+#: telebot.async_telebot.AsyncTeleBot.send_dice:15
+#: telebot.async_telebot.AsyncTeleBot.send_document:12
+#: telebot.async_telebot.AsyncTeleBot.send_game:14
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:70
+#: telebot.async_telebot.AsyncTeleBot.send_location:17
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:18
+#: telebot.async_telebot.AsyncTeleBot.send_message:30
+#: telebot.async_telebot.AsyncTeleBot.send_photo:28
+#: telebot.async_telebot.AsyncTeleBot.send_poll:47
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:13
+#: telebot.async_telebot.AsyncTeleBot.send_venue:30
+#: telebot.async_telebot.AsyncTeleBot.send_video:41
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:19
+#: telebot.async_telebot.AsyncTeleBot.send_voice:20
+msgid "If the message is a reply, ID of the original message"
+msgstr "Если сообщение является ответом - id сообщения, на которое дан ответ"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:31
+#: telebot.async_telebot.AsyncTeleBot.send_animation:54
+#: telebot.async_telebot.AsyncTeleBot.send_audio:54
+#: telebot.async_telebot.AsyncTeleBot.send_dice:26
+#: telebot.async_telebot.AsyncTeleBot.send_document:38
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:84
+#: telebot.async_telebot.AsyncTeleBot.send_location:40
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:24
+#: telebot.async_telebot.AsyncTeleBot.send_message:33
+#: telebot.async_telebot.AsyncTeleBot.send_photo:31
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:27
+#: telebot.async_telebot.AsyncTeleBot.send_video:44
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:39
+#: telebot.async_telebot.AsyncTeleBot.send_voice:40
+msgid ""
+"Pass True, if the message should be sent even if the specified replied-to"
+" message is not found"
+msgstr ""
+"Передайте True, если сообщение нужно отправить даже в случае отсутствия "
+"сообщения, на которое дан ответ"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:34
+#: telebot.async_telebot.AsyncTeleBot.send_animation:40
+#: telebot.async_telebot.AsyncTeleBot.send_contact:26
+#: telebot.async_telebot.AsyncTeleBot.send_dice:18
+#: telebot.async_telebot.AsyncTeleBot.send_document:18
+#: telebot.async_telebot.AsyncTeleBot.send_game:17
+#: telebot.async_telebot.AsyncTeleBot.send_location:20
+#: telebot.async_telebot.AsyncTeleBot.send_message:36
+#: telebot.async_telebot.AsyncTeleBot.send_photo:34
+#: telebot.async_telebot.AsyncTeleBot.send_poll:53
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:16
+#: telebot.async_telebot.AsyncTeleBot.send_venue:33
+#: telebot.async_telebot.AsyncTeleBot.send_video:47
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:22
+#: telebot.async_telebot.AsyncTeleBot.send_voice:23
+msgid ""
+"Additional interface options. A JSON-serialized object for an inline "
+"keyboard, custom reply keyboard, instructions to remove reply keyboard or"
+" to force a reply from the user."
+msgstr ""
+"Дополнительные элементы интерфейса. Inline клавиатура, текстовая "
+"клавиатура, запрос на удаление текстовой клавиатуры или запрос на ответ "
+"от пользователя."
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:39
+#: telebot.async_telebot.AsyncTeleBot.delete_message:19
+#: telebot.async_telebot.AsyncTeleBot.edit_message_live_location:23
+#: telebot.async_telebot.AsyncTeleBot.forward_message:20
+#: telebot.async_telebot.AsyncTeleBot.send_animation:48
+#: telebot.async_telebot.AsyncTeleBot.send_audio:42
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action:19
+#: telebot.async_telebot.AsyncTeleBot.send_contact:31
+#: telebot.async_telebot.AsyncTeleBot.send_dice:23
+#: telebot.async_telebot.AsyncTeleBot.send_document:29
+#: telebot.async_telebot.AsyncTeleBot.send_location:28
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:21
+#: telebot.async_telebot.AsyncTeleBot.send_message:40
+#: telebot.async_telebot.AsyncTeleBot.send_photo:39
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:24
+#: telebot.async_telebot.AsyncTeleBot.send_venue:38
+#: telebot.async_telebot.AsyncTeleBot.send_video:52
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:30
+#: telebot.async_telebot.AsyncTeleBot.send_voice:34
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location:19
+msgid "Timeout in seconds for the request."
+msgstr "Таймаут запроса в секундах."
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:42
+#: telebot.async_telebot.AsyncTeleBot.send_audio:60
+#: telebot.async_telebot.AsyncTeleBot.send_document:53
+#: telebot.async_telebot.AsyncTeleBot.send_location:46
+#: telebot.async_telebot.AsyncTeleBot.send_photo:42
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:36
+#: telebot.async_telebot.AsyncTeleBot.send_voice:46
+msgid "Identifier of a message thread, in which the message will be sent"
+msgstr "id топика, в который нужно отправить сообщение"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:45
+#: telebot.async_telebot.AsyncTeleBot.send_animation:66
+#: telebot.async_telebot.AsyncTeleBot.send_audio:66
+#: telebot.async_telebot.AsyncTeleBot.send_contact:44
+#: telebot.async_telebot.AsyncTeleBot.send_dice:35
+#: telebot.async_telebot.AsyncTeleBot.send_document:59
+#: telebot.async_telebot.AsyncTeleBot.send_game:32
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:101
+#: telebot.async_telebot.AsyncTeleBot.send_location:49
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:30
+#: telebot.async_telebot.AsyncTeleBot.send_message:46
+#: telebot.async_telebot.AsyncTeleBot.send_photo:48
+#: telebot.async_telebot.AsyncTeleBot.send_poll:70
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:42
+#: telebot.async_telebot.AsyncTeleBot.send_venue:57
+#: telebot.async_telebot.AsyncTeleBot.send_video:67
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:51
+#: telebot.async_telebot.AsyncTeleBot.send_voice:49
+msgid "Reply parameters."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:48
+#, fuzzy
+msgid "On success, the MessageId of the sent message is returned."
+msgstr "В случае успеха возвращает отправленное сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_message:49
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:22
+#, fuzzy
+msgid ":class:`telebot.types.MessageID`"
+msgstr "Экземпляр класса :class:`telebot.types.Message`"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:9
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:9
+#, fuzzy
+msgid "Message identifiers in the chat specified in from_chat_id"
+msgstr "id сообщения в чате, заданном в from_chat_id"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:12
+#: telebot.async_telebot.AsyncTeleBot.forward_message:5
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:12
+msgid ""
+"Sends the message silently. Users will receive a notification with no "
+"sound"
+msgstr ""
+"Отправить сообщение, при получении которого пользователи получат "
+"уведомление без звука"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:15
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:15
+#: telebot.async_telebot.AsyncTeleBot.send_media_group:27
+msgid "Identifier of a message thread, in which the messages will be sent"
+msgstr "id топика, в который будет отправлена группа медиа"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:18
+#: telebot.async_telebot.AsyncTeleBot.forward_message:17
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:18
+msgid "Protects the contents of the forwarded message from forwarding and saving"
+msgstr "Запретить пересылку и сохранение содержимого пересланного сообщения"
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:21
+msgid "Pass True to copy the messages without their captions"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:24
+#, fuzzy
+msgid "On success, an array of MessageId of the sent messages is returned."
+msgstr "В случае успеха возвращает отправленное сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.copy_messages:25
+#, fuzzy
+msgid ":obj:`list` of :class:`telebot.types.MessageID`"
+msgstr "Экземпляр класса :class:`telebot.types.Message`"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:1
+msgid ""
+"Use this method to create an additional invite link for a chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate administrator rights. The link can be revoked using the "
+"method revokeChatInviteLink. Returns the new invite link as "
+"ChatInviteLink object."
+msgstr ""
+"Используйте этот метод, чтобы создать дополнительную ссылку-приглашение в"
+" чат. Бот должен быть администратором чата и иметь соответствующие права "
+"администратора. Ссылка может быть аннулирована методом "
+"revokeChatInviteLink. Возвращает новую ссылку-приглашение "
+"(ChatInviteLink)."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createchatinvitelink"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#createchatinvitelink"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:8
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:6
+#: telebot.async_telebot.AsyncTeleBot.export_chat_invite_link:6
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:7
+msgid ""
+"Id: Unique identifier for the target chat or username of the target "
+"channel (in the format @channelusername)"
+msgstr "Уникальный id чата или username канала (в формате @channelusername)"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:12
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:10
+msgid "Invite link name; 0-32 characters"
+msgstr "Название ссылки-приглашения; 0-32 символа"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:15
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:16
+msgid "Point in time (Unix timestamp) when the link will expire"
+msgstr "Время, когда ссылка будет аннулирована в формате Unix timestamp"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:18
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:19
+msgid "Maximum number of users that can be members of the chat simultaneously"
+msgstr "Максимальное количество пользователей в чате"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:21
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:22
+msgid ""
+"True, if users joining the chat via the link need to be approved by chat "
+"administrators. If True, member_limit can't be specified"
+msgstr ""
+"True, если пользователи, использующие эту ссылку должны быть одобрены "
+"администраторами чата. Нельзя использовать True вместе с member_limit"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:24
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:25
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:14
+msgid "Returns the new invite link as ChatInviteLink object."
+msgstr "Возвращает новую ссылку-приглашение (ChatInviteLink)."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_chat_invite_link:25
+#: telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:26
+#: telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:15
+msgid ":class:`telebot.types.ChatInviteLink`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:1
+msgid ""
+"Use this method to create a topic in a forum supergroup chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"can_manage_topics administrator rights. Returns information about the "
+"created topic as a ForumTopic object."
+msgstr ""
+"Используйте этот метод, чтобы создать топик в супергруппе. Бот должен "
+"быть администратором чата и иметь права администратора can_manage_topics."
+" Возвращает информацию о созданном топике (ForumTopic)."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#createforumtopic"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:10
+msgid "Name of the topic, 1-128 characters"
+msgstr "Имя топика, 1-128 символов"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:13
+msgid ""
+"Color of the topic icon in RGB format. Currently, must be one of "
+"0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F"
+msgstr ""
+"Цвет иконки топика в формате RGB. В текущий момент, доступны цвета "
+"0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:16
+msgid ""
+"Custom emoji for the topic icon. Must be an emoji of type “tgs” and must "
+"be exactly 1 character long"
+msgstr ""
+"Кастомный эмодзи для использования в качестве иконки топика. Должно быть "
+"“tgs” эмодзи и быть ровно 1 символом"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:19
+msgid ""
+"On success, information about the created topic is returned as a "
+"ForumTopic object."
+msgstr "В случае успеха возвращается информация о созданном топике (ForumTopic)."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_forum_topic:20
+msgid ":class:`telebot.types.ForumTopic`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:1
+msgid ""
+"Use this method to create a link for an invoice. Returns the created "
+"invoice link as String on success."
+msgstr ""
+"используйте этот метод, чтобы создать ссылку-инвойс. Возвращает созданную"
+" ссылку в случае успеха (String)."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createinvoicelink"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#createinvoicelink"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:7
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:8
+msgid "Product name, 1-32 characters"
+msgstr "Название товара, 1-32 символа"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:10
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:11
+msgid "Product description, 1-255 characters"
+msgstr "Описание товара, 1-255 символов"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:13
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:14
+msgid ""
+"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to "
+"the user, use for your internal processes."
+msgstr ""
+"Дополнительные данные, 1-128 байт. Не будет показано пользователю, "
+"используйте во внутренних процессах."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:17
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:18
+msgid "Payments provider token, obtained via @Botfather"
+msgstr "Токен платежной системы, полученный через @BotFather"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:20
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:21
+msgid ""
+"Three-letter ISO 4217 currency code, see "
+"https://core.telegram.org/bots/payments#supported-currencies"
+msgstr ""
+"Трехбуквенный код валюты в формате ISO 4217, см. "
+"https://core.telegram.org/bots/payments#supported-currencies"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:24
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:25
+msgid ""
+"Price breakdown, a list of components (e.g. product price, tax, discount,"
+" delivery cost, delivery tax, bonus, etc.)"
+msgstr ""
+"Детали цены, список компонент (например цена продукта, налог, скидка, "
+"стоимость доставки, налог на доставку, бонус и т.д.)"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:28
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:87
+msgid "The maximum accepted amount for tips in the smallest units of the currency"
+msgstr "Максимальный размер чаевых в наименьших единицах выбранной валюты"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:31
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:90
+msgid ""
+"A JSON-serialized array of suggested amounts of tips in the smallest "
+"units of the currency. At most 4 suggested tip amounts can be specified."
+" The suggested tip amounts must be positive, passed in a strictly "
+"increased order and must not exceed max_tip_amount."
+msgstr ""
+"Массив предлагаемых вариантов чаевых в наименьших единицах выбранной "
+"валюты в формате JSON. Можно задать не более 4 вариантов. Варианты чаевых"
+" должны быть больше нуля, перечисленные в порядке строгого возрастания и "
+"не превышать max_tip_amount."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:36
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:77
+msgid ""
+"A JSON-serialized data about the invoice, which will be shared with the "
+"payment provider. A detailed description of required fields should be "
+"provided by the payment provider."
+msgstr ""
+"Данные о инвойсе в формате JSON, которые будут переданы платежной "
+"системе. Подробное описание обязательных полей должно быть предоставлено "
+"провайдером платежной системы."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:40
+msgid ""
+"URL of the product photo for the invoice. Can be a photo of the goods or "
+"a photo of the invoice. People like it better when they see a photo of "
+"what they are paying for."
+msgstr ""
+"URL изображения товара для инвойса. Может быть изображением товаров или "
+"изображением инвойса. Людям больше нравится видеть фото товара, за "
+"который они платят."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:44
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:37
+msgid "Photo size in bytes"
+msgstr "Вес изображения в байтах"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:47
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:40
+msgid "Photo width"
+msgstr "Ширина изображения"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:50
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:43
+msgid "Photo height"
+msgstr "Высота изображения"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:53
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:46
+msgid "Pass True, if you require the user's full name to complete the order"
+msgstr ""
+"Передайте True, если для совершения заказа требуется полное имя "
+"пользователя"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:56
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:49
+msgid "Pass True, if you require the user's phone number to complete the order"
+msgstr ""
+"Передайте True, если для совершения заказа требуется номер телефона "
+"пользователя"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:59
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:52
+msgid "Pass True, if you require the user's email to complete the order"
+msgstr "Передайте True, если для совершения заказа требуется email пользователя"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:62
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:55
+msgid ""
+"Pass True, if you require the user's shipping address to complete the "
+"order"
+msgstr "Передайте True, если для совершения заказа требуется адрес доставки"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:65
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:61
+msgid "Pass True, if user's phone number should be sent to provider"
+msgstr ""
+"Передайте True, если номер телефона пользователя нужно отправить "
+"платежной системе"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:68
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:64
+msgid "Pass True, if user's email address should be sent to provider"
+msgstr "Передайте True, если email пользователя нужно отправить платежной системе"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:71
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:58
+msgid "Pass True, if the final price depends on the shipping method"
+msgstr "Передайте True, если окончательная цена зависит от способа доставки"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:74
+msgid "Created invoice link as String on success."
+msgstr "Созданная ссылка-инвойс (String) в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_invoice_link:75
+#: telebot.async_telebot.AsyncTeleBot.export_chat_invite_link:11
+#: telebot.async_telebot.AsyncTeleBot.get_file_url:7
+msgid ":obj:`str`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:1
+msgid ""
+"Use this method to create new sticker set owned by a user. The bot will "
+"be able to edit the created sticker set. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы создать новый стикерпак, владельцем "
+"которого станет пользователь. Бот будет иметь возможность редактировать "
+"созданный стикерпак. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createnewstickerset"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#createnewstickerset"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:8
+msgid ""
+"Fields *_sticker are deprecated, pass a list of stickers to stickers "
+"parameter instead."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:13
+msgid ""
+"Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., "
+"animals). Can contain only English letters, digits and underscores. Must "
+"begin with a letter, can't contain consecutive underscores and must end "
+"in \"_by_\". is case insensitive. 1-64 "
+"characters."
+msgstr ""
+"Короткое имя стикерпака для использования в ссылках вида "
+"t.me/addstickers/ (например animals). Может содержать только латинские "
+"буквы, цифры и нижние подчеркивания. Должно начинаться с буквы, не может "
+"содержать подряд идущие нижние подчеркивания и должно заканчиваться на "
+"\"_by_\". учитывает регистр. 1-64 символа."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:18
+msgid "Sticker set title, 1-64 characters"
+msgstr "Название стикерпака, 1-64 символа"
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:35
+msgid ""
+"Pass True, if a set of mask stickers should be created. Deprecated since "
+"Bot API 6.2, use sticker_type instead."
+msgstr ""
+"Передайте True, если создаётся стикерпак масок. Устарело, начиная с Bot "
+"API 6.2, используйте sticker_type."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:39
+#, fuzzy
+msgid ""
+"Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. "
+"By default, a regular sticker set is created."
+msgstr ""
+"Необязательный, тип стикерпака, передайте “regular” или “mask”. "
+"Стикерпаки кастомных эмодзи пока что не могут быть созданы с помощью Bot "
+"API. По умолчанию будет создан обычный стикерпак."
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:45
+msgid ""
+"Pass True if stickers in the sticker set must be repainted to the color "
+"of text when used in messages, the accent color if used as emoji status, "
+"white on chat photos, or another appropriate color based on context; for "
+"custom emoji sticker sets only"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:50
+msgid "List of stickers to be added to the set"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.create_new_sticker_set:53
+msgid ""
+"Format of stickers in the set, must be one of “static”, “animated”, "
+"“video”"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:1
+msgid ""
+"Use this method to decline a chat join request. The bot must be an "
+"administrator in the chat for this to work and must have the "
+"can_invite_users administrator right. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы отклонить запрос на вступление в чат. Бот "
+"должен быть администратором чата и иметь права администратора "
+"can_invite_users. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.decline_chat_join_request:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#declinechatjoinrequest"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#declinechatjoinrequest"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_chat_photo:1
+msgid ""
+"Use this method to delete a chat photo. Photos can't be changed for "
+"private chats. The bot must be an administrator in the chat for this to "
+"work and must have the appropriate admin rights. Returns True on success."
+" Note: In regular groups (non-supergroups), this method will only work if"
+" the ‘All Members Are Admins’ setting is off in the target group."
+msgstr ""
+"Используйте этот метод, чтобы удалить фото чата. Нельзя изменить фото в "
+"приватных чатах. Бот должен быть администратором чата и иметь "
+"соответствующие права администратора. Возвращает True в случае успеха. "
+"Примечание: В обычных группах (не супергруппах), метод будет работать "
+"только в случаях, когда настройка ‘All Members Are Admins’ выключена."
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_chat_photo:6
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletechatphoto"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deletechatphoto"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_chat_photo:8
+#: telebot.async_telebot.AsyncTeleBot.set_chat_photo:9
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages:7
+msgid ""
+"Int or Str: Unique identifier for the target chat or username of the "
+"target channel (in the format @channelusername)"
+msgstr "Уникальный id чата или username канала (в формате @channelusername)"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set:1
+msgid ""
+"Use this method to delete a group sticker set from a supergroup. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate admin rights. Use the field can_set_sticker_set optionally "
+"returned in getChat requests to check if the bot can use this method. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить стикерпак группы из супергруппы. "
+"Бот должен быть администратором чата и иметь соответствующие права "
+"администратора. Используйте поле can_set_sticker_set, возвращаемое "
+"методом getChat, чтобы проверить, что бот может использовать этот метод. "
+"Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_chat_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletechatstickerset"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#deletechatstickerset"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_forum_topic:1
+msgid ""
+"Use this method to delete a topic in a forum supergroup chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"can_manage_topics administrator rights, unless it is the creator of the "
+"topic. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить топик в супергруппе. Бот должен "
+"быть администратором чата и иметь права администратора can_manage_topics,"
+" за исключением случае, когда бот является создателем топика. Возвращает "
+"True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deleteforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deleteforumtopic"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_forum_topic:10
+msgid "Identifier of the topic to delete"
+msgstr "id топика, который нужно удалить"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_message:1
+msgid ""
+"Use this method to delete a message, including service messages, with the"
+" following limitations: - A message can only be deleted if it was sent "
+"less than 48 hours ago. - A dice message in a private chat can only be "
+"deleted if it was sent more than 24 hours ago. - Bots can delete outgoing"
+" messages in private chats, groups, and supergroups. - Bots can delete "
+"incoming messages in private chats. - Bots granted can_post_messages "
+"permissions can delete outgoing messages in channels. - If the bot is an "
+"administrator of a group, it can delete any message there. - If the bot "
+"has can_delete_messages permission in a supergroup or a channel, it can "
+"delete any message there. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить сообщение, в том числе сервисное, "
+"ограничения: - Сообщение может быть удалено только если оно было "
+"отправлено менее 48 часов назад. - Dice-сообщение в приватном чате может "
+"быть удалено только если оно было отправлено более 24 часов назад. - Боты"
+" могут удалять свои сообщения в приватных чатах, группах и супергруппах. "
+"- Боты могут удалять чужие сообщение в приватных чатах. - Боты с правами "
+"администратора can_post_messages могут удалять сообщения в каналах. - "
+"Если бот является администратором группы, он может удалить любое "
+"сообщение в ней. - Если бот имеет права администратора "
+"can_delete_messages в супергруппе или канале, он может удалить любое "
+"сообщение в них. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_message:11
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletemessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deletemessage"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_message:16
+msgid "Identifier of the message to delete"
+msgstr "id сообщения, которое нужно удалить"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_messages:1
+msgid ""
+"Use this method to delete multiple messages in a chat. The number of "
+"messages to be deleted must not exceed 100. If the chat is a private "
+"chat, the user must be an administrator of the chat for this to work and "
+"must have the appropriate admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_messages:6
+#, fuzzy
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletemessages"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deletemessage"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_messages:11
+#, fuzzy
+msgid "Identifiers of the messages to be deleted"
+msgstr "id сообщения, которое нужно удалить"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_my_commands:1
+msgid ""
+"Use this method to delete the list of the bot's commands for the given "
+"scope and user language. After deletion, higher level commands will be "
+"shown to affected users. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить список команд бота для заданных "
+"поля видимости и языка. После удаления, команды более широкого поля "
+"видимости будут доступны пользователям, которых коснулись изменения. "
+"Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_my_commands:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletemycommands"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deletemycommands"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_my_commands:7
+#: telebot.async_telebot.AsyncTeleBot.get_my_commands:6
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands:8
+msgid ""
+"The scope of users for which the commands are relevant. Defaults to "
+"BotCommandScopeDefault."
+msgstr "Область видимости команд. По умолчанию BotCommandScopeDefault."
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_my_commands:11
+#: telebot.async_telebot.AsyncTeleBot.get_my_commands:10
+#: telebot.async_telebot.AsyncTeleBot.set_my_commands:12
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, commands will be applied "
+"to all users from the given scope, for whose language there are no "
+"dedicated commands"
+msgstr ""
+"Двухбуквенный языковой код в формате ISO 639-1. Если не задан, изменения "
+"коснутся команд для всех пользователей в заданном поле видимости, не "
+"имеющих команд на их языке"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_state:1
+msgid "Delete the current state of a user."
+msgstr "Удалить текущее состояние (стейт) пользователя."
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set:1
+msgid ""
+"Use this method to delete a sticker from a set created by the bot. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить стикер из стикерпака, созданного "
+"ботом. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletestickerfromset"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#deletestickerfromset"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_sticker_from_set:5
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:5
+msgid "File identifier of the sticker"
+msgstr "id файла стикера"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_sticker_set:1
+#, fuzzy
+msgid "Use this method to delete a sticker set. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить стикер из стикерпака, созданного "
+"ботом. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_webhook:1
+msgid ""
+"Use this method to remove webhook integration if you decide to switch "
+"back to getUpdates. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить вебхук, если вы решите перейти "
+"обратно на getUpdates. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_webhook:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletewebhook"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deletewebhook"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_webhook:6
+#: telebot.async_telebot.AsyncTeleBot.set_webhook:36
+msgid "Pass True to drop all pending updates, defaults to None"
+msgstr ""
+"Передайте True, чтобы удалить все предшествующие запуску бота апдейты, по"
+" умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.delete_webhook:9
+msgid "Request connection timeout, defaults to None"
+msgstr "Тайм-аут запроса, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.download_file:1
+msgid "Downloads file."
+msgstr "Скачивает файл."
+
+#: of telebot.async_telebot.AsyncTeleBot.download_file:3
+msgid "Path where the file should be downloaded."
+msgstr "Путь, куда файл нужно сохранить."
+
+#: of telebot.async_telebot.AsyncTeleBot.download_file:6
+msgid "bytes"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.download_file:7
+msgid ":obj:`bytes`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:1
+msgid ""
+"Use this method to edit a non-primary invite link created by the bot. The"
+" bot must be an administrator in the chat for this to work and must have "
+"the appropriate admin rights."
+msgstr ""
+"Используйте этот метод, чтобы изменить неосновную ссылку-приглашение, "
+"созданную ботом. Бот должен быть администратором чата и иметь "
+"соответствующие права администратора."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editchatinvitelink"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#editchatinvitelink"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_chat_invite_link:13
+msgid "The invite link to edit"
+msgstr "Ссылка-приглашение для изменения"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_forum_topic:1
+msgid ""
+"Use this method to edit name and icon of a topic in a forum supergroup "
+"chat. The bot must be an administrator in the chat for this to work and "
+"must have can_manage_topics administrator rights, unless it is the "
+"creator of the topic. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы изменить название и иконку топика в "
+"супергруппе. Бот должен быть администратором чата и иметь права "
+"администратора can_manage_topics, кроме случаев, когда бот является "
+"создателем топика. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_forum_topic:5
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#editforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#editforumtopic"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_forum_topic:10
+msgid "Identifier of the topic to edit"
+msgstr "id топика для изменения"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_forum_topic:13
+msgid ""
+"Optional, New name of the topic, 1-128 characters. If not specififed or "
+"empty, the current name of the topic will be kept"
+msgstr ""
+"Необязательный, новое имя топика, 1-128 символов. Если не задано или "
+"пустое, сохранится текущее имя топика"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_forum_topic:17
+msgid ""
+"Optional, New unique identifier of the custom emoji shown as the topic "
+"icon. Use getForumTopicIconStickers to get all allowed custom emoji "
+"identifiers. Pass an empty string to remove the icon. If not specified, "
+"the current icon will be kept"
+msgstr ""
+"Необязательный, новый уникальный id кастомного эмодзи, используемого в "
+"качестве иконки топика. Используйте getForumTopicIconStickers, чтобы "
+"получить все доступные id кастомных эмодзи. Передайте пустую строку, "
+"чтобы убрать иконку. Если не задан, сохранится текущая иконка топика"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_general_forum_topic:1
+msgid ""
+"Use this method to edit the name of the 'General' topic in a forum "
+"supergroup chat. The bot must be an administrator in the chat for this to"
+" work and must have can_manage_topics administrator rights. Returns True "
+"on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить топик в супергруппе. Бот должен "
+"быть администратором чата и иметь права администратора can_manage_topics,"
+" за исключением случае, когда бот является создателем топика. Возвращает "
+"True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editgeneralforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#editforumtopic"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_general_forum_topic:10
+msgid "New topic name, 1-128 characters"
+msgstr "Название товара, 1-32 символа"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:1
+msgid "Use this method to edit captions of messages."
+msgstr "Используйте этот метод, чтобы изменить подписи к медиа в сообщениях"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagecaption"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#editmessagecaption"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:5
+msgid "New caption of the message"
+msgstr "Новая подпись к медиа"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:8
+msgid ""
+"Required if inline_message_id is not specified. Unique identifier for the"
+" target chat or username of the target channel"
+msgstr ""
+"Обязательный, если не указан inline_message_id. Уникальный id чата или "
+"username канала"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:11
+msgid "Required if inline_message_id is not specified."
+msgstr "Обязательный, если не указан inline_message_id."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:14
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the inline "
+"message."
+msgstr "Обязательный, если не указан inline_message_id. id inline сообщения."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:17
+msgid "New caption of the message, 0-1024 characters after entities parsing"
+msgstr "Новая подпись к медиа в сообщении, 0-1024 символа после форматирования"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:20
+msgid ""
+"A JSON-serialized array of objects that describe how the caption should "
+"be parsed."
+msgstr ""
+"Массив объектов, описывающих то, как будет происходить парсинг подписи к "
+"медиа в формате JSON."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:23
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media:19
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:14
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:26
+msgid "A JSON-serialized object for an inline keyboard."
+msgstr "JSON-сериализованный объект inline клавиатуры."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:26
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media:22
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:17
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:32
+msgid ""
+"On success, if edited message is sent by the bot, the edited Message is "
+"returned, otherwise True is returned."
+msgstr ""
+"В случае успеха, если изменённое сообщение отправлено ботом, возвращается"
+" новый объект Message, иначе (inline сообщения) возвращается True."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_caption:27
+msgid ":obj:`types.Message` | :obj:`bool`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:3
+msgid ""
+"Use this method to edit live location messages. A location can be edited "
+"until its live_period expires or editing is explicitly"
+msgstr ""
+"Используйте этот метод, чтобы изменить live местоположение в сообщении. "
+"Местоположение может быть изменено пока не истечёт live_period или не"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:2
+msgid ""
+"disabled by a call to stopMessageLiveLocation. On success, if the edited "
+"message is not an inline message, the edited Message is returned, "
+"otherwise True is returned."
+msgstr ""
+"отключено вызовом метода stopMessageLiveLocation. В случае успеха, если "
+"измененное сообщение не является inline сообщением, возвращается новый "
+"объект Message, иначе возвращается True."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagelivelocation"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#editmessagelivelocation"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:7
+msgid "Latitude of new location"
+msgstr "Широта нового местоположения"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:10
+msgid "Longitude of new location"
+msgstr "Долгота нового местоположения"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:16
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the message"
+" to edit"
+msgstr ""
+"Обязательный, если не указан inline_message_id. id сообщения, которое "
+"нужно изменить"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:19
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location:15
+msgid "A JSON-serialized object for a new inline keyboard."
+msgstr "JSON-сериализованный объект новой inline клавиатуры."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:26
+#: telebot.async_telebot.AsyncTeleBot.edit_message_media:16
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:11
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:14
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores:19
+#: telebot.async_telebot.AsyncTeleBot.set_game_score:20
+msgid ""
+"Required if chat_id and message_id are not specified. Identifier of the "
+"inline message"
+msgstr "Обязательный, если не указаны chat_id и message_id. id inline сообщения"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:29
+#: telebot.async_telebot.AsyncTeleBot.send_location:31
+msgid "The radius of uncertainty for the location, measured in meters; 0-1500"
+msgstr "Радиус погрешности местоположения, измеряется в метрах; 0-1500"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:32
+msgid ""
+"Direction in which the user is moving, in degrees. Must be between 1 and "
+"360 if specified."
+msgstr ""
+"Направление, в котором пользователь двигается, в градусах. Если указано, "
+"должно быть от 1 до 360."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:35
+msgid ""
+"The maximum distance for proximity alerts about approaching another chat "
+"member, in meters. Must be between 1 and 100000 if specified."
+msgstr ""
+"Максимальное расстояние для показа уведомлений о приближении других "
+"участников чата, в метрах. Если указано, должно быть от 1 до 100000."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:38
+msgid ""
+"On success, if the edited message is not an inline message, the edited "
+"Message is returned, otherwise True is returned."
+msgstr ""
+"В случае успеха, если измененное сообщение не является inline сообщением,"
+" возвращается новый объект Message, иначе возвращается True."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_live_location:39
+#: telebot.async_telebot.AsyncTeleBot.stop_message_live_location:23
+msgid ":class:`telebot.types.Message` or bool"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:1
+msgid ""
+"Use this method to edit animation, audio, document, photo, or video "
+"messages. If a message is a part of a message album, then it can be "
+"edited only to a photo or a video. Otherwise, message type can be changed"
+" arbitrarily. When inline message is edited, new file can't be uploaded. "
+"Use previously uploaded file via its file_id or specify a URL."
+msgstr ""
+"Используйте этот метод, чтобы изменить гифку, аудио, документ, фото или "
+"видео в сообщении. Если сообщение является частью альбома, оно может быть"
+" изменено только на фото или видео. Иначе, тип сообщения может быть "
+"изменен на любой. При изменении inline сообщения, нельзя загрузить новый "
+"файл. используйте ранее загруженные файлы через file_id или укажите URL."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagemedia"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#editmessagemedia"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:8
+msgid "A JSON-serialized object for a new media content of the message"
+msgstr "JSON-сериализованный объект нового медиа контента"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:10
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:5
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:8
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores:13
+#: telebot.async_telebot.AsyncTeleBot.set_game_score:14
+msgid ""
+"Required if inline_message_id is not specified. Unique identifier for the"
+" target chat or username of the target channel (in the format "
+"@channelusername)"
+msgstr ""
+"Обязательный, если не указан inline_message_id. Уникальный id чата или "
+"username канала (в формате @channelusername)"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:13
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:8
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:11
+#: telebot.async_telebot.AsyncTeleBot.get_game_high_scores:16
+#: telebot.async_telebot.AsyncTeleBot.set_game_score:17
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the sent "
+"message"
+msgstr "Обязательный, если не указан inline_message_id. id отправленного сообщения"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_media:23
+#: telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:18
+#: telebot.async_telebot.AsyncTeleBot.edit_message_text:33
+#: telebot.async_telebot.AsyncTeleBot.set_game_score:27
+msgid ":obj:`types.Message` or :obj:`bool`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:1
+msgid "Use this method to edit only the reply markup of messages."
+msgstr "Используйте этот метод, чтобы изменить только reply markup сообщения."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_reply_markup:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagereplymarkup"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#editmessagereplymarkup"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:1
+msgid "Use this method to edit text and game messages."
+msgstr "Используйте этот метод, чтобы изменить текстовые и игровые сообщения."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#editmessagetext"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#editmessagetext"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:5
+msgid "New text of the message, 1-4096 characters after entities parsing"
+msgstr "Новый текст сообщения, 1-4096 символов после форматирования"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:17
+#: telebot.async_telebot.AsyncTeleBot.send_message:15
+msgid "Mode for parsing entities in the message text."
+msgstr "Режим форматирования в тексте сообщения."
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:20
+msgid ""
+"List of special entities that appear in the message text, which can be "
+"specified instead of parse_mode"
+msgstr ""
+"Список отформатированных частей в тексте сообщения, можно использовать "
+"вместо parse_mode"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:23
+#: telebot.async_telebot.AsyncTeleBot.send_message:21
+msgid "Disables link previews for links in this message"
+msgstr "Отключает превью ссылок в сообщении"
+
+#: of telebot.async_telebot.AsyncTeleBot.edit_message_text:29
+msgid ""
+"A JSON-serialized object for options used to automatically generate "
+"Telegram link previews for messages."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.edited_channel_post_handler:1
+msgid ""
+"Handles new version of a channel post that is known to the bot and was "
+"edited. As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+"Обрабатывает новую версию поста в канале, который доступен боту и был "
+"изменён. В качестве параметра, передаёт в декорируемую функцию объект "
+":class:`telebot.types.Message`."
+
+#: of telebot.async_telebot.AsyncTeleBot.edited_message_handler:1
+msgid "Handles new version of a message that is known to the bot and was edited."
+msgstr ""
+"Обрабатывает новую версию сообщения, которое доступно боту и было "
+"изменено."
+
+#: of telebot.async_telebot.AsyncTeleBot.edited_message_handler:3
+msgid ""
+"As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+"В качестве параметра, передаёт в декорируемую функцию объект "
+":class:`telebot.types.Message`."
+
+#: of telebot.async_telebot.AsyncTeleBot.edited_message_handler:17
+#: telebot.async_telebot.AsyncTeleBot.message_handler:47
+msgid "list of chat types"
+msgstr "список видов чатов"
+
+#: of telebot.async_telebot.AsyncTeleBot.enable_saving_states:1
+msgid "Enable saving states (by default saving disabled)"
+msgstr "Разрешить сохранение стейтов (по умолчанию сохранение отключено)"
+
+#: of telebot.async_telebot.AsyncTeleBot.enable_saving_states:4
+msgid ""
+"It is recommended to pass a "
+":class:`~telebot.asyncio_storage.StatePickleStorage` instance as "
+"state_storage to TeleBot class."
+msgstr ""
+"Рекомендуется передавать экземпляр класса "
+":class:`~telebot.storage.StatePickleStorage` в качестве state_storage при"
+" инициализации класса TeleBot вместо использования этой функции."
+
+#: of telebot.async_telebot.AsyncTeleBot.enable_saving_states:7
+msgid "Filename of saving file, defaults to \"./.state-save/states.pkl\""
+msgstr "Имя файла для сохранения, по умолчанию \"./.state-save/states.pkl\""
+
+#: of telebot.async_telebot.AsyncTeleBot.export_chat_invite_link:1
+msgid ""
+"Use this method to export an invite link to a supergroup or a channel. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights."
+msgstr ""
+"Используйте этот метод, чтобы создать или заменить главную "
+"ссылку-приглашение в супергруппу или канал, созданную ботом. Бот должен "
+"быть администратором чата и иметь соответствующие права администратора."
+
+#: of telebot.async_telebot.AsyncTeleBot.export_chat_invite_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#exportchatinvitelink"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#exportchatinvitelink"
+
+#: of telebot.async_telebot.AsyncTeleBot.export_chat_invite_link:10
+msgid "exported invite link as String on success."
+msgstr "новая ссылка-приглашение (String) в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.forward_message:1
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:1
+msgid "Use this method to forward messages of any kind."
+msgstr "Используйте этот метод, чтобы переслать любое сообщение."
+
+#: of telebot.async_telebot.AsyncTeleBot.forward_message:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#forwardmessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#forwardmessage"
+
+#: of telebot.async_telebot.AsyncTeleBot.forward_message:23
+#: telebot.async_telebot.AsyncTeleBot.send_message:43
+msgid ""
+"Unique identifier for the target message thread (topic) of the forum; for"
+" forum supergroups only"
+msgstr ""
+"Уникальный id топика, в который нужно переслать сообщение; только для "
+"супергрупп с топиками"
+
+#: of telebot.async_telebot.AsyncTeleBot.forward_message:26
+#: telebot.async_telebot.AsyncTeleBot.forward_messages:21
+#: telebot.async_telebot.AsyncTeleBot.reply_to:11
+#: telebot.async_telebot.AsyncTeleBot.send_animation:69
+#: telebot.async_telebot.AsyncTeleBot.send_audio:69
+#: telebot.async_telebot.AsyncTeleBot.send_contact:47
+#: telebot.async_telebot.AsyncTeleBot.send_dice:38
+#: telebot.async_telebot.AsyncTeleBot.send_document:62
+#: telebot.async_telebot.AsyncTeleBot.send_game:35
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:104
+#: telebot.async_telebot.AsyncTeleBot.send_location:52
+#: telebot.async_telebot.AsyncTeleBot.send_message:52
+#: telebot.async_telebot.AsyncTeleBot.send_photo:51
+#: telebot.async_telebot.AsyncTeleBot.send_poll:73
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:45
+#: telebot.async_telebot.AsyncTeleBot.send_venue:60
+#: telebot.async_telebot.AsyncTeleBot.send_video:70
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:54
+#: telebot.async_telebot.AsyncTeleBot.send_voice:52
+msgid "On success, the sent Message is returned."
+msgstr "В случае успеха возвращает отправленное сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.forward_message:27
+#: telebot.async_telebot.AsyncTeleBot.reply_to:12
+#: telebot.async_telebot.AsyncTeleBot.send_animation:70
+#: telebot.async_telebot.AsyncTeleBot.send_audio:70
+#: telebot.async_telebot.AsyncTeleBot.send_contact:48
+#: telebot.async_telebot.AsyncTeleBot.send_dice:39
+#: telebot.async_telebot.AsyncTeleBot.send_document:63
+#: telebot.async_telebot.AsyncTeleBot.send_location:53
+#: telebot.async_telebot.AsyncTeleBot.send_message:53
+#: telebot.async_telebot.AsyncTeleBot.send_photo:52
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:46
+#: telebot.async_telebot.AsyncTeleBot.send_venue:61
+#: telebot.async_telebot.AsyncTeleBot.send_video:71
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:55
+msgid ":class:`telebot.types.Message`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat:1
+msgid ""
+"Use this method to get up to date information about the chat (current "
+"name of the user for one-on-one conversations, current username of a "
+"user, group or channel, etc.). Returns a Chat object on success."
+msgstr ""
+"Используйте этот метод, чтобы получить актуальную информацию о чате "
+"(текущее имя пользователя для персональных диалогов, текущий username "
+"пользователя, группы или канала и т.д.). В случае успеха возвращает "
+"объект Chat."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getchat"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getchat"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat:6
+#: telebot.async_telebot.AsyncTeleBot.get_chat_administrators:7
+#: telebot.async_telebot.AsyncTeleBot.get_chat_member_count:5
+#: telebot.async_telebot.AsyncTeleBot.leave_chat:5
+#: telebot.async_telebot.AsyncTeleBot.set_message_reaction:5
+msgid ""
+"Unique identifier for the target chat or username of the target "
+"supergroup or channel (in the format @channelusername)"
+msgstr ""
+"Уникальный id чата или username супергруппы или канала (в формате "
+"@channelusername)"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat:9
+msgid "Chat information"
+msgstr "Информация о чате"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat:10
+msgid ":class:`telebot.types.Chat`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_administrators:1
+msgid ""
+"Use this method to get a list of administrators in a chat. On success, "
+"returns an Array of ChatMember objects that contains information about "
+"all chat administrators except other bots."
+msgstr ""
+"Используйте этот метод, чтобы получить список администраторов чата. В "
+"случае успеха, возвращает массив объектов ChatMember, содержащих "
+"информацию обо всех администраторах чата, кроме других ботов."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_administrators:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getchatadministrators"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getchatadministrators"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_administrators:9
+msgid "List made of ChatMember objects."
+msgstr "Список объектов ChatMember."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_administrators:10
+msgid ":obj:`list` of :class:`telebot.types.ChatMember`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member:1
+msgid ""
+"Use this method to get information about a member of a chat. Returns a "
+"ChatMember object on success."
+msgstr ""
+"Используйте этот метод, чтобы получить информацию об участнике чата. "
+"Возвращает объект ChatMember в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getchatmember"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getchatmember"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member:11
+msgid "Returns ChatMember object on success."
+msgstr "Возвращает объект ChatMember в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member:12
+msgid ":class:`telebot.types.ChatMember`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member_count:1
+msgid "Use this method to get the number of members in a chat."
+msgstr "Используйте этот метод, чтобы получить количество участников чата."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member_count:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getchatmembercount"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getchatmembercount"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member_count:8
+msgid "Number of members in the chat."
+msgstr "Количество участников чата."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_member_count:9
+msgid ":obj:`int`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_menu_button:1
+msgid ""
+"Use this method to get the current value of the bot's menu button in a "
+"private chat, or the default menu button. Returns MenuButton on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущее значение кнопки menu в "
+"приватном чате, или кнопку menu по умолчанию. Возвращает MenuButton в "
+"случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_menu_button:5
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#getchatmenubutton"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getchatmenubutton"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_menu_button:7
+msgid ""
+"Unique identifier for the target private chat. If not specified, default "
+"bot's menu button will be returned."
+msgstr ""
+"Уникальный id приватного чата. Если не указан, будет возвращена кнопка "
+"menu по умолчанию."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_menu_button:11
+msgid "types.MenuButton"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_chat_menu_button:12
+msgid ":class:`telebot.types.MenuButton`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers:1
+msgid ""
+"Use this method to get information about custom emoji stickers by their "
+"identifiers. Returns an Array of Sticker objects."
+msgstr ""
+"Используйте этот метод, чтобы получить информацию о кастомных эмодзи по "
+"их id. Возвращает массив объектов Sticker."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers:4
+msgid ""
+"List of custom emoji identifiers. At most 200 custom emoji identifiers "
+"can be specified."
+msgstr "Список id кастомных эмодзи. Можно указать не более 200 id."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers:7
+msgid "Returns an Array of Sticker objects."
+msgstr "Возвращает массив объектов Sticker."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_custom_emoji_stickers:8
+msgid ":obj:`list` of :class:`telebot.types.Sticker`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file:1
+msgid ""
+"Use this method to get basic info about a file and prepare it for "
+"downloading. For the moment, bots can download files of up to 20MB in "
+"size. On success, a File object is returned. It is guaranteed that the "
+"link will be valid for at least 1 hour. When the link expires, a new one "
+"can be requested by calling get_file again."
+msgstr ""
+"Используйте этот метод, чтобы получить базовую информацию о файле и "
+"подготовить его к скачиванию. На текущий момент, боты могут скачивать "
+"файлы весом до 20MB. В случае успеха, возвращается объект File. "
+"Гарантируется, что ссылка на скачивание будет актуальна как минимум 1 "
+"час. Когда ссылка перестаёт быть актуальной, новая может быть снова "
+"запрошена с помощью get_file."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getfile"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getfile"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file:9
+msgid "File identifier"
+msgstr "id файла"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file:12
+#: telebot.async_telebot.AsyncTeleBot.upload_sticker_file:21
+msgid ":class:`telebot.types.File`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file_url:1
+msgid "Get a valid URL for downloading a file."
+msgstr "Получить актуальную ссылку для скачивания файла."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file_url:3
+msgid "File identifier to get download URL for."
+msgstr "id файла для получения ссылки на скачивание."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_file_url:6
+msgid "URL for downloading the file."
+msgstr "Ссылка для скачивания файла."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers:1
+msgid ""
+"Use this method to get custom emoji stickers, which can be used as a "
+"forum topic icon by any user. Requires no parameters. Returns an Array of"
+" Sticker objects."
+msgstr ""
+"Используйте этот метод, чтобы получить кастомные эмодзи, которые могут "
+"быть использованы любыми пользователями в качестве иконок топиков. Не "
+"требует параметров. Возвращает массив объектов Sticker."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getforumtopiciconstickers"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getforumtopiciconstickers"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers:6
+msgid "On success, a list of StickerSet objects is returned."
+msgstr "В случае успеха, возвращается список объектов StickerSet."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_forum_topic_icon_stickers:7
+msgid "List[:class:`telebot.types.StickerSet`]"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_game_high_scores:1
+msgid ""
+"Use this method to get data for high score tables. Will return the score "
+"of the specified user and several of their neighbors in a game. On "
+"success, returns an Array of GameHighScore objects."
+msgstr ""
+"Используйте этот метод, чтобы получить данные для таблицы рекордов. "
+"Вернёт очки указанного пользователя и несколько соседних результатов. В "
+"случае успеха, возвращает массив объектов GameHighScore."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_game_high_scores:4
+msgid ""
+"This method will currently return scores for the target user, plus two of"
+" their closest neighbors on each side. Will also return the top three "
+"users if the user and their neighbors are not among them. Please note "
+"that this behavior is subject to change."
+msgstr ""
+"На текущий момент этот метод вернёт очки указанного пользователя и по два"
+" соседних результата с каждой стороны. Также вернет результаты трёх "
+"лучших игроков, если результат пользователя и соседние не являются тремя "
+"лучшими. Пожалуйста учитывайте, что это поведение может быть изменено."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_game_high_scores:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getgamehighscores"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getgamehighscores"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_game_high_scores:10
+#: telebot.async_telebot.AsyncTeleBot.retrieve_data:3
+#: telebot.async_telebot.AsyncTeleBot.set_game_score:5
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:9
+msgid "User identifier"
+msgstr "id пользователя"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_game_high_scores:22
+msgid "On success, returns an Array of GameHighScore objects."
+msgstr "В случае успеха, возвращает массив объектов GameHighScore."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_me:1
+msgid "Returns basic information about the bot in form of a User object."
+msgstr "Возвращает базовую информацию о боте в виде объекта User."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_me:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getme"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getme"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_commands:1
+msgid ""
+"Use this method to get the current list of the bot's commands. Returns "
+"List of BotCommand on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий список команд бота. "
+"Возвращает список объектов BotCommand в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_commands:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getmycommands"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getmycommands"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_commands:15
+msgid "List of BotCommand on success."
+msgstr "Список объектов BotCommand в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_commands:16
+msgid ":obj:`list` of :class:`telebot.types.BotCommand`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights:1
+msgid ""
+"Use this method to get the current default administrator rights of the "
+"bot. Returns ChatAdministratorRights on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущие права администратора для "
+"бота по умолчанию. Возвращает объект ChatAdministratorRights в случае "
+"успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getmydefaultadministratorrights"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getmydefaultadministratorrights"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights:6
+msgid ""
+"Pass True to get the default administrator rights of the bot in channels."
+" Otherwise, the default administrator rights of the bot for groups and "
+"supergroups will be returned."
+msgstr ""
+"Передайте True, чтобы получить права администратора для бота по умолчанию"
+" в каналах. Иначе, будут возвращены права администратора для бота по "
+"умолчанию в группах и супергруппах."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights:9
+msgid "Returns ChatAdministratorRights on success."
+msgstr "Возвращает объект ChatAdministratorRights в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_default_administrator_rights:10
+msgid ":class:`telebot.types.ChatAdministratorRights`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_description:1
+#, fuzzy
+msgid ""
+"Use this method to get the current bot description for the given user "
+"language. Returns BotDescription on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий список команд бота. "
+"Возвращает список объектов BotCommand в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_description:4
+#: telebot.async_telebot.AsyncTeleBot.get_my_short_description:4
+msgid "A two-letter ISO 639-1 language code or an empty string"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_description:7
+#, fuzzy
+msgid ":class:`telebot.types.BotDescription`"
+msgstr "Экземпляр класса :class:`telebot.types.Message`"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_name:1
+#, fuzzy
+msgid ""
+"Use this method to get the current bot name for the given user language. "
+"Returns BotName on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий список команд бота. "
+"Возвращает список объектов BotCommand в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_name:4
+#, fuzzy
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getmyname"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getme"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_name:6
+msgid "Optional. A two-letter ISO 639-1 language code or an empty string"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_name:9
+#, fuzzy
+msgid ":class:`telebot.types.BotName`"
+msgstr "Экземпляр класса :class:`telebot.types.Message`"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_short_description:1
+#, fuzzy
+msgid ""
+"Use this method to get the current bot short description for the given "
+"user language. Returns BotShortDescription on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий список команд бота. "
+"Возвращает список объектов BotCommand в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_my_short_description:7
+msgid ":class:`telebot.types.BotShortDescription`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_state:1
+msgid ""
+"Gets current state of a user. Not recommended to use this method. But it "
+"is ok for debugging."
+msgstr ""
+"Получает текущее состояние (стейт) пользователя. Не рекомендуется "
+"использовать этот метод. Но это удобно для дебага."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_state:10
+msgid "state of a user"
+msgstr "состояние (стейт) пользователя"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_state:11
+msgid ":obj:`int` or :obj:`str` or :class:`telebot.types.State`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_sticker_set:1
+msgid ""
+"Use this method to get a sticker set. On success, a StickerSet object is "
+"returned."
+msgstr ""
+"Используйте этот метод, чтобы получить стикерпак. В случае успеха, "
+"возвращается объект StickerSet."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_sticker_set:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getstickerset"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getstickerset"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_sticker_set:8
+msgid "On success, a StickerSet object is returned."
+msgstr "В случае успеха, возвращается объект StickerSet."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_sticker_set:9
+#: telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:14
+msgid ":class:`telebot.types.StickerSet`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:1
+msgid ""
+"Use this method to receive incoming updates using long polling (wiki). An"
+" Array of Update objects is returned."
+msgstr ""
+"Используйте этот метод, чтобы получить новые апдейты с помощью long "
+"polling-а (wiki). Возвращается массив объектов Update."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getupdates"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getupdates"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:6
+msgid ""
+"Identifier of the first update to be returned. Must be greater by one "
+"than the highest among the identifiers of previously received updates. By"
+" default, updates starting with the earliest unconfirmed update are "
+"returned. An update is considered confirmed as soon as getUpdates is "
+"called with an offset higher than its update_id. The negative offset can "
+"be specified to retrieve updates starting from -offset update from the "
+"end of the updates queue. All previous updates will forgotten."
+msgstr ""
+"id первого апдейта. Должен быть на единицу больше наибольшего id среди "
+"ранее полученных апдейтов. По умолчанию, возвращается список апдейтов, "
+"начиная с самого раннего неполученного. Апдейт считается полученным как "
+"только вызван метод getUpdates со смещением больше, чем id этого апдейта."
+" Отрицательное смещение может быть указано для получения последних offset"
+" апдейтов. Все предыдущие апдейты будут считаться полученными."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:12
+msgid ""
+"Limits the number of updates to be retrieved. Values between 1-100 are "
+"accepted. Defaults to 100."
+msgstr ""
+"Максимальное число апдейтов для получения. Допускаются значения от 1 до "
+"100. По умолчанию 100."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:15
+#: telebot.async_telebot.AsyncTeleBot.get_webhook_info:6
+#: telebot.async_telebot.AsyncTeleBot.polling:26
+msgid "Request connection timeout"
+msgstr "Тайм-аут запроса"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:18
+msgid "Array of string. List the types of updates you want your bot to receive."
+msgstr "Массив строк. Список видов апдейтов, которые вы хотите получать."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:21
+#, fuzzy
+msgid "Timeout in seconds for request."
+msgstr "Таймаут запроса в секундах."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:24
+msgid "An Array of Update objects is returned."
+msgstr "Возвращается массив объектов Update."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_updates:25
+msgid ":obj:`list` of :class:`telebot.types.Update`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:1
+#, fuzzy
+msgid ""
+"Use this method to get the list of boosts added to a chat by a user. "
+"Requires administrator rights in the chat. Returns a UserChatBoosts "
+"object."
+msgstr ""
+"Используйте этот метод, чтобы получить список бустов, полученных от "
+"пользователя. Бот должен быть администратором чата. Возвращает объект "
+"UserChatBoosts в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:3
+#, fuzzy
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getuserchatboosts"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getuserchatboosts"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:5
+#: telebot.async_telebot.AsyncTeleBot.send_chat_action:10
+#: telebot.async_telebot.AsyncTeleBot.send_contact:5
+#: telebot.async_telebot.AsyncTeleBot.send_poll:6
+#: telebot.async_telebot.AsyncTeleBot.send_venue:5
+#: telebot.async_telebot.AsyncTeleBot.stop_poll:5
+msgid "Unique identifier for the target chat or username of the target channel"
+msgstr "Уникальный id чата или username канала"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:11
+#, fuzzy
+msgid "On success, a UserChatBoosts object is returned."
+msgstr "В случае успеха, возвращается объект UserChatBoosts."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_chat_boosts:12
+#, fuzzy
+msgid ":class:`telebot.types.UserChatBoosts`"
+msgstr "Экземпляр класса :class:`telebot.types.UserChatBoosts`"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:1
+msgid ""
+"Use this method to get a list of profile pictures for a user. Returns a "
+":class:`telebot.types.UserProfilePhotos` object."
+msgstr ""
+"Используйте этот метод, чтобы получить список аватарок пользователя. "
+"Возвращает объект :class:`telebot.types.UserProfilePhotos`."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getuserprofilephotos"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getuserprofilephotos"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:9
+msgid ""
+"Sequential number of the first photo to be returned. By default, all "
+"photos are returned."
+msgstr ""
+"Порядковый номер первого фото для получения. По умолчанию, возвращаются "
+"все фото."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:12
+msgid ""
+"Limits the number of photos to be retrieved. Values between 1-100 are "
+"accepted. Defaults to 100."
+msgstr ""
+"Максимальное число фото для получения. Допускаются значения от 1 до 100. "
+"По умолчанию 100."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:15
+msgid ""
+"`UserProfilePhotos "
+"`_"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_user_profile_photos:16
+msgid ":class:`telebot.types.UserProfilePhotos`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.get_webhook_info:1
+msgid ""
+"Use this method to get current webhook status. Requires no parameters. On"
+" success, returns a WebhookInfo object. If the bot is using getUpdates, "
+"will return an object with the url field empty."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий статус вебхука. Не требует"
+" параметров. В случае успеха возвращает объект WebhookInfo. Если бот "
+"использует getUpdates, вернёт объект с пустым атрибутом url."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_webhook_info:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getwebhookinfo"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getwebhookinfo"
+
+#: of telebot.async_telebot.AsyncTeleBot.get_webhook_info:9
+msgid "On success, returns a WebhookInfo object."
+msgstr "В случае успеха, возвращает объект WebhookInfo."
+
+#: of telebot.async_telebot.AsyncTeleBot.get_webhook_info:10
+msgid ":class:`telebot.types.WebhookInfo`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.hide_general_forum_topic:1
+msgid ""
+"Use this method to hide the 'General' topic in a forum supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить топик в супергруппе. Бот должен "
+"быть администратором чата и иметь права администратора can_manage_topics,"
+" за исключением случае, когда бот является создателем топика. Возвращает "
+"True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.hide_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#hidegeneralforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deleteforumtopic"
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:1
+msgid ""
+"Wrap polling with infinite loop and exception handling to avoid bot stops"
+" polling."
+msgstr ""
+"Запустить поллинг в бесконечном цикле с обработкой исключений, чтобы "
+"избежать непредвиденных остановок поллинга."
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:4
+#: telebot.async_telebot.AsyncTeleBot.polling:15
+msgid "Install watchdog and psutil before using restart_on_change option."
+msgstr "Установите watchdog и psutil, чтобы использовать restart_on_change."
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:6
+#: telebot.async_telebot.AsyncTeleBot.polling:29
+msgid "Timeout in seconds for get_updates(Defaults to None)"
+msgstr "Тайм-аут get_updates в секундах(по умолчанию None)"
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:9
+#: telebot.async_telebot.AsyncTeleBot.polling:20
+msgid "skip old updates"
+msgstr "пропускать старые апдейты"
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:12
+msgid "Aiohttp's request timeout. Defaults to 5 minutes(aiohttp.ClientTimeout)."
+msgstr "Тайм-аут запроса aiohttp. По умолчанию 5 минут(aiohttp.ClientTimeout)."
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:15
+msgid ""
+"Custom logging level for infinity_polling logging. Use logger levels from"
+" logging as a value. None/NOTSET = no error logging"
+msgstr ""
+"Кастомный уровень логирования для infinity_polling. Используйте уровни из"
+" logging в качестве значений. None/NOTSET = не логировать ошибки."
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:19
+#: telebot.async_telebot.AsyncTeleBot.polling:32
+msgid ""
+"A list of the update types you want your bot to receive. For example, "
+"specify [“message”, “edited_channel_post”, “callback_query”] to only "
+"receive updates of these types. See util.update_types for a complete list"
+" of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used. Please note that this parameter doesn't affect "
+"updates created before the call to the get_updates, so unwanted updates "
+"may be received for a short period of time."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:19
+#: telebot.async_telebot.AsyncTeleBot.polling:32
+msgid ""
+"A list of the update types you want your bot to receive. For example, "
+"specify [“message”, “edited_channel_post”, “callback_query”] to only "
+"receive updates of these types. See util.update_types for a complete list"
+" of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used."
+msgstr ""
+"Список видов апдейтов, которые вы хотите получать. Например, укажите "
+"[“message”, “edited_channel_post”, “callback_query”], чтобы получать "
+"апдейты только этих видов. Полный список доступных видов апдейтов - "
+"util.update_types. Укажите пустой список, чтобы получать все апдейты, "
+"кроме chat_member (по умолчанию). Если не задан, будет использована "
+"последняя настройка."
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:25
+#: telebot.async_telebot.AsyncTeleBot.polling:38
+msgid ""
+"Please note that this parameter doesn't affect updates created before the"
+" call to the get_updates, so unwanted updates may be received for a short"
+" period of time."
+msgstr ""
+"Пожалуйста учитывайте, что этот параметр не влияет на апдейты, "
+"отправленные до вызова get_updates, поэтому нежелательные апдейты могут "
+"быть получены в течение короткого периода времени."
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:29
+msgid "Restart a file on file(s) change. Defaults to False"
+msgstr "Перезапуск при изменении файлов. По умолчанию False"
+
+#: of telebot.async_telebot.AsyncTeleBot.infinity_polling:32
+#: telebot.async_telebot.AsyncTeleBot.polling:48
+msgid "Path to watch for changes. Defaults to current directory"
+msgstr "Путь для мониторинга изменений. По умолчанию текущая директория."
+
+#: of telebot.async_telebot.AsyncTeleBot.inline_handler:1
+msgid ""
+"Handles new incoming inline query. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.InlineQuery` object."
+msgstr ""
+"Обрабатывает inline query. В качестве параметра, передаёт в декорируемую "
+"функцию объект :class:`telebot.types.InlineQuery`."
+
+#: of telebot.async_telebot.AsyncTeleBot.kick_chat_member:1
+msgid "This function is deprecated. Use `ban_chat_member` instead"
+msgstr "Эта функция устарела. Используйте `ban_chat_member`"
+
+#: of telebot.async_telebot.AsyncTeleBot.leave_chat:1
+msgid ""
+"Use this method for your bot to leave a group, supergroup or channel. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы покинуть группу, супергруппу или канал. "
+"Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.leave_chat:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#leavechat"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#leavechat"
+
+#: of telebot.async_telebot.AsyncTeleBot.log_out:1
+msgid ""
+"Use this method to log out from the cloud Bot API server before launching"
+" the bot locally. You MUST log out the bot before running it locally, "
+"otherwise there is no guarantee that the bot will receive updates. After "
+"a successful call, you can immediately log in on a local server, but will"
+" not be able to log in back to the cloud Bot API server for 10 minutes. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы отключиться от облачного Bot API сервера "
+"перед локальным запуском бота. Вы ДОЛЖНЫ отключить бота перед тем, как "
+"запускать его локально, иначе нет никаких гарантий, что бот будет "
+"получать апдейты. После успешного вызова, вы можете тут же подключиться к"
+" локальному серверу, но не сможете подключиться обратно к облачному Bot "
+"API серверу в течение 10 минут. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.log_out:8
+msgid "Telegram documentation: https://core.telegram.org/bots/api#logout"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#logout"
+
+#: of telebot.async_telebot.AsyncTeleBot.message_handler:1
+msgid ""
+"Handles ew incoming message of any kind - text, photo, sticker, etc. As a"
+" parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object. All message handlers are tested in"
+" the order they were added."
+msgstr ""
+"Обрабатывает входящие сообщения всех видов - text, photo, sticker, и т.д."
+" В качестве параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.Message`. Все хендлеры сообщений проверяются в том "
+"порядке, в котором были добавлены."
+
+#: of telebot.async_telebot.AsyncTeleBot.message_handler:5
+msgid "Example:"
+msgstr "Пример:"
+
+#: of telebot.async_telebot.AsyncTeleBot.message_handler:7
+msgid "Usage of message_handler"
+msgstr "Использование message_handler"
+
+#: of telebot.async_telebot.AsyncTeleBot.message_handler:40
+msgid ""
+"Optional lambda function. The lambda receives the message to test as the "
+"first parameter. It must return True if the command should handle the "
+"message."
+msgstr ""
+"Необязательная lambda функция. Получает сообщение (объект Message) в "
+"качестве первого параметра. Функция должна вернуть True если хендлер "
+"должен обработать сообщение."
+
+#: of telebot.async_telebot.AsyncTeleBot.message_handler:52
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:23
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler:14
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:13
+msgid "decorated function"
+msgstr "декорируемая функция"
+
+#: of telebot.async_telebot.AsyncTeleBot.message_reaction_count_handler:1
+#, fuzzy
+msgid ""
+"Handles new incoming message reaction count. As a parameter to the "
+"decorator function, it passes "
+":class:`telebot.types.MessageReactionCountUpdated` object."
+msgstr ""
+"Обрабатывает новый callback запрос. В качестве параметра передаёт в "
+"декорируемую функцию объект :class:`telebot.types.CallbackQuery`."
+
+#: of telebot.async_telebot.AsyncTeleBot.message_reaction_handler:1
+#, fuzzy
+msgid ""
+"Handles new incoming message reaction. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.MessageReactionUpdated` object."
+msgstr ""
+"Обрабатывает новый callback запрос. В качестве параметра передаёт в "
+"декорируемую функцию объект :class:`telebot.types.CallbackQuery`."
+
+#: of telebot.async_telebot.AsyncTeleBot.my_chat_member_handler:1
+msgid ""
+"Handles update in a status of a bot. For private chats, this update is "
+"received only when the bot is blocked or unblocked by the user. As a "
+"parameter to the decorator function, it passes "
+":class:`telebot.types.ChatMemberUpdated` object."
+msgstr ""
+"Обрабатывает изменения статуса бота. Для приватных чатов, этот апдейт "
+"отправляется только когда бот был заблокирован или разблокирован "
+"пользователем. В качестве параметра передаёт в декорируемую функцию "
+"объект :class:`telebot.types.ChatMemberUpdated`."
+
+#: of telebot.async_telebot.AsyncTeleBot.pin_chat_message:1
+msgid ""
+"Use this method to pin a message in a supergroup. The bot must be an "
+"administrator in the chat for this to work and must have the appropriate "
+"admin rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы закрепить сообщение в супергруппе. Бот "
+"должен быть администратором чата и иметь соответствующие права "
+"администратора. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.pin_chat_message:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#pinchatmessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#pinchatmessage"
+
+#: of telebot.async_telebot.AsyncTeleBot.pin_chat_message:11
+msgid "Identifier of a message to pin"
+msgstr "id сообщения, которое нужно закрепить"
+
+#: of telebot.async_telebot.AsyncTeleBot.pin_chat_message:14
+msgid ""
+"Pass True, if it is not necessary to send a notification to all group "
+"members about the new pinned message"
+msgstr ""
+"Передайте True, если всем участникам группы необходимо отправить "
+"уведомление о закреплённом сообщении"
+
+#: of telebot.async_telebot.AsyncTeleBot.poll_answer_handler:1
+msgid ""
+"Handles change of user's answer in a non-anonymous poll(when user changes"
+" the vote). Bots receive new votes only in polls that were sent by the "
+"bot itself. As a parameter to the decorator function, it passes "
+":class:`telebot.types.PollAnswer` object."
+msgstr ""
+"Обрабатывает изменения ответа пользователя в не анонимном опросе(когда "
+"пользователь меняет выбор). Боты получают новые ответы только в опросах, "
+"которые отправили сами. В качестве параметра передаёт в декорируемую "
+"функцию объект :class:`telebot.types.PollAnswer`."
+
+#: of telebot.async_telebot.AsyncTeleBot.poll_handler:1
+msgid ""
+"Handles new state of a poll. Bots receive only updates about stopped "
+"polls and polls, which are sent by the bot As a parameter to the "
+"decorator function, it passes :class:`telebot.types.Poll` object."
+msgstr ""
+"Обрабатывает изменения в состоянии опроса. Боты получают только апдейты о"
+" завершенных опросах и опросах, которые отправили сами. В качестве "
+"параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.Poll`."
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:1
+msgid ""
+"Runs bot in long-polling mode in a main loop. This allows the bot to "
+"retrieve Updates automagically and notify listeners and message handlers "
+"accordingly."
+msgstr ""
+"Запускает бота в режиме поллинга в основном цикле событий. Это позволяет "
+"боту получать апдейты (Update) автоматически и вызывать соответствующие "
+"листенеры и хендлеры."
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:4
+msgid "Warning: Do not call this function more than once!"
+msgstr "Предупреждение: Не вызывайте эту функцию более одного раза!"
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:6
+msgid "Always gets updates."
+msgstr "Всегда получает апдейты."
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:10
+msgid ""
+"Set non_stop=True if you want your bot to continue receiving updates if "
+"there is an error."
+msgstr ""
+"Укажите non_stop=True, если хотите чтобы ваш бот продолжать получать "
+"апдейты при возникновении ошибок."
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:17
+msgid "Do not stop polling when an ApiException occurs."
+msgstr "Не останавливать поллинг при возникновении ApiException."
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:23
+msgid "Delay between two update retrivals"
+msgstr "Задержка между получением апдейтов"
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:42
+msgid "Deprecated, use non_stop. Old typo, kept for backward compatibility."
+msgstr ""
+"Устарело, используйте non_stop. Старая опечатка, оставлено для обратной "
+"совместимости"
+
+#: of telebot.async_telebot.AsyncTeleBot.polling:45
+msgid "Restart a file on file(s) change. Defaults to False."
+msgstr "Перезапускать при изменениях в файлах. По умолчанию False."
+
+#: of telebot.async_telebot.AsyncTeleBot.pre_checkout_query_handler:1
+msgid ""
+"New incoming pre-checkout query. Contains full information about "
+"checkout. As a parameter to the decorator function, it passes "
+":class:`telebot.types.PreCheckoutQuery` object."
+msgstr ""
+"Новая pre-checkout query. Содержит полную информацию о заказе. В качестве"
+" параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.PreCheckoutQuery`."
+
+#: of telebot.async_telebot.AsyncTeleBot.process_new_updates:1
+msgid ""
+"Process new updates. Just pass list of updates - each update should be "
+"instance of Update object."
+msgstr ""
+"Обрабатывает новые апдейты. Просто передайте список апдейтов(Update и его"
+" наследники)."
+
+#: of telebot.async_telebot.AsyncTeleBot.process_new_updates:5
+msgid "list of updates"
+msgstr "список апдейтов"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:1
+msgid ""
+"Use this method to promote or demote a user in a supergroup or a channel."
+" The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights. Pass False for all boolean parameters "
+"to demote a user."
+msgstr ""
+"Используйте этот метод, чтобы повысить или понизить пользователя в "
+"супергруппе или канале. Бот должен быть администратором чата и иметь "
+"соответствующие права администратора. Передайте False во все boolean "
+"параметры, чтобы понизить пользователя."
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#promotechatmember"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#promotechatmember"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:7
+msgid ""
+"Unique identifier for the target chat or username of the target channel ("
+" in the format @channelusername)"
+msgstr "Уникальный id чата или username канала (в формате @channelusername)"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:14
+msgid ""
+"Pass True, if the administrator can change chat title, photo and other "
+"settings"
+msgstr ""
+"Передайте True, если администратор может менять название чата, аватарку и"
+" другие настройки"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:17
+msgid "Pass True, if the administrator can create channel posts, channels only"
+msgstr ""
+"Передайте True, если администратор может создавать посты в канале, только"
+" для каналов"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:20
+msgid ""
+"Pass True, if the administrator can edit messages of other users, "
+"channels only"
+msgstr ""
+"Передайте True, если администратор может изменять сообщения других "
+"пользователей, только для каналов"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:23
+msgid "Pass True, if the administrator can delete messages of other users"
+msgstr ""
+"Передайте True, если администратор может удалять сообщения других "
+"пользователей"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:26
+msgid "Pass True, if the administrator can invite new users to the chat"
+msgstr ""
+"Передайте True, если администратор может приглашать новых пользователей в"
+" чат"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:29
+msgid "Pass True, if the administrator can restrict, ban or unban chat members"
+msgstr ""
+"Передайте True, если администратор может ограничивать, банить или "
+"разбанивать участников чата"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:32
+msgid "Pass True, if the administrator can pin messages, supergroups only"
+msgstr ""
+"Передайте True, если администратор может закреплять сообщения, только для"
+" супергрупп"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:35
+msgid ""
+"Pass True, if the administrator can add new administrators with a subset "
+"of his own privileges or demote administrators that he has promoted, "
+"directly or indirectly (promoted by administrators that were appointed by"
+" him)"
+msgstr ""
+"Передайте True, если администратор может добавлять новых администраторов "
+"с подмножеством его собственных прав администратора или понижать "
+"администраторов, которых он повысил, напрямую или косвенно "
+"(администраторами, которых он назначил)"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:40
+msgid "Pass True, if the administrator's presence in the chat is hidden"
+msgstr "Передайте True, если присутствие администратора в чате скрыто"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:43
+msgid ""
+"Pass True, if the administrator can access the chat event log, chat "
+"statistics, message statistics in channels, see channel members, see "
+"anonymous administrators in supergroups and ignore slow mode. Implied by "
+"any other administrator privilege"
+msgstr ""
+"Передайте True, если администратор имеет доступ к логу событий чата, "
+"статистике чата, статистике сообщений в каналах, видеть участников "
+"канала, видеть анонимных администраторов в супергруппах и игнорировать "
+"медленный режим. Подразумевается любым другим правом администратора"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:49
+msgid ""
+"Pass True, if the administrator can manage voice chats For now, bots can "
+"use this privilege only for passing to other administrators."
+msgstr ""
+"Передайте True, если администратор может управлять голосовыми чатами. На "
+"текущий момент, боты могут использовать это право администратора только "
+"для передачи другим администраторам."
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:53
+msgid "Deprecated, use can_manage_video_chats."
+msgstr "Устарело, используйте can_manage_video_chats."
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:56
+msgid ""
+"Pass True if the user is allowed to create, rename, close, and reopen "
+"forum topics, supergroups only"
+msgstr ""
+"Передайте True, если пользователю разрешено создавать, переименовывать, "
+"закрывать, и возобновлять топики, только для супергрупп"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:60
+#, fuzzy
+msgid "Pass True if the administrator can create the channel's stories"
+msgstr ""
+"Передайте True, если администратор может создавать посты в канале, только"
+" для каналов"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:63
+#, fuzzy
+msgid "Pass True if the administrator can edit the channel's stories"
+msgstr ""
+"Передайте True, если администратор может изменять сообщения других "
+"пользователей, только для каналов"
+
+#: of telebot.async_telebot.AsyncTeleBot.promote_chat_member:66
+#, fuzzy
+msgid "Pass True if the administrator can delete the channel's stories"
+msgstr ""
+"Передайте True, если администратор может создавать посты в канале, только"
+" для каналов"
+
+#: of telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:1
+msgid "Registers callback query handler."
+msgstr "Регистрирует хендлер callback query."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:3
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:3
+msgid "function to be called"
+msgstr "функция-хендлер"
+
+#: of telebot.async_telebot.AsyncTeleBot.register_callback_query_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:18
+#: telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:18
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:21
+#: telebot.async_telebot.AsyncTeleBot.register_inline_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:21
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_poll_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:8
+#: telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:9
+msgid ""
+"True if you need to pass TeleBot instance to handler(useful for "
+"separating handlers into different files)"
+msgstr ""
+"True, если вам нужно передать экземпляр класса TeleBot в хендлер(удобно "
+"для разбиения кода на файлы)"
+
+#: of telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:1
+msgid "Registers channel post message handler."
+msgstr "Регистрирует хендлер постов в каналах."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:9
+#: telebot.async_telebot.AsyncTeleBot.register_message_handler:9
+msgid "list of commands"
+msgstr "список команд"
+
+#: of telebot.async_telebot.AsyncTeleBot.register_channel_post_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:12
+#: telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:12
+msgid "Regular expression"
+msgstr "Регулярное выражение"
+
+#: of telebot.async_telebot.AsyncTeleBot.register_chat_boost_handler:1
+#, fuzzy
+msgid "Registers chat boost handler."
+msgstr "Регистрирует хендлер смены состояний участников чата."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_chat_join_request_handler:1
+msgid "Registers chat join request handler."
+msgstr "Регистрирует хендлер запросов на вступление в чат."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:1
+msgid "Registers chat member handler."
+msgstr "Регистрирует хендлер смены состояний участников чата."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_chat_member_handler:14
+msgid ":return:None"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.register_chosen_inline_handler:1
+msgid "Registers chosen inline handler."
+msgstr "Регистрирует хендлер выбора результата inline query."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_edited_channel_post_handler:1
+msgid "Registers edited channel post message handler."
+msgstr "Регистрирует хендлер изменения постов в каналах."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:1
+msgid "Registers edited message handler."
+msgstr "Регистрирует хендлер изменения сообщений."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_edited_message_handler:18
+msgid "True for private chat"
+msgstr "True для приватных чатов"
+
+#: of telebot.async_telebot.AsyncTeleBot.register_inline_handler:1
+msgid "Registers inline handler."
+msgstr "Регистрирует хендлер inline query."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_message_handler:1
+msgid "Registers message handler."
+msgstr "Регистрирует хендлер сообщений."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_message_handler:18
+msgid "List of chat types"
+msgstr "Список видов чатов"
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.register_message_reaction_count_handler:1
+#, fuzzy
+msgid "Registers message reaction count handler."
+msgstr "Регистрирует хендлер сообщений."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_message_reaction_handler:1
+#, fuzzy
+msgid "Registers message reaction handler."
+msgstr "Регистрирует хендлер сообщений."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_my_chat_member_handler:1
+msgid "Registers my chat member handler."
+msgstr "Регистрирует хендлер изменений статуса бота."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_poll_answer_handler:1
+msgid "Registers poll answer handler."
+msgstr "Регистрирует хендлер ответов в опросах."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_poll_handler:1
+msgid "Registers poll handler."
+msgstr "Регистрирует хендлер изменений состояния опросов."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_pre_checkout_query_handler:1
+msgid "Registers pre-checkout request handler."
+msgstr "Регистрирует хендлер pre-checkout query."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_removed_chat_boost_handler:1
+#, fuzzy
+msgid "Registers removed chat boost handler."
+msgstr "Регистрирует хендлер изменений статуса бота."
+
+#: of telebot.async_telebot.AsyncTeleBot.register_shipping_query_handler:1
+msgid "Registers shipping query handler."
+msgstr "Регистрирует хендлер shipping query."
+
+#: of telebot.async_telebot.AsyncTeleBot.remove_webhook:1
+msgid "Alternative for delete_webhook but uses set_webhook"
+msgstr "Альтернатива delete_webhook, но использует set_webhook"
+
+#: of telebot.async_telebot.AsyncTeleBot.removed_chat_boost_handler:1
+#, fuzzy
+msgid ""
+"Handles new incoming chat boost state. it passes "
+":class:`telebot.types.ChatBoostRemoved` object."
+msgstr ""
+"Обрабатывает inline query. В качестве параметра, передаёт в декорируемую "
+"функцию объект :class:`telebot.types.InlineQuery`."
+
+#: of telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:1
+msgid ""
+"Use this method to reopen a closed topic in a forum supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the can_manage_topics administrator rights, unless it is the creator of "
+"the topic. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы возобновить закрытый топик в супергруппе с "
+"топиками. Бот должен быть администратором чата и иметь права "
+"администратора can_manage_topics, кроме случаев, когда бот является "
+"создателем топика. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reopenforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#reopenforumtopic"
+
+#: of telebot.async_telebot.AsyncTeleBot.reopen_forum_topic:10
+msgid "Identifier of the topic to reopen"
+msgstr "id топика для возобновления"
+
+#: of telebot.async_telebot.AsyncTeleBot.reopen_general_forum_topic:1
+msgid ""
+"Use this method to reopen the 'General' topic in a forum supergroup chat."
+" The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы возобновить топик 'General' в супергруппе с"
+" топиками. Бот должен быть администратором чата и иметь права "
+"администратора can_manage_topics, кроме случаев, когда бот является "
+"создателем топика. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.reopen_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reopengeneralforumtopic"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#reopengeneralforumtopic"
+
+#: of telebot.async_telebot.AsyncTeleBot.reply_to:1
+msgid ""
+"Convenience function for `send_message(message.chat.id, text, "
+"reply_to_message_id=message.message_id, **kwargs)`"
+msgstr ""
+"Удобная функция для замены `send_message(message.chat.id, text, "
+"reply_to_message_id=message.message_id, **kwargs)`"
+
+#: of telebot.async_telebot.AsyncTeleBot.reply_to:3
+msgid "Instance of :class:`telebot.types.Message`"
+msgstr "Экземпляр класса :class:`telebot.types.Message`"
+
+#: of telebot.async_telebot.AsyncTeleBot.reply_to:6
+msgid "Text of the message."
+msgstr "Текст сообщения."
+
+#: of telebot.async_telebot.AsyncTeleBot.reply_to:9
+msgid ""
+"Additional keyword arguments which are passed to "
+":meth:`telebot.TeleBot.send_message`"
+msgstr ""
+"Дополнительные именованные аргументы, передаваемые в "
+":meth:`telebot.TeleBot.send_message`"
+
+#: of telebot.async_telebot.AsyncTeleBot.reset_data:1
+msgid "Reset data for a user in chat."
+msgstr "Сбросить данные о пользователе в чате."
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:1
+msgid ""
+"Use this method to restrict a user in a supergroup. The bot must be an "
+"administrator in the supergroup for this to work and must have the "
+"appropriate admin rights. Pass True for all boolean parameters to lift "
+"restrictions from a user."
+msgstr ""
+"Используйте этот метод, чтобы ограничить пользователя в супергруппе. Бот "
+"должен быть администратором супергруппы и иметь соответствующие права "
+"администратора. Передайте True во все boolean параметры, чтобы снять с "
+"пользователя ограничения."
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#restrictchatmember"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#restrictchatmember"
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:8
+msgid ""
+"Individual parameters are deprecated and will be removed, use "
+"'permissions' instead"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:17
+msgid ""
+"Date when restrictions will be lifted for the user, unix time. If user is"
+" restricted for more than 366 days or less than 30 seconds from the "
+"current time, they are considered to be restricted forever"
+msgstr ""
+"Дата, когда ограничения будут сняты с пользователя, UNIX timestamp. Если "
+"пользователь ограничен более чем на 366 дней или менее чем на 30 секунд с"
+" текущего момента, он будет ограничен навсегда (пока ограничения не будут"
+" сняты вручную)"
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:22
+msgid ""
+"Pass True, if the user can send text messages, contacts, locations and "
+"venues"
+msgstr ""
+"Передайте True, если пользователь может отправлять текстовые сообщения, "
+"контакты, местоположения и места"
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:25
+msgid ""
+"Pass True, if the user can send audios, documents, photos, videos, video "
+"notes and voice notes, implies can_send_messages"
+msgstr ""
+"Передайте True, если пользователь может отправлять аудио, документы, "
+"фото, видео, видео заметки (кружочки) и аудио заметки (голосовые), "
+"подразумевает can_send_messages"
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:29
+msgid "Pass True, if the user is allowed to send polls, implies can_send_messages"
+msgstr ""
+"Передайте True, если пользователю разрешено отправлять опросы, "
+"подразумевает can_send_messages"
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:32
+msgid ""
+"Pass True, if the user can send animations, games, stickers and use "
+"inline bots, implies can_send_media_messages"
+msgstr ""
+"Передайте True, если пользователь может отправлять гифки, игры, стикеры и"
+" использовать inline ботов, подразумевает can_send_media_messages"
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:35
+msgid ""
+"Pass True, if the user may add web page previews to their messages, "
+"implies can_send_media_messages"
+msgstr ""
+"Передайте True, если пользователь может добавлять превью ссылок к своим "
+"сообщениям, подразумевает can_send_media_messages"
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:39
+msgid ""
+"Pass True, if the user is allowed to change the chat title, photo and "
+"other settings. Ignored in public supergroups"
+msgstr ""
+"Передайте True, если пользователю разрешено изменять название чата, "
+"аватарку и другие настройки. Игнорируется в публичных супергруппах"
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:43
+msgid ""
+"Pass True, if the user is allowed to invite new users to the chat, "
+"implies can_invite_users"
+msgstr "Передайте True, если пользователю разрешено приглашать пользователей в чат"
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:47
+msgid ""
+"Pass True, if the user is allowed to pin messages. Ignored in public "
+"supergroups"
+msgstr ""
+"Передайте True, если пользователю разрешено закреплять сообщения. "
+"Игнорируется в публичных супергруппах"
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:50
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions:14
+msgid ""
+"Pass True if chat permissions are set independently. Otherwise, the "
+"can_send_other_messages and can_add_web_page_previews permissions will "
+"imply the can_send_messages, can_send_audios, can_send_documents, "
+"can_send_photos, can_send_videos, can_send_video_notes, and "
+"can_send_voice_notes permissions; the can_send_polls permission will "
+"imply the can_send_messages permission."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:56
+msgid ""
+"Pass ChatPermissions object to set all permissions at once. Use this "
+"parameter instead of passing all boolean parameters to avoid backward "
+"compatibility problems in future."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.restrict_chat_member:60
+#: telebot.async_telebot.AsyncTeleBot.set_chat_permissions:20
+#: telebot.async_telebot.AsyncTeleBot.unban_chat_member:19
+msgid "True on success"
+msgstr "True в случае успеха"
+
+#: of telebot.async_telebot.AsyncTeleBot.retrieve_data:1
+msgid "Returns context manager with data for a user in chat."
+msgstr "Возвращает контекстный менеджер с данными о пользователе в чате."
+
+#: of telebot.async_telebot.AsyncTeleBot.retrieve_data:6
+msgid "Chat's unique identifier, defaults to user_id"
+msgstr "Уникальный id чата, по умолчанию user_id"
+
+#: of telebot.async_telebot.AsyncTeleBot.retrieve_data:9
+msgid "Context manager with data for a user in chat"
+msgstr "Контекстный менеджер с данными о пользователе в чате."
+
+#: of telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:1
+msgid ""
+"Use this method to revoke an invite link created by the bot. Note: If the"
+" primary link is revoked, a new link is automatically generated The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate admin rights."
+msgstr ""
+"Используйте этот метод, чтобы аннулировать ссылку-приглашение, созданную "
+"ботом. Примечание: Если аннулируется главная ссылка-приглашение, "
+"автоматически генерируется новая. Бот должен быть администратором чата и "
+"иметь соответствующие права администратора."
+
+#: of telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#revokechatinvitelink"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#revokechatinvitelink"
+
+#: of telebot.async_telebot.AsyncTeleBot.revoke_chat_invite_link:11
+msgid "The invite link to revoke"
+msgstr "Ссылка-приглашение, которую нужно аннулировать"
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:1
+msgid "This class sets webhooks and listens to a given url and port."
+msgstr "Этот класс устанавливает вебхуки и мониторит указанный URL и порт."
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:3
+msgid "IP address to listen to. Defaults to 0.0.0.0"
+msgstr "IP адрес для мониторинга. По умолчанию 0.0.0.0"
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:4
+msgid "A port which will be used to listen to webhooks."
+msgstr "Порт, который будет использован для мониторинга вебхуков."
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:5
+msgid "Path to the webhook. Defaults to /token"
+msgstr "Путь к вебхуку. По умолчанию /token."
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:6
+msgid "Path to the certificate file."
+msgstr "Путь к файлу с SSL сертификатом."
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:7
+msgid "Path to the certificate key file."
+msgstr "Путь к файлу с приватным ключом SSL сертификата."
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:8
+msgid "Webhook URL."
+msgstr "URL вебхука."
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:9
+msgid ""
+"Maximum allowed number of simultaneous HTTPS connections to the webhook "
+"for update delivery, 1-100. Defaults to 40. Use lower values to limit the"
+" load on your bot's server, and higher values to increase your bot's "
+"throughput."
+msgstr ""
+"Максимально-допустимое количество одновременных HTTPS подключений к "
+"вебхуку для доставки апдейтов, 1-100. По умолчанию 40. Используйте "
+"меньшие значения, чтобы уменьшить нагрузку на ваш сервер и большие "
+"значения для увеличения пропускной способности вашего бота."
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:10
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all updates "
+"regardless of type (default). If not specified, the previous setting will"
+" be used."
+msgstr ""
+"Список видов апдейтов, которые вы хотите получать, в формате JSON. "
+"Например, укажите [“message”, “edited_channel_post”, “callback_query”], "
+"чтобы получать апдейты только этих видов. Полный список доступных видов "
+"апдейтов - util.update_types. Укажите пустой список, чтобы получать все "
+"апдейты, кроме chat_member (по умолчанию). Если не задан, будет "
+"использована последняя настройка."
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:11
+msgid ""
+"The fixed IP address which will be used to send webhook requests instead "
+"of the IP address resolved through DNS"
+msgstr ""
+"Фиксированный IP адрес, который будет использоваться для отправки "
+"запросов к вебхуку вместо IP адреса, полученного через DNS"
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:12
+msgid "Pass True to drop all pending updates"
+msgstr "Передайте True, чтобы проигнорировать все апдейты, полученные до запуска"
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:13
+msgid "Integer. Request connection timeout"
+msgstr "Integer. Тайм-аут запроса на подключение."
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:14
+msgid "Secret token to be used to verify the webhook request."
+msgstr "Секретный токен для верификации запроса к вебхуку."
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:15
+#, fuzzy
+msgid "Length of a secret token, defaults to 20"
+msgstr "Тайм-аут запроса, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.run_webhooks:16
+#, fuzzy
+msgid "Debug mode, defaults to False"
+msgstr "Глобальный parse_mode, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:1
+msgid ""
+"Use this method to send animation files (GIF or H.264/MPEG-4 AVC video "
+"without sound). On success, the sent Message is returned. Bots can "
+"currently send animation files of up to 50 MB in size, this limit may be "
+"changed in the future."
+msgstr ""
+"Используйте этот метод, чтобы отправить гифку (GIF или H.264/MPEG-4 AVC "
+"видео без звука). В случае успеха, возвращается отправленное сообщение "
+"(Message). На текущий момент, боты могут отправлять гифки весом до 50 MB,"
+" это ограничение может измениться в будущем."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendanimation"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendanimation"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:9
+msgid ""
+"Animation to send. Pass a file_id as String to send an animation that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get an animation from the Internet, or upload a "
+"new animation using multipart/form-data."
+msgstr ""
+"Гиф-ка для отправки. Передайте file_id (String), чтобы отправить гифку, "
+"которая уже загружена на сервера Telegram (рекомендуется), передайте HTTP"
+" URL (String), чтобы отправить гифку из интернета или загрузите новую "
+"гифку с помощью multipart/form-data."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:13
+msgid "Duration of sent animation in seconds"
+msgstr "Длительность отправленной гифки в секундах"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:16
+msgid "Animation width"
+msgstr "Ширина гифки"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:19
+msgid "Animation height"
+msgstr "Высота гифки"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:22
+#: telebot.async_telebot.AsyncTeleBot.send_video:20
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:33
+msgid ""
+"Thumbnail of the file sent; can be ignored if thumbnail generation for "
+"the file is supported server-side. The thumbnail should be in JPEG format"
+" and less than 200 kB in size. A thumbnail's width and height should not "
+"exceed 320. Ignored if the file is not uploaded using multipart/form-"
+"data. Thumbnails can't be reused and can be only uploaded as a new file, "
+"so you can pass “attach://” if the thumbnail was "
+"uploaded using multipart/form-data under ."
+msgstr ""
+"Обложка отправленного файла; может быть проигнорирована, если генерация "
+"обложки поддерживается на стороне сервера. Обложка должна быть картинкой "
+"в формате JPEG и весить менее 200 kB. Ширина и высота обложки не должны "
+"превышать 320. Игнорируется, если файл не загружен с помощью multipart"
+"/form-data. Обложки не могут быть использованы повторно и могут быть "
+"загружены только как новый файл, так что вы можете передать "
+"“attach://” если обложка была загружена с помощью "
+"multipart/form-data под именем ."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:28
+msgid ""
+"Animation caption (may also be used when resending animation by file_id),"
+" 0-1024 characters after entities parsing"
+msgstr ""
+"Подпись к гифке (может быть использована при повторной отправке гифки по "
+"file_id), 0-1024 символа после форматирования"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:31
+msgid "Mode for parsing entities in the animation caption"
+msgstr "Режим форматирования подписи к гифке"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:51
+#: telebot.async_telebot.AsyncTeleBot.send_video:29
+msgid ""
+"List of special entities that appear in the caption, which can be "
+"specified instead of parse_mode"
+msgstr ""
+"Список отформатированных частей подписи, можно использовать вместо "
+"parse_mode"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:57
+#: telebot.async_telebot.AsyncTeleBot.send_video:58
+msgid "Identifier of a message thread, in which the video will be sent"
+msgstr "id топика, в который будет отправлено видео"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:60
+msgid "Pass True, if the animation should be sent as a spoiler"
+msgstr "Передайте True, если гифку нужно отправить как спойлер"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_animation:63
+#: telebot.async_telebot.AsyncTeleBot.send_audio:63
+#: telebot.async_telebot.AsyncTeleBot.send_document:56
+#: telebot.async_telebot.AsyncTeleBot.send_video:64
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:48
+msgid "Deprecated. Use thumbnail instead"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:1
+msgid ""
+"Use this method to send audio files, if you want Telegram clients to "
+"display them in the music player. Your audio must be in the .MP3 or .M4A "
+"format. On success, the sent Message is returned. Bots can currently send"
+" audio files of up to 50 MB in size, this limit may be changed in the "
+"future."
+msgstr ""
+"Используйте этот метод, чтобы отправить аудио, если вы хотите, чтобы "
+"клиенты (приложения) Telegram проигрывали их в музыкальном проигрывателе."
+" Ваше аудио должно быть в формате .MP3 или .M4A. В случае успеха, "
+"возвращается отправленное сообщение (Message). На текущий момент, боты "
+"могут отправлять аудио весом до 50 MB, это ограничение может измениться в"
+" будущем."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:5
+msgid "For sending voice messages, use the send_voice method instead."
+msgstr "Для отправки голосовых сообщений, используйте метод send_voice"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendaudio"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendaudio"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:12
+msgid ""
+"Audio file to send. Pass a file_id as String to send an audio file that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get an audio file from the Internet, or upload a "
+"new one using multipart/form-data. Audio must be in the .MP3 or .M4A "
+"format."
+msgstr ""
+"Аудио для отправки. Передайте file_id (String), чтобы отправить аудио, "
+"которое уже загружено на сервера Telegram (рекомендуется), передайте HTTP"
+" URL (String), чтобы отправить аудио из интернета или загрузите новое с "
+"помощью multipart/form-data. Аудио должно быть в формате .MP3 или .M4A."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:17
+msgid "Audio caption, 0-1024 characters after entities parsing"
+msgstr "Подпись к аудио, 0-1024 символа после форматирования"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:20
+msgid "Duration of the audio in seconds"
+msgstr "Длительность аудио в секундах"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:23
+msgid "Performer"
+msgstr "Исполнитель"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:26
+msgid "Track name"
+msgstr "Название трека"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:36
+msgid ""
+"Mode for parsing entities in the audio caption. See formatting options "
+"for more details."
+msgstr ""
+"Режим форматирования подписи к аудио. См. formatting options для "
+"получения подробностей."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:45
+msgid ""
+"Thumbnail of the file sent; can be ignored if thumbnail generation for "
+"the file is supported server-side. The thumbnail should be in JPEG format"
+" and less than 200 kB in size. A thumbnail's width and height should not "
+"exceed 320. Ignored if the file is not uploaded using multipart/form-"
+"data. Thumbnails can't be reused and can be only uploaded as a new file, "
+"so you can pass “attach://” if the thumbnail was "
+"uploaded using multipart/form-data under "
+msgstr ""
+"Обложка отправленного файла; может быть проигнорирована, если генерация "
+"обложки поддерживается на стороне сервера. Обложка должна быть картинкой "
+"в формате JPEG и весить менее 200 kB. Ширина и высота обложки не должны "
+"превышать 320. Игнорируется, если файл не загружен с помощью multipart"
+"/form-data. Обложки не могут быть использованы повторно и могут быть "
+"загружены только как новый файл, так что вы можете передать "
+"“attach://” если обложка была загружена с помощью "
+"multipart/form-data под именем ."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_audio:51
+#: telebot.async_telebot.AsyncTeleBot.send_document:35
+#: telebot.async_telebot.AsyncTeleBot.send_photo:19
+#: telebot.async_telebot.AsyncTeleBot.send_voice:37
+msgid ""
+"A JSON-serialized list of special entities that appear in the caption, "
+"which can be specified instead of parse_mode"
+msgstr ""
+"Список отформатированных частей подписи в формате JSON, можно "
+"использовать вместо parse_mode"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_chat_action:1
+msgid ""
+"Use this method when you need to tell the user that something is "
+"happening on the bot's side. The status is set for 5 seconds or less "
+"(when a message arrives from your bot, Telegram clients clear its typing "
+"status). Returns True on success."
+msgstr ""
+"Используйте этот метод, когда вам нужно показать пользователю, что бот "
+"что-то делает. Статус устанавливается на 5 секунд или менее (когда от "
+"бота приходит сообщение, клиенты (приложения) Telegram убирают статус "
+"typing). Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_chat_action:5
+msgid ""
+"Example: The ImageBot needs some time to process a request and upload the"
+" image. Instead of sending a text message along the lines of “Retrieving "
+"image, please wait…”, the bot may use sendChatAction with action = "
+"upload_photo. The user will see a “sending photo” status for the bot."
+msgstr ""
+"Пример: ImageBot-у требуется время, чтобы обработать запрос и загрузить "
+"изображение. Вместо отправки текстового сообщения “Отправка изображения, "
+"пожалуйста подождите…”, бот может использовать sendChatAction с "
+"параметром action = upload_photo. Пользователь увидит статус бота "
+"“sending photo”."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_chat_action:8
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendchataction"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendchataction"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_chat_action:13
+msgid ""
+"Type of action to broadcast. Choose one, depending on what the user is "
+"about to receive: typing for text messages, upload_photo for photos, "
+"record_video or upload_video for videos, record_voice or upload_voice for"
+" voice notes, upload_document for general files, choose_sticker for "
+"stickers, find_location for location data, record_video_note or "
+"upload_video_note for video notes."
+msgstr ""
+"Тип действия. Выберите один, в зависимости от того, что получит "
+"пользователь: typing для текстовых сообщений, upload_photo для фото, "
+"record_video или upload_video для видео, record_voice или upload_voice "
+"для голосовых сообщений, upload_document для файлов, choose_sticker для "
+"стикеров, find_location для данных о местоположении, record_video_note "
+"или upload_video_note для видео заметок (кружочков)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_chat_action:22
+msgid "The thread to which the message will be sent(supergroups only)"
+msgstr "id топика, в который сообщение будет отправлено(только для супергрупп)"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:1
+msgid ""
+"Use this method to send phone contacts. On success, the sent Message is "
+"returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить контакт. В случае успеха, "
+"возвращается отправленное сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendcontact"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendcontact"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:8
+msgid "Contact's phone number"
+msgstr "Телефонный номер контакта"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:11
+msgid "Contact's first name"
+msgstr "Имя контакта"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:14
+msgid "Contact's last name"
+msgstr "Фамилия контакта"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:17
+msgid "Additional data about the contact in the form of a vCard, 0-2048 bytes"
+msgstr "Дополнительные данные о контакте в формате vCard, 0-2048 байт"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:34
+#: telebot.async_telebot.AsyncTeleBot.send_game:23
+#: telebot.async_telebot.AsyncTeleBot.send_venue:41
+msgid ""
+"Pass True, if the message should be sent even if one of the specified "
+"replied-to messages is not found."
+msgstr ""
+"Передайте True, если сообщение должно быть отправлено даже если одно из "
+"сообщений, на которые нужно ответить, не найдено."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_contact:41
+#: telebot.async_telebot.AsyncTeleBot.send_venue:54
+msgid "The thread to which the message will be sent"
+msgstr "Топик, в который сообщение будет отправлено"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_dice:1
+msgid ""
+"Use this method to send an animated emoji that will display a random "
+"value. On success, the sent Message is returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить анимированный эмодзи, который "
+"покажет случайное значение. В случае успеха, возвращается отправленное "
+"сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_dice:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#senddice"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#senddice"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_dice:8
+msgid ""
+"Emoji on which the dice throw animation is based. Currently, must be one "
+"of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯”"
+" and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults "
+"to “🎲”"
+msgstr ""
+"Эмодзи, на котором основана анимация. На текущий момент, должно быть "
+"одним из “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, или “🎰”. Значение может быть 1-6 для "
+"“🎲”, “🎯” и “🎳”, 1-5 для “🏀” и “⚽”, и 1-64 для “🎰”. По умолчанию “🎲”"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_dice:29
+msgid "Protects the contents of the sent message from forwarding"
+msgstr "Защищает содержимое отправленного сообщения от пересылки"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_dice:32
+msgid ""
+"The identifier of a message thread, unique within the chat to which the "
+"message with the thread identifier belongs"
+msgstr "id топика, в который сообщение будет отправлено"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:1
+msgid "Use this method to send general files."
+msgstr "Используйте этот метод, чтобы отправить файл."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#senddocument"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#senddocument"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:8
+msgid ""
+"(document) File to send. Pass a file_id as String to send a file that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get a file from the Internet, or upload a new one "
+"using multipart/form-data"
+msgstr ""
+"(документ) Файл для отправки. Передайте file_id (String), чтобы отправить"
+" файл, который уже загружен на сервера Telegram (рекомендуется), "
+"передайте HTTP URL (String), чтобы отправить файл из интернета или "
+"загрузите новый с помощью multipart/form-data"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:15
+msgid ""
+"Document caption (may also be used when resending documents by file_id), "
+"0-1024 characters after entities parsing"
+msgstr ""
+"Подпись к файлу (может быть использована при повторной отправке файла по "
+"file_id), 0-1024 символа после форматирования"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:23
+msgid "Mode for parsing entities in the document caption"
+msgstr "Режим форматирования частей подписи к файлу"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:32
+msgid ""
+"InputFile or String : Thumbnail of the file sent; can be ignored if "
+"thumbnail generation for the file is supported server-side. The thumbnail"
+" should be in JPEG format and less than 200 kB in size. A thumbnail's "
+"width and height should not exceed 320. Ignored if the file is not "
+"uploaded using multipart/form-data. Thumbnails can't be reused and can be"
+" only uploaded as a new file, so you can pass "
+"“attach://” if the thumbnail was uploaded using "
+"multipart/form-data under "
+msgstr ""
+"InputFile или String : Обложка отправленного файла; может быть "
+"проигнорирована, если генерация обложки поддерживается на стороне "
+"сервера. Обложка должна быть картинкой в формате JPEG и весить менее 200 "
+"kB. Ширина и высота обложки не должны превышать 320. Игнорируется, если "
+"файл не загружен с помощью multipart/form-data. Обложки не могут быть "
+"использованы повторно и могут быть загружены только как новый файл, так "
+"что вы можете передать “attach://” если обложка была "
+"загружена с помощью multipart/form-data под именем ."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:41
+msgid ""
+"allows to define file name that will be visible in the Telegram instead "
+"of original file name"
+msgstr ""
+"позволяет задать имя файла, которое будет показано в Telegram вместо "
+"настоящего"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:44
+msgid ""
+"Disables automatic server-side content type detection for files uploaded "
+"using multipart/form-data"
+msgstr ""
+"Отключает автоматическое обнаружение типа файла на стороне сервера для "
+"файлов, загруженных с помощью multipart/form-data"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_document:47
+#: telebot.async_telebot.AsyncTeleBot.send_sticker:33
+#: telebot.async_telebot.AsyncTeleBot.send_video:55
+msgid "function typo miss compatibility: do not use it"
+msgstr "опечатка: не используйте"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:1
+msgid "Used to send the game."
+msgstr "Используется для отправки игры."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendgame"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendgame"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:8
+msgid ""
+"Short name of the game, serves as the unique identifier for the game. Set"
+" up your games via @BotFather."
+msgstr ""
+"Короткое имя игры, служит в качестве уникального id игры. Настройте свои "
+"игрычерез @BotFather."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:20
+msgid "Timeout in seconds for waiting for a response from the bot."
+msgstr "Тайм-аут в секундах, ожидание ответа от бота."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:26
+msgid ""
+"Pass True, if content of the message needs to be protected from being "
+"viewed by the bot."
+msgstr ""
+"Передайте True, если содержимое сообщение должно быть защищено от "
+"просмотра ботом."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:29
+msgid "Identifier of the thread to which the message will be sent."
+msgstr "id топика, в которые будет сообщение будет отправлено."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_game:36
+#: telebot.async_telebot.AsyncTeleBot.send_invoice:105
+#: telebot.async_telebot.AsyncTeleBot.send_poll:74
+msgid ":obj:`types.Message`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:1
+msgid "Sends invoice."
+msgstr "Отправляет инвойс."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendinvoice"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendinvoice"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:5
+msgid "Unique identifier for the target private chat"
+msgstr "Уникальный id приватного чата"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:29
+msgid ""
+"Unique deep-linking parameter that can be used to generate this invoice "
+"when used as a start parameter"
+msgstr ""
+"Уникальный deep-linking параметр, который может быть использован для "
+"генерации этого инвойса при использовании в качестве параметра /start"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:33
+msgid ""
+"URL of the product photo for the invoice. Can be a photo of the goods or "
+"a marketing image for a service. People like it better when they see what"
+" they are paying for."
+msgstr ""
+"URL фото продукта. Может быть фото товаров или рекламным изображением "
+"сервиса. Людям больше нравится, когда они видят, за что платят."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:73
+msgid ""
+"A JSON-serialized object for an inline keyboard. If empty, one 'Pay total"
+" price' button will be shown. If not empty, the first button must be a "
+"Pay button"
+msgstr ""
+"JSON-сериализованный объект inline клавиатуры. Если пустой, будет "
+"показана одна кнопка 'Pay total price'. Если не пустой, первая кнопка "
+"должна быть кнопкой для оплаты"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:81
+#: telebot.async_telebot.AsyncTeleBot.set_webhook:39
+msgid "Timeout of a request, defaults to None"
+msgstr "Тайм-аут запроса, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_invoice:98
+msgid ""
+"The identifier of a message thread, in which the invoice message will be "
+"sent"
+msgstr "id топика, в который будет отправлен инвойс"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:1
+msgid ""
+"Use this method to send point on the map. On success, the sent Message is"
+" returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить точку на карте. В случае успеха, "
+"возвращается отправленное сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendlocation"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendlocation"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:8
+msgid "Latitude of the location"
+msgstr "Широта"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:11
+msgid "Longitude of the location"
+msgstr "Долгота"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:14
+msgid ""
+"Period in seconds for which the location will be updated (see Live "
+"Locations, should be between 60 and 86400."
+msgstr ""
+"Время в секундах, в течение которого местоположение будет обновляться "
+"(см. Live Locations), должно быть между 60 и 86400."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:34
+msgid ""
+"For live locations, a direction in which the user is moving, in degrees. "
+"Must be between 1 and 360 if specified."
+msgstr ""
+"Для live местоположений, направление, в котором пользователь двигается, в"
+" градусах. Должно быть между 1 и 360, если указано."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_location:37
+msgid ""
+"For live locations, a maximum distance for proximity alerts about "
+"approaching another chat member, in meters. Must be between 1 and 100000 "
+"if specified."
+msgstr ""
+"Для live местоположений, максимальное расстояние для уведомлений о "
+"приближении другого участника чата, в метрах. Должно быть между 1 и "
+"100000, если указано."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_media_group:1
+msgid ""
+"Use this method to send a group of photos, videos, documents or audios as"
+" an album. Documents and audio files can be only grouped in an album with"
+" messages of the same type. On success, an array of Messages that were "
+"sent is returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить группу фото, видео, файлов или "
+"аудио как альбом. Файлы и аудио могут быть сгруппированы в альбом только "
+"с сообщениями того же типа. В случае успеха, возвращается массив "
+"отправленных сообщений (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_media_group:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendmediagroup"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendmediagroup"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_media_group:9
+msgid ""
+"A JSON-serialized array describing messages to be sent, must include 2-10"
+" items"
+msgstr ""
+"JSON-сериализованный массив, описывающий сообщения для отправки, должен "
+"включать от 2 до 10 элементов"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_media_group:12
+msgid ""
+"Sends the messages silently. Users will receive a notification with no "
+"sound."
+msgstr ""
+"Отправить сообщение, при получении которого пользователя пользователи "
+"получат уведомление без звука."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_media_group:33
+msgid "On success, an array of Messages that were sent is returned."
+msgstr "В случае успеха, возвращается массив отправленных сообщений (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:1
+msgid "Use this method to send text messages."
+msgstr "Используйте этот метод, чтобы отправлять текстовые сообщения."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:3
+msgid ""
+"Warning: Do not send more than about 4096 characters each message, "
+"otherwise you'll risk an HTTP 414 error. If you must send more than 4096 "
+"characters, use the `split_string` or `smart_split` function in util.py."
+msgstr ""
+"Предупреждение: Не отправляйте больше 4096 символов в одном сообщении, "
+"иначе вы рискуете получить ошибку HTTP 414. Если вам нужно отправить "
+"больше 4096 символов, используйте функцию `split_string` или "
+"`smart_split` из util.py."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendmessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendmessage"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:12
+msgid "Text of the message to be sent"
+msgstr "Текст сообщения для отправки"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:18
+msgid ""
+"List of special entities that appear in message text, which can be "
+"specified instead of parse_mode"
+msgstr ""
+"Список отформатированных частей в тексте сообщения, можно использовать "
+"вместо parse_mode"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:27
+msgid ""
+"If True, the message content will be hidden for all users except for the "
+"target user"
+msgstr ""
+"Если True, содержимое сообщения будет скрыто от всех пользователей, кроме"
+" заданного"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_message:49
+msgid "Options for previewing links."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:1
+msgid "Use this method to send photos. On success, the sent Message is returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить фото. В случае успеха, "
+"возвращается отправленное сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendphoto"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendphoto"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:8
+msgid ""
+"Photo to send. Pass a file_id as String to send a photo that exists on "
+"the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a photo from the Internet, or upload a new photo using "
+"multipart/form-data. The photo must be at most 10 MB in size. The photo's"
+" width and height must not exceed 10000 in total. Width and height ratio "
+"must be at most 20."
+msgstr ""
+"Фото для отправки. Передайте file_id (String), чтобы отправить фото, "
+"которое уже загружено на сервера Telegram (рекомендуется), передайте HTTP"
+" URL (String), чтобы отправить фото из интернета или загрузите новое с "
+"помощью multipart/form-data. Фото должно весить не более 10 MB. Ширина и "
+"высота фото не должны суммарно превышать 10000. Отношение ширины и высоты"
+" должно быть не более 20."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:13
+msgid ""
+"Photo caption (may also be used when resending photos by file_id), 0-1024"
+" characters after entities parsing"
+msgstr ""
+"Подпись к фото (может быть использована при повторной отправке файла по "
+"file_id), 0-1024 символа после форматирования"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:16
+msgid "Mode for parsing entities in the photo caption."
+msgstr "Режим форматирования подписи к фото."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_photo:45
+msgid "Pass True, if the photo should be sent as a spoiler"
+msgstr "Передайте True, если фото должно быть отправлено как спойлер"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:1
+msgid ""
+"Use this method to send a native poll. On success, the sent Message is "
+"returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить опрос. В случае успеха, "
+"возвращается отправленное сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendpoll"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendpoll"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:9
+msgid "Poll question, 1-300 characters"
+msgstr "Тема опроса, 1-300 символов"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:12
+msgid ""
+"A JSON-serialized list of answer options, 2-10 strings 1-100 characters "
+"each"
+msgstr "JSON-сериализованный список вариантов ответа, 2-10 строк по 1-100 символов"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:15
+msgid "True, if the poll needs to be anonymous, defaults to True"
+msgstr "True, если опрос должен быть анонимным, по умолчанию True"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:18
+msgid "Poll type, “quiz” or “regular”, defaults to “regular”"
+msgstr "Вид опроса, “quiz” или “regular”, по умолчанию “regular”"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:21
+msgid ""
+"True, if the poll allows multiple answers, ignored for polls in quiz "
+"mode, defaults to False"
+msgstr ""
+"True, если опрос позволяет выбрать несколько вариантов ответа, "
+"игнорируется в опросах вида “quiz”, по умолчанию False"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:24
+msgid ""
+"0-based identifier of the correct answer option. Available only for polls"
+" in quiz mode, defaults to None"
+msgstr ""
+"Индекс правильного варианта ответа, начиная с 0. Доступно только для "
+"опросов вида “quiz”, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:28
+msgid ""
+"Text that is shown when a user chooses an incorrect answer or taps on the"
+" lamp icon in a quiz-style poll, 0-200 characters with at most 2 line "
+"feeds after entities parsing"
+msgstr ""
+"Текст, который будет показан при выборе неправильно варианта ответа или "
+"нажатии на иконку лампочки в опросах вида “quiz”, 0-200 символов и не "
+"более 2 строк после форматирования"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:32
+msgid ""
+"Mode for parsing entities in the explanation. See formatting options for "
+"more details."
+msgstr ""
+"Режим форматирования explanation. См. formatting options для получения "
+"подробностей."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:35
+msgid ""
+"Amount of time in seconds the poll will be active after creation, 5-600. "
+"Can't be used together with close_date."
+msgstr ""
+"Время в секундах, в течение которого опрос будет активен, 5-600. Нельзя "
+"использовать вместо с close_date."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:38
+msgid "Point in time (Unix timestamp) when the poll will be automatically closed."
+msgstr "Время (UNIX timestamp), когда опрос будет автоматически завершен."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:41
+msgid ""
+"Pass True, if the poll needs to be immediately closed. This can be useful"
+" for poll preview."
+msgstr ""
+"Передайте True, если опрос должен быть завершен немедленно. Может быть "
+"полезно для предпросмотра опроса."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:50
+msgid "Pass True, if the poll allows multiple options to be voted simultaneously."
+msgstr ""
+"Передайте True, если опрос позволяет выбрать несколько вариантов "
+"одновременно."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:57
+msgid "Timeout in seconds for waiting for a response from the user."
+msgstr "Тайм-аут в секундах, ожидание ответа от пользователя."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:60
+msgid ""
+"A JSON-serialized list of special entities that appear in the "
+"explanation, which can be specified instead of parse_mode"
+msgstr ""
+"JSON-сериализованный список отформатированных частей explanation, можно "
+"использовать вместо parse_mode"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_poll:67
+msgid "The identifier of a message thread, in which the poll will be sent"
+msgstr "id топика, в который будет отправлен опрос"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_sticker:1
+msgid ""
+"Use this method to send static .WEBP, animated .TGS, or video .WEBM "
+"stickers. On success, the sent Message is returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить статичный .WEBP, анимированный "
+".TGS, или видео .WEBM стикер. В случае успеха возвращает отправленное "
+"сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_sticker:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendsticker"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendsticker"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_sticker:9
+msgid ""
+"Sticker to send. Pass a file_id as String to send a file that exists on "
+"the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a .webp file from the Internet, or upload a new one using"
+" multipart/form-data."
+msgstr ""
+"Стикер для отправки. Передайте file_id (String), чтобы отправить файл, "
+"который уже загружен на сервера Telegram (рекомендуется), передайте HTTP "
+"URL (String), чтобы отправить .webp файл из интернета или загрузите новый"
+" с помощью multipart/form-data."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_sticker:21
+msgid "to disable the notification"
+msgstr "отключить уведомление"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_sticker:39
+msgid "Emoji associated with the sticker; only for just uploaded stickers"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:1
+msgid ""
+"Use this method to send information about a venue. On success, the sent "
+"Message is returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить информацию о месте. В случае "
+"успеха возвращается отправленное сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvenue"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendvenue"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:8
+msgid "Latitude of the venue"
+msgstr "Широта"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:11
+msgid "Longitude of the venue"
+msgstr "Долгота"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:14
+msgid "Name of the venue"
+msgstr "Название места"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:17
+msgid "Address of the venue"
+msgstr "Адрес места"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:20
+msgid "Foursquare identifier of the venue"
+msgstr "id места на Foursquare"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:23
+msgid ""
+"Foursquare type of the venue, if known. (For example, "
+"“arts_entertainment/default”, “arts_entertainment/aquarium” or "
+"“food/icecream”.)"
+msgstr ""
+"Тип места на Foursquare, если известен. (Например, "
+"“arts_entertainment/default”, “arts_entertainment/aquarium” или "
+"“food/icecream”.)"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:45
+msgid "Google Places identifier of the venue"
+msgstr "id места на Google Places"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_venue:48
+msgid "Google Places type of the venue."
+msgstr "Тип места на Google Places."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:1
+msgid ""
+"Use this method to send video files, Telegram clients support mp4 videos "
+"(other formats may be sent as Document)."
+msgstr ""
+"Используйте этот метод, чтобы отправить видео, клиенты (приложения) "
+"Telegram поддерживают mp4 видео (другие форматы могут быть отправлены как"
+" Document)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvideo"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendvideo"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:8
+msgid ""
+"Video to send. You can either pass a file_id as String to resend a video "
+"that is already on the Telegram servers, or upload a new video file using"
+" multipart/form-data."
+msgstr ""
+"Видео для отправки. Передайте file_id (String), чтобы отправить видео, "
+"которое уже загружено на сервера Telegram или загрузите новое с помощью "
+"multipart/form-data."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:11
+#: telebot.async_telebot.AsyncTeleBot.send_video_note:13
+msgid "Duration of sent video in seconds"
+msgstr "Длительность отправленного видео в секундах"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:14
+msgid "Video width"
+msgstr "Ширина видео"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:17
+msgid "Video height"
+msgstr "Высота видео"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:23
+msgid ""
+"Video caption (may also be used when resending videos by file_id), 0-1024"
+" characters after entities parsing"
+msgstr ""
+"Подпись к видео (может быть использована при повторной отправке файла по "
+"file_id), 0-1024 символа после форматирования"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:26
+msgid "Mode for parsing entities in the video caption"
+msgstr "Режим форматирования подписи к видео"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:32
+msgid "Pass True, if the uploaded video is suitable for streaming"
+msgstr "Передайте True, если загруженное видео подходит для стриминга"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video:61
+msgid "Pass True, if the video should be sent as a spoiler"
+msgstr "Передайте True, если видео должно быть отправлено как спойлер"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video_note:1
+msgid ""
+"As of v.4.0, Telegram clients support rounded square MPEG4 videos of up "
+"to 1 minute long. Use this method to send video messages. On success, the"
+" sent Message is returned."
+msgstr ""
+"Начиная с версии v.4.0, клиенты(приложения) Telegram поддерживают "
+"скругленные квадратные MPEG4 видео длительностью до минуты. Используйте "
+"этот метод, чтобы отправить видео заметку (кружочек). В случае успеха "
+"возвращается отправленное сообщение (Message)."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video_note:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvideonote"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendvideonote"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video_note:9
+msgid ""
+"Video note to send. Pass a file_id as String to send a video note that "
+"exists on the Telegram servers (recommended) or upload a new video using "
+"multipart/form-data. Sending video notes by a URL is currently "
+"unsupported"
+msgstr ""
+"Видео заметка для отправки. Передайте file_id (String), чтобы отправить "
+"видео заметку, которая уже загружена на сервера Telegram или загрузите "
+"новую с помощью multipart/form-data. На текущий момент, отправка видео "
+"заметок по URL не поддерживается"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video_note:16
+msgid "Video width and height, i.e. diameter of the video message"
+msgstr "Ширина и высота видео (диаметр видео сообщения)"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_video_note:45
+msgid "Identifier of a message thread, in which the video note will be sent"
+msgstr "id топика, в который будет отправлена видео заметка"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:1
+msgid ""
+"Use this method to send audio files, if you want Telegram clients to "
+"display the file as a playable voice message. For this to work, your "
+"audio must be in an .OGG file encoded with OPUS (other formats may be "
+"sent as Audio or Document). On success, the sent Message is returned. "
+"Bots can currently send voice messages of up to 50 MB in size, this limit"
+" may be changed in the future."
+msgstr ""
+"Используйте этот метод, чтобы отправить голосовое сообщение. Ваше аудио "
+"должно быть в формате .OGG и закодировано с помощью OPUS (другие форматы "
+"можно отправить как Audio или Document). В случае успеха возвращается "
+"отправленное сообщение (Message). На текущий момент, боты могут "
+"отправлять голосовые сообщения весом до 50 MB, это ограничение может быть"
+" изменено в будущем."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvoice"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendvoice"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:10
+msgid ""
+"Audio file to send. Pass a file_id as String to send a file that exists "
+"on the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a file from the Internet, or upload a new one using "
+"multipart/form-data."
+msgstr ""
+"Аудио для отправки. Передайте file_id (String), чтобы отправить аудио, "
+"которое уже загружено на сервера Telegram (рекомендуется), передайте HTTP"
+" URL (String), чтобы отправить аудио из интернета или загрузите новое с "
+"помощью multipart/form-data."
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:14
+msgid "Voice message caption, 0-1024 characters after entities parsing"
+msgstr "Подпись к голосовому сообщению, 0-1024 символа после форматирования"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:17
+msgid "Duration of the voice message in seconds"
+msgstr "Длительность голосового сообщения в секундах"
+
+#: of telebot.async_telebot.AsyncTeleBot.send_voice:28
+msgid ""
+"Mode for parsing entities in the voice message caption. See formatting "
+"options for more details."
+msgstr ""
+"Режим форматирования подписи к голосовому сообщению. См. formatting "
+"options для получения подробностей."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:1
+msgid ""
+"Use this method to set a custom title for an administrator in a "
+"supergroup promoted by the bot. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы задать кастомное звание администратора "
+"супергруппы, повышенного ботом. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatadministratorcustomtitle"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatadministratorcustomtitle"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_administrator_custom_title:13
+msgid ""
+"New custom title for the administrator; 0-16 characters, emoji are not "
+"allowed"
+msgstr "Новое кастомное звание администратора; 0-16 символов, эмодзи не разрешены"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_description:1
+msgid ""
+"Use this method to change the description of a supergroup or a channel. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights."
+msgstr ""
+"Используйте этот метод, чтобы изменить описание супергруппы или канала. "
+"Бот должен быть администратором чата и иметь соответствующие права "
+"администратора."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_description:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatdescription"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatdescription"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_description:10
+msgid "Str: New chat description, 0-255 characters"
+msgstr "Str: Новое описание чата, 0-255 символов"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:1
+msgid ""
+"Use this method to change the bot's menu button in a private chat, or the"
+" default menu button. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы изменить кнопку меню в приватном чате или "
+"кнопку меню по умолчанию. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatmenubutton"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatmenubutton"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:7
+msgid ""
+"Unique identifier for the target private chat. If not specified, default "
+"bot's menu button will be changed."
+msgstr ""
+"Уникальный id приватного чата. Если не указан, будет изменена кнопка меню"
+" по умолчанию."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_menu_button:11
+msgid ""
+"A JSON-serialized object for the new bot's menu button. Defaults to "
+"MenuButtonDefault"
+msgstr ""
+"JSON-сериализованный объект новой кнопки меню. По умолчанию "
+"MenuButtonDefault"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_permissions:1
+msgid ""
+"Use this method to set default chat permissions for all members. The bot "
+"must be an administrator in the group or a supergroup for this to work "
+"and must have the can_restrict_members admin rights."
+msgstr ""
+"Используйте этот метод, чтобы задать права по умолчанию для всех "
+"участников чата. Бот должен быть администратором группы или супергруппы и"
+" иметь права администратора can_restrict_members."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_permissions:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatpermissions"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatpermissions"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_permissions:11
+msgid "New default chat permissions"
+msgstr "Новые права по умолчанию"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_photo:1
+msgid ""
+"Use this method to set a new profile photo for the chat. Photos can't be "
+"changed for private chats. The bot must be an administrator in the chat "
+"for this to work and must have the appropriate admin rights. Returns True"
+" on success. Note: In regular groups (non-supergroups), this method will "
+"only work if the ‘All Members Are Admins’ setting is off in the target "
+"group."
+msgstr ""
+"Используйте этот метод, чтобы задать новую аватарку чата. В приватных "
+"чатах аватарки менять нельзя. Бот должен быть администратором чата и "
+"иметь соответствующие права администратора. Возвращает True в случае "
+"успеха. Примечание: В обычных группах (не супергруппы), этот метод будет "
+"работать только если настройка ‘All Members Are Admins’ отключена."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_photo:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setchatphoto"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#setchatphoto"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_photo:13
+msgid "InputFile: New chat photo, uploaded using multipart/form-data"
+msgstr "InputFile: Новая аватарка чата, загруженная с помощью multipart/form-data"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:1
+msgid ""
+"Use this method to set a new group sticker set for a supergroup. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate administrator rights. Use the field can_set_sticker_set "
+"optionally returned in getChat requests to check if the bot can use this "
+"method. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы задать стикерпак супергруппы. Бот должен "
+"быть администратором чата и иметь соответствующие права администратора. "
+"Используйте атрибут can_set_sticker_set, возвращаемые методом getChat, "
+"чтобы проверить, что бот может использовать этот метод. Возвращает True в"
+" случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatstickerset"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatstickerset"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:10
+msgid "Name of the sticker set to be set as the group sticker set"
+msgstr "Имя стикерпака для установки в качестве стикерпака группы"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_sticker_set:13
+msgid "StickerSet object"
+msgstr "Объект StickerSet"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_title:1
+msgid ""
+"Use this method to change the title of a chat. Titles can't be changed "
+"for private chats. The bot must be an administrator in the chat for this "
+"to work and must have the appropriate admin rights. Returns True on "
+"success. Note: In regular groups (non-supergroups), this method will only"
+" work if the ‘All Members Are Admins’ setting is off in the target group."
+msgstr ""
+"Используйте этот метод, чтобы изменить название чата. В приватных чатах "
+"изменить название нельзя. Бот должен быть администратором чата и иметь "
+"соответствующие права админа. Возвращает True в случае успеха. "
+"Примечание: В обычных группах (не супергруппы), этот метод будет работать"
+" только если настройка ‘All Members Are Admins’ отключена."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_title:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setchattitle"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#setchattitle"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_chat_title:13
+msgid "New chat title, 1-255 characters"
+msgstr "Новое название чата, 1-255 символов"
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail:1
+#, fuzzy
+msgid ""
+"Use this method to set the thumbnail of a custom emoji sticker set. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы задать обложку стикерпака. Анимированные "
+"обложки могут быть заданы только для анимированных стикерпаков. "
+"Возвращает True в случае успеха."
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.set_custom_emoji_sticker_set_thumbnail:7
+msgid ""
+"Custom emoji identifier of a sticker from the sticker set; pass an empty "
+"string to drop the thumbnail and use the first sticker as the thumbnail."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:1
+msgid "Sets the value of points in the game to a specific user."
+msgstr "Задаёт количество очков пользователя в игре."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setgamescore"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#setgamescore"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:8
+msgid "New score, must be non-negative"
+msgstr "Количество очков, должно быть неотрицательным"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:11
+msgid ""
+"Pass True, if the high score is allowed to decrease. This can be useful "
+"when fixing mistakes or banning cheaters"
+msgstr ""
+"Передайте True, если количество очков могут быть уменьшено. Может быть "
+"полезно при исправлении ошибок или бане читеров"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:23
+msgid ""
+"Pass True, if the game message should not be automatically edited to "
+"include the current scoreboard"
+msgstr ""
+"Передайте True, если сообщение с игрой должно быть автоматически "
+"отредактировано, чтобы отобразить новый результат"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_game_score:26
+msgid ""
+"On success, if the message was sent by the bot, returns the edited "
+"Message, otherwise returns True."
+msgstr ""
+"В случае успеха, если сообщение было отправлено ботом, возвращает "
+"измененное сообщение (Message), иначе возвращает True."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_message_reaction:1
+#, fuzzy
+msgid ""
+"Use this method to set a reaction to a message in a chat. The bot must be"
+" an administrator in the chat for this to work and must have the "
+"appropriate admin rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы закрепить сообщение в супергруппе. Бот "
+"должен быть администратором чата и иметь соответствующие права "
+"администратора. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_message_reaction:3
+#, fuzzy
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmessagereaction"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#editmessagecaption"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_message_reaction:8
+#, fuzzy
+msgid "Identifier of the message to set reaction to"
+msgstr "id сообщения, которое нужно удалить"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_message_reaction:11
+msgid ""
+"New list of reaction types to set on the message. Currently, as non-"
+"premium users, bots can set up to one reaction per message. A custom "
+"emoji reaction can be used if it is either already present on the message"
+" or explicitly allowed by chat administrators."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_message_reaction:15
+msgid "Pass True to set the reaction with a big animation"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_commands:1
+msgid "Use this method to change the list of the bot's commands."
+msgstr "Используйте этот метод, чтобы изменить список команд бота."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_commands:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setmycommands"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#setmycommands"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_commands:5
+msgid "List of BotCommand. At most 100 commands can be specified."
+msgstr "Список объектов BotCommand. Можно задать не более 100 команд."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:1
+msgid ""
+"Use this method to change the default administrator rights requested by "
+"the bot when it's added as an administrator to groups or channels. These "
+"rights will be suggested to users, but they are are free to modify the "
+"list before adding the bot. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы изменить права администратора по умолчанию,"
+" запрашиваемые при добавлении бота в группу или канал в качестве "
+"администратора. Эти права будут предложены пользователям, но пользователи"
+" могут изменить список перед добавлением бота. Возвращает True в случае "
+"успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:7
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmydefaultadministratorrights"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setmydefaultadministratorrights"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:9
+msgid ""
+"A JSON-serialized object describing new default administrator rights. If "
+"not specified, the default administrator rights will be cleared."
+msgstr ""
+"JSON-сериалиованный объект, описывающий новые права администратора по "
+"умолчанию. Если не указан, права администратора по умолчанию будут "
+"сброшены."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_default_administrator_rights:13
+msgid ""
+"Pass True to change the default administrator rights of the bot in "
+"channels. Otherwise, the default administrator rights of the bot for "
+"groups and supergroups will be changed."
+msgstr ""
+"Передайте True, чтобы изменить права администратора по умолчанию в "
+"каналах. Иначе, будут изменены права администратора по умолчанию для "
+"групп и супергрупп."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_description:1
+#, fuzzy
+msgid ""
+"Use this method to change the bot's description, which is shown in the "
+"chat with the bot if the chat is empty. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы изменить кнопку меню в приватном чате или "
+"кнопку меню по умолчанию. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_description:5
+msgid ""
+"New bot description; 0-512 characters. Pass an empty string to remove the"
+" dedicated description for the given language."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_description:8
+#, fuzzy
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, the description will be "
+"applied to all users for whose language there is no dedicated "
+"description."
+msgstr ""
+"Двухбуквенный языковой код в формате ISO 639-1. Если не задан, изменения "
+"коснутся команд для всех пользователей в заданном поле видимости, не "
+"имеющих команд на их языке"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_name:1
+#, fuzzy
+msgid "Use this method to change the bot's name. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы изменить кнопку меню в приватном чате или "
+"кнопку меню по умолчанию. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_name:3
+#, fuzzy
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setmyname"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendgame"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_name:5
+msgid ""
+"Optional. New bot name; 0-64 characters. Pass an empty string to remove "
+"the dedicated name for the given language."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_name:8
+#, fuzzy
+msgid ""
+"Optional. A two-letter ISO 639-1 language code. If empty, the name will "
+"be shown to all users for whose language there is no dedicated name."
+msgstr ""
+"Двухбуквенный языковой код в формате ISO 639-1. Если не задан, изменения "
+"коснутся команд для всех пользователей в заданном поле видимости, не "
+"имеющих команд на их языке"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_short_description:1
+msgid ""
+"Use this method to change the bot's short description, which is shown on "
+"the bot's profile page and is sent together with the link when users "
+"share the bot. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_short_description:5
+msgid ""
+"New short description for the bot; 0-120 characters. Pass an empty string"
+" to remove the dedicated short description for the given language."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_my_short_description:8
+#, fuzzy
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, the short description "
+"will be applied to all users for whose language there is no dedicated "
+"short description."
+msgstr ""
+"Двухбуквенный языковой код в формате ISO 639-1. Если не задан, изменения "
+"коснутся команд для всех пользователей в заданном поле видимости, не "
+"имеющих команд на их языке"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_state:1
+msgid "Sets a new state of a user."
+msgstr "Задаёт новое состояние (стейт) пользователя."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_state:5
+msgid ""
+"You should set both user id and chat id in order to set state for a user "
+"in a chat. Otherwise, if you only set user_id, chat_id will equal to "
+"user_id, this means that state will be set for the user in his private "
+"chat with a bot."
+msgstr ""
+"Вы должны указать и user id и chat id, чтобы задать состояние (стейт) "
+"пользователя в чате. Иначе, если вы укажете только user_id, chat_id будет"
+" равен user_id, что означает смену состояния (стейта) пользователя в его "
+"приватном чате с ботом."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_state:12
+msgid "new state. can be string, integer, or :class:`telebot.types.State`"
+msgstr ""
+"новое состояние (стейт). может быть строкой, числом или "
+":class:`telebot.types.State`"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list:1
+#, fuzzy
+msgid ""
+"Use this method to set the emoji list of a sticker set. Returns True on "
+"success."
+msgstr ""
+"Используйте этот метод, чтобы удалить стикер из стикерпака, созданного "
+"ботом. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_emoji_list:7
+#, fuzzy
+msgid "List of emojis"
+msgstr "список апдейтов"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_keywords:1
+msgid ""
+"Use this method to change search keywords assigned to a regular or custom"
+" emoji sticker. The sticker must belong to a sticker set created by the "
+"bot. Returns True on success."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_keywords:5
+#: telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position:5
+#, fuzzy
+msgid "File identifier of the sticker."
+msgstr "id файла стикера"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_keywords:8
+msgid ""
+"A JSON-serialized list of 0-20 search keywords for the sticker with total"
+" length of up to 64 characters"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position:1
+#, fuzzy
+msgid ""
+"Use this method to change the mask position of a mask sticker. The "
+"sticker must belong to a sticker set that was created by the bot. Returns"
+" True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить стикер из стикерпака, созданного "
+"ботом. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_mask_position:8
+#, fuzzy
+msgid ""
+"A JSON-serialized object for position where the mask should be placed on "
+"faces."
+msgstr "Позиция для размещения маски на лицах в формате JSON"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:1
+msgid ""
+"Use this method to move a sticker in a set created by the bot to a "
+"specific position . Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы передвинуть стикер в стикерпаке, созданном "
+"ботом, на заданную позицию. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setstickerpositioninset"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setstickerpositioninset"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_position_in_set:8
+msgid "New sticker position in the set, zero-based"
+msgstr "Новая позиция стикера в стикерпаке, начиная с нуля"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:1
+msgid ""
+"Use this method to set the thumbnail of a sticker set. Animated "
+"thumbnails can be set for animated sticker sets only. Returns True on "
+"success."
+msgstr ""
+"Используйте этот метод, чтобы задать обложку стикерпака. Анимированные "
+"обложки могут быть заданы только для анимированных стикерпаков. "
+"Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setstickersetthumb"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setstickersetthumb"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_set_thumbnail:12
+msgid ""
+"A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in "
+"size and have a width and height of exactly 100px, or a .TGS animation "
+"with a thumbnail up to 32 kilobytes in size (see "
+"https://core.telegram.org/stickers#animated-sticker-requirements for "
+"animated sticker technical requirements), or a WEBM video with the "
+"thumbnail up to 32 kilobytes in size; see "
+"https://core.telegram.org/stickers#video-sticker-requirements for video "
+"sticker technical requirements. Pass a file_id as a String to send a file"
+" that already exists on the Telegram servers, pass an HTTP URL as a "
+"String for Telegram to get a file from the Internet, or upload a new one "
+"using multipart/form-data. More information on Sending Files ». Animated "
+"and video sticker set thumbnails can't be uploaded via HTTP URL. If "
+"omitted, then the thumbnail is dropped and the first sticker is used as "
+"the thumbnail."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_set_title:1
+#, fuzzy
+msgid ""
+"Use this method to set the title of a created sticker set. Returns True "
+"on success."
+msgstr ""
+"Используйте этот метод, чтобы задать обложку стикерпака. Анимированные "
+"обложки могут быть заданы только для анимированных стикерпаков. "
+"Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_sticker_set_title:7
+#, fuzzy
+msgid "New sticker set title"
+msgstr "Имя стикерпака"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_update_listener:1
+msgid "Update listener is a function that gets any update."
+msgstr ""
+"Задаёт функцию-листенер, которая будет вызвана при получении нового "
+"апдейта."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_update_listener:3
+msgid "function that should get update."
+msgstr "Функция-листенер."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_update_listener:6
+msgid "Example on asynchronous update listeners."
+msgstr "Пример асинхронного листенера апдейтов."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:1
+msgid ""
+"Use this method to specify a URL and receive incoming updates via an "
+"outgoing webhook. Whenever there is an update for the bot, we will send "
+"an HTTPS POST request to the specified URL, containing a JSON-serialized "
+"Update. In case of an unsuccessful request, we will give up after a "
+"reasonable amount of attempts. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы задать URL и получать входящие апдейты с "
+"помощью вебхука. Как только у бота появляется апдейт, он будет отправлен "
+"с помощью HTTPS POST запроса на заданный URL, содержащего "
+"JSON-сериализованный Update. В случае неудачного запроса, отправка "
+"апдейта будет отменена после разумного числа попыток. Возвращает True в "
+"случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:6
+msgid ""
+"If you'd like to make sure that the webhook was set by you, you can "
+"specify secret data in the parameter secret_token. If specified, the "
+"request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the "
+"secret token as content."
+msgstr ""
+"Если вы хотите удостовериться, что вебхук был задан вами, вы можете "
+"задать секретный токен в параметре secret_token. Если указан, запрос с "
+"апдейтом будет содержать хедер “X-Telegram-Bot-Api-Secret-Token” с "
+"секретным токеном в качестве значения."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:9
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#setwebhook"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#setwebhook"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:11
+msgid ""
+"HTTPS URL to send updates to. Use an empty string to remove webhook "
+"integration, defaults to None"
+msgstr ""
+"HTTPS URL для отправки апдейтов. Используйте пустую строку, чтобы удалить"
+" вебхук, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:14
+msgid ""
+"Upload your public key certificate so that the root certificate in use "
+"can be checked, defaults to None"
+msgstr ""
+"Загрузите публичный ключ вашего SSL сертификата, чтобы корневой "
+"сертификат мог быть проверен, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:17
+msgid ""
+"The maximum allowed number of simultaneous HTTPS connections to the "
+"webhook for update delivery, 1-100. Defaults to 40. Use lower values to "
+"limit the load on your bot's server, and higher values to increase your "
+"bot's throughput, defaults to None"
+msgstr ""
+"Максимально-допустимое количество одновременных HTTPS соединений для "
+"доставки апдейтов, 1-100. По умолчанию 40. Используйте меньшие значения "
+"для уменьшения нагрузки на ваш сервер и большие значения, чтобы увеличить"
+" пропускную способность вашего бота, по умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:22
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used. Please note that this parameter doesn't affect "
+"updates created before the call to the setWebhook, so unwanted updates "
+"may be received for a short period of time. Defaults to None"
+msgstr ""
+"Список видов апдейтов, которые вы хотите получать, в формате JSON. "
+"Например, укажите [“message”, “edited_channel_post”, “callback_query”], "
+"чтобы получать апдейты только этих видов. Полный список доступных видов "
+"апдейтов - util.update_types. Укажите пустой список, чтобы получать все "
+"апдейты, кроме chat_member (по умолчанию). Если не задан, будет "
+"использована последняя настройка. Пожалуйста учтите, чтобы этот параметр "
+"не влияет на апдейты, отправленные до вызова setWebhooks, поэтому "
+"нежелательные апдейты могут быть получены в течение короткого периода "
+"времени. По умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:22
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used."
+msgstr ""
+"Список видов апдейтов, которые вы хотите получать, в формате JSON. "
+"Например, укажите [“message”, “edited_channel_post”, “callback_query”], "
+"чтобы получать апдейты только этих видов. Полный список доступных видов "
+"апдейтов - util.update_types. Укажите пустой список, чтобы получать все "
+"апдейты, кроме chat_member (по умолчанию). Если не задан, будет "
+"использована последняя настройка."
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:27
+msgid ""
+"Please note that this parameter doesn't affect updates created before the"
+" call to the setWebhook, so unwanted updates may be received for a short "
+"period of time. Defaults to None"
+msgstr ""
+"Пожалуйста учтите, чтобы этот параметр не влияет на апдейты, отправленные"
+" до вызова setWebhooks, поэтому нежелательные апдейты могут быть получены"
+" в течение короткого периода времени. По умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:32
+msgid ""
+"The fixed IP address which will be used to send webhook requests instead "
+"of the IP address resolved through DNS, defaults to None"
+msgstr ""
+"Фиксированный IP адрес, который будет использоваться для отправки "
+"запросов к вебхукувместо IP адреса, полученного с через DNS, по умолчанию"
+" None"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:42
+msgid ""
+"A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” "
+"in every webhook request, 1-256 characters. Only characters A-Z, a-z, "
+"0-9, _ and - are allowed. The header is useful to ensure that the request"
+" comes from a webhook set by you. Defaults to None"
+msgstr ""
+"Секретный токен для отправки в хедере “X-Telegram-Bot-Api-Secret-Token” в"
+" каждом запросе с апдейтом, 1-256 символов. Разрешены только символы A-Z,"
+" a-z, 0-9, _ и -. Хедер полезен для, того чтобы удостовериться, что "
+"запрос приходитс вебхука, установленного вами. По умолчанию None"
+
+#: of telebot.async_telebot.AsyncTeleBot.set_webhook:47
+msgid ":obj:`bool` if the request was successful."
+msgstr ":obj:`bool` если запрос был успешным."
+
+#: of telebot.async_telebot.AsyncTeleBot.setup_middleware:1
+msgid "Setup middleware."
+msgstr "Настраивает middleware"
+
+#: of telebot.async_telebot.AsyncTeleBot.setup_middleware:5
+msgid ""
+"Take a look at the "
+":class:`telebot.asyncio_handler_backends.BaseMiddleware` section for "
+"more."
+msgstr ""
+"Взгляните на секцию "
+":class:`telebot.asyncio_handler_backends.BaseMiddleware` для получения "
+"подробностей."
+
+#: of telebot.async_telebot.AsyncTeleBot.setup_middleware:7
+msgid "Middleware-class."
+msgstr "Класс-Middleware."
+
+#: of telebot.async_telebot.AsyncTeleBot.shipping_query_handler:1
+msgid ""
+"Handles new incoming shipping query. Only for invoices with flexible "
+"price. As a parameter to the decorator function, it passes "
+":class:`telebot.types.ShippingQuery` object."
+msgstr ""
+"Обрабатывает shipping query. Только для инвойсов с гибкой ценой. В "
+"качестве параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.ShippingQuery`."
+
+#: of telebot.async_telebot.AsyncTeleBot.skip_updates:1
+msgid "Skip existing updates. Only last update will remain on server."
+msgstr ""
+"Пропускает существующие апдейты. На сервере останется только последний "
+"апдейт."
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_message_live_location:1
+msgid ""
+"Use this method to stop updating a live location message before "
+"live_period expires. On success, if the message is not an inline message,"
+" the edited Message is returned, otherwise True is returned."
+msgstr ""
+"Используйте этот метод, чтобы остановить обновление live местоположения "
+"до истечения live_period. В случае успеха, если сообщение не является "
+"inline сообщением,возвращается измененное сообщение (Message), иначе "
+"возвращается True."
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_message_live_location:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#stopmessagelivelocation"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#stopmessagelivelocation"
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_message_live_location:9
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the message"
+" with live location to stop"
+msgstr ""
+"Обязательный, если не указан inline_message_id. id сообщения live "
+"местоположением, которое нужно остановить"
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_message_live_location:12
+msgid ""
+"Required if chat_id and message_id are not specified. Identifier of the "
+"inline message with live location to stop"
+msgstr ""
+"Обязательный, если не указаны chat_id и message_id. id inline сообщения с"
+" live местоположением, которое нужно остановить"
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_message_live_location:22
+msgid ""
+"On success, if the message is not an inline message, the edited Message "
+"is returned, otherwise True is returned."
+msgstr ""
+"В случае успеха, если сообщение не является inline сообщением, "
+"возвращается измененное сообщение (Message), иначе возвращается True."
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:1
+msgid ""
+"Use this method to stop a poll which was sent by the bot. On success, the"
+" stopped Poll is returned."
+msgstr ""
+"Используйте этот метод, чтобы завершить опрос, отправленный ботом. В "
+"случае успеха возвращается завершенный опрос (Poll)."
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#stoppoll"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#stoppoll"
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:8
+msgid "Identifier of the original message with the poll"
+msgstr "id сообщения с опросом"
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:11
+msgid "A JSON-serialized object for a new message markup."
+msgstr "JSON-сериализованный объект новой inline клавиатуры."
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:14
+msgid "On success, the stopped Poll is returned."
+msgstr "В случае успеха возвращается завершенный опрос (Poll)."
+
+#: of telebot.async_telebot.AsyncTeleBot.stop_poll:15
+msgid ":obj:`types.Poll`"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_member:1
+msgid ""
+"Use this method to unban a previously kicked user in a supergroup or "
+"channel. The user will not return to the group or channel automatically, "
+"but will be able to join via link, etc. The bot must be an administrator "
+"for this to work. By default, this method guarantees that after the call "
+"the user is not a member of the chat, but will be able to join it. So if "
+"the user is a member of the chat they will also be removed from the chat."
+" If you don't want this, use the parameter only_if_banned."
+msgstr ""
+"Используйте этот метод, чтобы разбанить ранее кикнутого пользователя в "
+"супергруппе или канале. Пользовать не вернется в группу или канал "
+"автоматически, но сможет присоединиться с помощью ссылки и т.д. Бот "
+"должен быть администратором. По умолчанию, этот метод гарантирует, что "
+"после вызова, пользователь не является участником чата, но может "
+"присоединиться. Поэтому если пользовать является участником чата, он "
+"будет кикнут, но не забанен. Если вы хотите изменить это поведение, "
+"используйте параметр only_if_banned."
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_member:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#unbanchatmember"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#unbanchatmember"
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_member:9
+msgid ""
+"Unique identifier for the target group or username of the target "
+"supergroup or channel (in the format @username)"
+msgstr ""
+"Уникальный id группы или username супергруппы или канала (в формате "
+"@username)"
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_member:16
+msgid "Do nothing if the user is not banned"
+msgstr "Ничего не делать, если пользователь не забанен"
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:1
+msgid ""
+"Use this method to unban a previously banned channel chat in a supergroup"
+" or channel. The bot must be an administrator for this to work and must "
+"have the appropriate administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы разбанить ране забаненный канал в "
+"супергруппе или канала. Бот должен быть администратором и иметь "
+"соответствующие права администратора. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unbanchatsenderchat"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#unbanchatsenderchat"
+
+#: of telebot.async_telebot.AsyncTeleBot.unban_chat_sender_chat:11
+msgid "Unique identifier of the target sender chat."
+msgstr "Уникальный id чата."
+
+#: of telebot.async_telebot.AsyncTeleBot.unhide_general_forum_topic:1
+msgid ""
+"Use this method to unhide the 'General' topic in a forum supergroup chat."
+" The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы сделать топик 'General' видимым в "
+"супергруппе с топиками. Бот должен быть администратором чата и иметь "
+"права администратора can_manage_topics. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.unhide_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unhidegeneralforumtopic"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#unhidegeneralforumtopic"
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages:1
+msgid ""
+"Use this method to unpin a all pinned messages in a supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the appropriate admin rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, что открепить все закрепленные сообщения в "
+"супергруппе. Бот должен быть администратором чата и иметь соответствующие"
+" права администратора. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_all_chat_messages:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinallchatmessages"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#unpinallchatmessages"
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:1
+msgid ""
+"Use this method to clear the list of pinned messages in a forum topic. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the can_pin_messages administrator right in the supergroup. Returns "
+"True on success."
+msgstr ""
+"Используйте этот метод, что открепить все закрепленные сообщения в "
+"топике. Бот должен быть администратором чата и иметь права администратора"
+" can_pin_messages в супергруппе. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinallforumtopicmessages"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#unpinallforumtopicmessages"
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_all_forum_topic_messages:10
+msgid "Identifier of the topic"
+msgstr "id топика"
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages:1
+#, fuzzy
+msgid ""
+"Use this method to clear the list of pinned messages in a General forum "
+"topic. The bot must be an administrator in the chat for this to work and "
+"must have the can_pin_messages administrator right in the supergroup. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, что открепить все закрепленные сообщения в "
+"топике. Бот должен быть администратором чата и иметь права администратора"
+" can_pin_messages в супергруппе. Возвращает True в случае успеха."
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages:6
+#, fuzzy
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinAllGeneralForumTopicMessages"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#unpinallforumtopicmessages"
+
+#: of
+#: telebot.async_telebot.AsyncTeleBot.unpin_all_general_forum_topic_messages:8
+#, fuzzy
+msgid "Unique identifier for the target chat or username of chat"
+msgstr "Уникальный id чата или username канала"
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_chat_message:1
+msgid ""
+"Use this method to unpin specific pinned message in a supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, что открепить закрепленное сообщение в "
+"супергруппе. Бот должен быть администратором чата и иметь соответствующие"
+" права администратора. Возвращает True в случае успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_chat_message:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinchatmessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#unpinchatmessage"
+
+#: of telebot.async_telebot.AsyncTeleBot.unpin_chat_message:11
+msgid "Int: Identifier of a message to unpin"
+msgstr "Int: id сообщения, которое нужно открепить"
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:1
+msgid ""
+"Use this method to upload a .png file with a sticker for later use in "
+"createNewStickerSet and addStickerToSet methods (can be used multiple "
+"times). Returns the uploaded File on success."
+msgstr ""
+"Используйте этот метод, чтобы загрузить .png стикер, чтобы позже "
+"использовать в методах createNewStickerSet и addStickerToSet (может быть "
+"использован несколько раз). Возвращает загруженный файл (File) в случае "
+"успеха."
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#uploadstickerfile"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#uploadstickerfile"
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:6
+msgid "User identifier of sticker set owner"
+msgstr "id пользователя, создавшего стикерпак"
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:9
+#, fuzzy
+msgid ""
+"DEPRECATED: PNG image with the sticker, must be up to 512 kilobytes in "
+"size, dimensions must not exceed 512px, and either width or height must "
+"be exactly 512px."
+msgstr ""
+"PNG изображение стикера, должно весить не более 512 kB, измерения не "
+"должны превышать 512px и либо ширина, либо высота должна быть ровно "
+"512px."
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:13
+msgid ""
+"A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See "
+"https://core.telegram.org/stickers for technical requirements. More "
+"information on Sending Files »"
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:17
+msgid "One of \"static\", \"animated\", \"video\"."
+msgstr ""
+
+#: of telebot.async_telebot.AsyncTeleBot.upload_sticker_file:20
+msgid "On success, the sent file is returned."
+msgstr "В случае успеха возвращается отправленный файл."
+
+#: of telebot.async_telebot.ExceptionHandler:1
+msgid "Class for handling exceptions while Polling"
+msgstr "Класс для обработки исключений во время поллинга"
+
+#: of telebot.async_telebot.Handler:1
+msgid "Class for (next step|reply) handlers"
+msgstr "Класс для (next step|reply) хендлеров"
+
+#: ../../source/async_version/index.rst:22
+msgid "Asyncio filters"
+msgstr "Файл asyncio_filters"
+
+#: of telebot.asyncio_filters.AdvancedCustomFilter:1
+#: telebot.asyncio_filters.SimpleCustomFilter:1
+msgid "Bases: :py:class:`abc.ABC`"
+msgstr "Базовые классы: :py:class:`abc.ABC`"
+
+#: of telebot.asyncio_filters.AdvancedCustomFilter:1
+msgid ""
+"Advanced Custom Filter base class. Create child class with check() "
+"method. Accepts two parameters, returns bool: True - filter passed, False"
+" - filter failed. message: Message class text: Filter value given in "
+"handler"
+msgstr ""
+"Базовый класс Advanced Custom Filter. Создайте класс наследник с методом "
+"check(). Принимает два параметра, возвращает bool: True - фильтр пройден,"
+" False - фильтр не пройден. message: класс Message text: значение "
+"фильтра, полученное в хендлере"
+
+#: of telebot.asyncio_filters.AdvancedCustomFilter:7
+#: telebot.asyncio_filters.SimpleCustomFilter:5
+msgid "Child classes should have .key property."
+msgstr "Классы наследники должны иметь статический атрибут (property) .key"
+
+#: of telebot.asyncio_filters.AdvancedCustomFilter:9
+msgid "Example on creating an advanced custom filter."
+msgstr "Пример создания advanced custom filter."
+
+#: of telebot.asyncio_filters.AdvancedCustomFilter.check:1
+#: telebot.asyncio_filters.SimpleCustomFilter.check:1
+msgid "Perform a check."
+msgstr "Выполнить проверку."
+
+#: of telebot.asyncio_filters.ChatFilter:1
+#: telebot.asyncio_filters.LanguageFilter:1
+#: telebot.asyncio_filters.StateFilter:1
+#: telebot.asyncio_filters.TextContainsFilter:1
+#: telebot.asyncio_filters.TextMatchFilter:1
+#: telebot.asyncio_filters.TextStartsFilter:1
+msgid "Bases: :py:class:`telebot.asyncio_filters.AdvancedCustomFilter`"
+msgstr "Базовые классы: :py:class:`telebot.custom_filters.AdvancedCustomFilter`"
+
+#: of telebot.asyncio_filters.ChatFilter:1
+msgid "Check whether chat_id corresponds to given chat_id."
+msgstr "Проверяет, является ли chat_id заданным."
+
+#: of telebot.asyncio_filters.ChatFilter:3
+#: telebot.asyncio_filters.ForwardFilter:3
+#: telebot.asyncio_filters.IsAdminFilter:3
+#: telebot.asyncio_filters.IsDigitFilter:3
+#: telebot.asyncio_filters.IsReplyFilter:3
+#: telebot.asyncio_filters.LanguageFilter:3
+#: telebot.asyncio_filters.StateFilter:3
+#: telebot.asyncio_filters.TextContainsFilter:5
+#: telebot.asyncio_filters.TextMatchFilter:3
+#: telebot.asyncio_filters.TextStartsFilter:3
+msgid "Example on using this filter:"
+msgstr "Пример использования этого фильтра:"
+
+#: of telebot.asyncio_filters.ForwardFilter:1
+#: telebot.asyncio_filters.IsAdminFilter:1
+#: telebot.asyncio_filters.IsDigitFilter:1
+#: telebot.asyncio_filters.IsReplyFilter:1
+msgid "Bases: :py:class:`telebot.asyncio_filters.SimpleCustomFilter`"
+msgstr "Базовые классы: :py:class:`telebot.asyncio_filters.SimpleCustomFilter`"
+
+#: of telebot.asyncio_filters.ForwardFilter:1
+msgid "Check whether message was forwarded from channel or group."
+msgstr "Проверяет, является ли сообщение пересланным из канала или группы."
+
+#: of telebot.asyncio_filters.IsAdminFilter:1
+msgid "Check whether the user is administrator / owner of the chat."
+msgstr "Проверяет, является ли пользователь администратором / владельцем чата."
+
+#: of telebot.asyncio_filters.IsDigitFilter:1
+msgid "Filter to check whether the string is made up of only digits."
+msgstr "Фильтр для проверки, состоит ли строка только из цифр."
+
+#: of telebot.asyncio_filters.IsReplyFilter:1
+msgid "Check whether message is a reply."
+msgstr "Проверяет, является ли сообщение ответом (reply)."
+
+#: of telebot.asyncio_filters.LanguageFilter:1
+msgid "Check users language_code."
+msgstr "Проверяет language_code пользователя."
+
+#: of telebot.asyncio_filters.SimpleCustomFilter:1
+msgid ""
+"Simple Custom Filter base class. Create child class with check() method. "
+"Accepts only message, returns bool value, that is compared with given in "
+"handler."
+msgstr ""
+"Базовый класс Simple Custom Filter. Создайте класс наследник с методом "
+"check(). Принимает только сообщение, возвращает bool, который "
+"сравнивается с заданным в хендлере."
+
+#: of telebot.asyncio_filters.SimpleCustomFilter:7
+msgid "Example on creating a simple custom filter."
+msgstr "Пример создания simple custom filter."
+
+#: of telebot.asyncio_filters.StateFilter:1
+msgid "Filter to check state."
+msgstr "Фильтр для проверки состояния (стейта)."
+
+#: of telebot.asyncio_filters.TextContainsFilter:1
+msgid "Filter to check Text message. key: text"
+msgstr "Фильтр для проверки текста сообщения. key: text"
+
+#: of telebot.asyncio_filters.TextFilter:1
+msgid ""
+"Advanced text filter to check (types.Message, types.CallbackQuery, "
+"types.InlineQuery, types.Poll)"
+msgstr ""
+"Advanced текстовый фильтр для проверки (types.Message, "
+"types.CallbackQuery, types.InlineQuery, types.Poll)"
+
+#: of telebot.asyncio_filters.TextFilter:3
+msgid ""
+"example of usage is in "
+"examples/asynchronous_telebot/custom_filters/advanced_text_filter.py"
+msgstr ""
+"пример использования в "
+"examples/asynchronous_telebot/custom_filters/advanced_text_filter.py"
+
+#: of telebot.asyncio_filters.TextFilter:5
+msgid "string, True if object's text is equal to passed string"
+msgstr "строка, True если текст объекта идентичен заданной строке"
+
+#: of telebot.asyncio_filters.TextFilter:8
+msgid "list[str] or tuple[str], True if any string element of iterable is in text"
+msgstr ""
+"list[str] или tuple[str], True если хотя бы один из элементов есть в "
+"тексте"
+
+#: of telebot.asyncio_filters.TextFilter:11
+#: telebot.asyncio_filters.TextFilter:14
+msgid "string, True if object's text starts with passed string"
+msgstr "string, True если текст объекта начинается с заданной строки"
+
+#: of telebot.asyncio_filters.TextFilter:17
+msgid "bool (default False), case insensitive"
+msgstr "bool (по умолчанию False), независимый от регистра"
+
+#: of telebot.asyncio_filters.TextFilter
+msgid "Raises"
+msgstr ""
+
+#: of telebot.asyncio_filters.TextFilter:20
+msgid "if incorrect value for a parameter was supplied"
+msgstr "если было задано некорректное значение параметра"
+
+#: of telebot.asyncio_filters.TextMatchFilter:1
+msgid "Filter to check Text message."
+msgstr "Фильтр для проверки текста сообщения."
+
+#: of telebot.asyncio_filters.TextStartsFilter:1
+msgid "Filter to check whether message starts with some text."
+msgstr "Фильтр для проверки, начинается ли сообщение с заданного текста."
+
+#: ../../source/async_version/index.rst:30
+msgid "Asyncio handler backends"
+msgstr "Файл asyncio_handler_backends"
+
+#: of telebot.asyncio_handler_backends:1
+msgid "File with all middleware classes, states."
+msgstr "Файл со всеми классами middleware и states."
+
+#: of telebot.asyncio_handler_backends.BaseMiddleware:1
+msgid ""
+"Base class for middleware. Your middlewares should be inherited from this"
+" class."
+msgstr ""
+"Базовый класс для middleware. Ваши middleware должны быть унаследованы от"
+" этого класса."
+
+#: of telebot.asyncio_handler_backends.BaseMiddleware:4
+msgid ""
+"Set update_sensitive=True if you want to get different updates on "
+"different functions. For example, if you want to handle pre_process for "
+"message update, then you will have to create pre_process_message "
+"function, and so on. Same applies to post_process."
+msgstr ""
+"Задайте update_sensitive=True если хотите получать разные апдейты в "
+"разных функциях. Например, если вы хотите обрабатывать pre_process для "
+"апдейтов вида message, вам нужно будет создать функцию "
+"pre_process_message и т.д. Аналогично для post_process."
+
+#: of telebot.asyncio_handler_backends.BaseMiddleware:9
+msgid "Example of class-based middlewares"
+msgstr "Пример класса middleware"
+
+#: of telebot.asyncio_handler_backends.CancelUpdate:1
+msgid ""
+"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."
+msgstr ""
+"Класс для отмены апдейтов. Просто верните экземпляр этого класса в "
+"middleware, чтобы пропустить апдейт. Апдейт пропустит хендлер и "
+"исполнение post_process в middleware."
+
+#: of telebot.asyncio_handler_backends.ContinueHandling:1
+msgid ""
+"Class for continue updates in handlers. Just return instance of this "
+"class in handlers to continue process."
+msgstr ""
+"Класс для продолжения обработки апдейта в хендлерах. Просто верните "
+"экземпляр этого класса в хендлерах, чтобы продолжить обработку."
+
+#: of telebot.asyncio_handler_backends.ContinueHandling:5
+msgid "Example of using ContinueHandling"
+msgstr "Пример использования ContinueHandling"
+
+#: of telebot.asyncio_handler_backends.SkipHandler:1
+msgid ""
+"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."
+msgstr ""
+"Класс для пропуска хендлеров. Просто верните экземпляр этого класса в "
+"middleware, чтобы пропустить хендлер. Апдейт попадёт в post_process, но "
+"пропустит исполнение хендлера."
+
+#: of telebot.asyncio_handler_backends.State:1
+msgid "Class representing a state."
+msgstr "Класс, представляющий состояние (стейт)."
+
+#: of telebot.asyncio_handler_backends.StatesGroup:1
+msgid "Class representing common states."
+msgstr "Класс, представляющий похожие состояния (стейты)."
+
+#: ../../source/async_version/index.rst:41
+msgid "Extensions"
+msgstr "Расширения"
+
+#: of telebot.ext.aio.webhooks:1
+msgid "This file is used by AsyncTeleBot.run_webhooks() function."
+msgstr "Этот файл используется функцией AsyncTeleBot.run_webhooks()."
+
+#: of telebot.ext.aio.webhooks:3
+msgid "Fastapi and starlette(0.20.2+) libraries are required to run this script."
+msgstr ""
+"Для запуска этого скрипта требуются библиотеки Fastapi и "
+"starlette(0.20.2+)."
+
+#: of telebot.ext.aio.webhooks.AsyncWebhookListener.run_app:1
+msgid ""
+"Run app with the given parameters to init. Not supposed to be used "
+"manually by user."
+msgstr ""
+"Запустить приложение с заданными параметрами инициализации. Не "
+"предназначено для использования пользователем."
+
+#~ msgid "New name of the topic, 1-128 characters"
+#~ msgstr "Новое название топика, 1-128 символов"
+
+#~ msgid ""
+#~ "New custom emoji for the topic "
+#~ "icon. Must be an emoji of type "
+#~ "“tgs” and must be exactly 1 "
+#~ "character long"
+#~ msgstr ""
+#~ "Новый кастомный эмодзи для иконки "
+#~ "топика. Должно быть “tgs” эмодзи, длиной"
+#~ " ровно в 1 символ"
+
+#~ msgid ""
+#~ "Additional keyword arguments which are "
+#~ "passed to "
+#~ ":meth:`telebot.async_telebot.AsyncTeleBot.send_message`"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Use this method to add a new "
+#~ "sticker to a set created by the"
+#~ " bot. It's required to pass "
+#~ "`png_sticker` or `tgs_sticker`. Returns True"
+#~ " on success."
+#~ msgstr ""
+#~ "Используйте этот метод, чтобы добавить "
+#~ "новый стикер в стикерпак, созданный "
+#~ "ботом. Необходимо передать либо `png_sticker`,"
+#~ " либо `tgs_sticker`, либо `webm_sticker`. "
+#~ "Возвращает True в случае успешного "
+#~ "добавления."
+
+#~ msgid "Timeout in seconds for long polling."
+#~ msgstr "Тайм-аут поллинга в секундах."
+
diff --git a/docs/source/locales/ru/LC_MESSAGES/calldata.po b/docs/source/locales/ru/LC_MESSAGES/calldata.po
new file mode 100644
index 000000000..434f04260
--- /dev/null
+++ b/docs/source/locales/ru/LC_MESSAGES/calldata.po
@@ -0,0 +1,130 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-11-29 14:44+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../calldata.rst:4
+msgid "Callback data factory"
+msgstr "Фабрика callback data"
+
+#: ../../calldata.rst:6
+msgid "Callback data factory in pyTelegramBotAPI"
+msgstr "Фабрика callback data в pyTelegramBotAPI"
+
+#: ../../calldata.rst:6
+msgid ""
+"ptba, pytba, pyTelegramBotAPI, callbackdatafactory, guide, callbackdata, "
+"factory"
+msgstr ""
+"ptba, pytba, pyTelegramBotAPI, callbackdatafactory, гайд, callbackdata, "
+"фабрика"
+
+#: ../../calldata.rst:12
+msgid "callback\\_data file"
+msgstr "Файл callback\\_data"
+
+#: of telebot.callback_data:1
+msgid "Callback data factory's file."
+msgstr "Файл фабрики callback data."
+
+#: of telebot.callback_data.CallbackData:1
+#: telebot.callback_data.CallbackDataFilter:1
+msgid "Bases: :py:class:`object`"
+msgstr "Базовые классы: :py:class:`object`"
+
+#: of telebot.callback_data.CallbackData:1
+msgid "Callback data factory This class will help you to work with CallbackQuery"
+msgstr "Фабрика Callback data. Этот класс поможет вам в работе с CallbackQuery"
+
+#: of telebot.callback_data.CallbackData.filter:1
+msgid "Generate filter"
+msgstr "Сгенерировать фильтр"
+
+#: of telebot.callback_data.CallbackData.filter
+#: telebot.callback_data.CallbackData.new
+#: telebot.callback_data.CallbackData.parse
+#: telebot.callback_data.CallbackDataFilter.check
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.filter:3
+msgid "specified named parameters will be checked with CallbackQuery.data"
+msgstr "заданные именованные параметры будут проверены в CallbackQuery.data"
+
+#: of telebot.callback_data.CallbackData.filter
+#: telebot.callback_data.CallbackData.new
+#: telebot.callback_data.CallbackData.parse
+#: telebot.callback_data.CallbackDataFilter.check
+msgid "Returns"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.filter:4
+msgid "CallbackDataFilter class"
+msgstr "Класс CallbackDataFilter"
+
+#: of telebot.callback_data.CallbackData.new:1
+msgid "Generate callback data"
+msgstr "Сгенерировать callback data"
+
+#: of telebot.callback_data.CallbackData.new:3
+msgid "positional parameters of CallbackData instance parts"
+msgstr "позиционные параметры экземпляра CallbackData"
+
+#: of telebot.callback_data.CallbackData.new:4
+msgid "named parameters"
+msgstr "именованные параметры"
+
+#: of telebot.callback_data.CallbackData.new:5
+msgid "str"
+msgstr ""
+
+#: of telebot.callback_data.CallbackData.parse:1
+msgid "Parse data from the callback data"
+msgstr "Получить данные из callback data"
+
+#: of telebot.callback_data.CallbackData.parse:3
+msgid ""
+"string, use to telebot.types.CallbackQuery to parse it from string to a "
+"dict"
+msgstr ""
+"string, примените к telebot.types.CallbackQuery, чтобы преобразовать "
+"callback_data из строки (str) в словарь (dict)"
+
+#: of telebot.callback_data.CallbackData.parse:4
+msgid "dict parsed from callback data"
+msgstr "словарь (dict), полученный из callback data"
+
+#: of telebot.callback_data.CallbackDataFilter:1
+msgid "Filter for CallbackData."
+msgstr "Фильтр для CallbackData."
+
+#: of telebot.callback_data.CallbackDataFilter.check:1
+msgid "Checks if query.data appropriates to specified config"
+msgstr "Проверяет, соответствует ли query.data заданной конфигурации"
+
+#: of telebot.callback_data.CallbackDataFilter.check:3
+msgid "telebot.types.CallbackQuery"
+msgstr ""
+
+#: of telebot.callback_data.CallbackDataFilter.check:6
+msgid "True if query.data appropriates to specified config"
+msgstr "True, если query.data соответствует заданной конфигурации"
+
+#: of telebot.callback_data.CallbackDataFilter.check
+msgid "Return type"
+msgstr ""
diff --git a/docs/source/locales/ru/LC_MESSAGES/formatting.po b/docs/source/locales/ru/LC_MESSAGES/formatting.po
new file mode 100644
index 000000000..c4b48960f
--- /dev/null
+++ b/docs/source/locales/ru/LC_MESSAGES/formatting.po
@@ -0,0 +1,251 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-11-29 14:44+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../formatting.rst:3
+msgid "Formatting options"
+msgstr "Параметры форматирования"
+
+#: ../../formatting.rst:5
+msgid "Formatting options in pyTelegramBotAPI"
+msgstr "Параметры форматирования в pyTelegramBotAPI"
+
+#: ../../formatting.rst:5
+msgid "html, markdown, parse_mode, formatting, ptba, pytba, pyTelegramBotAPI"
+msgstr "html, markdown, parse_mode, форматирование, ptba, pytba, pyTelegramBotAPI"
+
+#: of telebot.formatting:1
+msgid "Markdown & HTML formatting functions."
+msgstr "Функции форматирования Markdown & HTML."
+
+#: of telebot.formatting.escape_html:1
+msgid "Escapes HTML characters in a string of HTML."
+msgstr "Пропускает HTML символы в HTML строке."
+
+#: of telebot.formatting.escape_html telebot.formatting.escape_markdown
+#: telebot.formatting.format_text telebot.formatting.hbold
+#: telebot.formatting.hcode telebot.formatting.hide_link
+#: telebot.formatting.hitalic telebot.formatting.hlink telebot.formatting.hpre
+#: telebot.formatting.hspoiler telebot.formatting.hstrikethrough
+#: telebot.formatting.hunderline telebot.formatting.mbold
+#: telebot.formatting.mcode telebot.formatting.mitalic telebot.formatting.mlink
+#: telebot.formatting.mspoiler telebot.formatting.mstrikethrough
+#: telebot.formatting.munderline
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.formatting.escape_html:3
+msgid "The string of HTML to escape."
+msgstr "HTML строка, которую нужно пропустить."
+
+#: of telebot.formatting.escape_html telebot.formatting.escape_markdown
+#: telebot.formatting.format_text telebot.formatting.hbold
+#: telebot.formatting.hcode telebot.formatting.hide_link
+#: telebot.formatting.hitalic telebot.formatting.hlink telebot.formatting.hpre
+#: telebot.formatting.hspoiler telebot.formatting.hstrikethrough
+#: telebot.formatting.hunderline telebot.formatting.mbold
+#: telebot.formatting.mcode telebot.formatting.mitalic telebot.formatting.mlink
+#: telebot.formatting.mspoiler telebot.formatting.mstrikethrough
+#: telebot.formatting.munderline
+msgid "Returns"
+msgstr ""
+
+#: of telebot.formatting.escape_html:6 telebot.formatting.escape_markdown:8
+msgid "The escaped string."
+msgstr "Пропускаемая строка."
+
+#: of telebot.formatting.escape_html telebot.formatting.escape_markdown
+#: telebot.formatting.format_text telebot.formatting.hbold
+#: telebot.formatting.hcode telebot.formatting.hide_link
+#: telebot.formatting.hitalic telebot.formatting.hlink telebot.formatting.hpre
+#: telebot.formatting.hspoiler telebot.formatting.hstrikethrough
+#: telebot.formatting.hunderline telebot.formatting.mbold
+#: telebot.formatting.mcode telebot.formatting.mitalic telebot.formatting.mlink
+#: telebot.formatting.mspoiler telebot.formatting.mstrikethrough
+#: telebot.formatting.munderline
+msgid "Return type"
+msgstr ""
+
+#: of telebot.formatting.escape_html:7 telebot.formatting.escape_markdown:9
+#: telebot.formatting.format_text:17 telebot.formatting.hbold:10
+#: telebot.formatting.hcode:10 telebot.formatting.hide_link:7
+#: telebot.formatting.hitalic:10 telebot.formatting.hlink:13
+#: telebot.formatting.hpre:10 telebot.formatting.hspoiler:10
+#: telebot.formatting.hstrikethrough:10 telebot.formatting.hunderline:10
+#: telebot.formatting.mbold:10 telebot.formatting.mcode:10
+#: telebot.formatting.mitalic:10 telebot.formatting.mlink:13
+#: telebot.formatting.mspoiler:10 telebot.formatting.mstrikethrough:10
+#: telebot.formatting.munderline:10
+msgid ":obj:`str`"
+msgstr ""
+
+#: of telebot.formatting.escape_markdown:1
+msgid "Escapes Markdown characters in a string of Markdown."
+msgstr "Пропускает Markdown символы в Markdown строке."
+
+#: of telebot.formatting.escape_markdown:3
+msgid "Credits to: simonsmh"
+msgstr ""
+
+#: of telebot.formatting.escape_markdown:5
+msgid "The string of Markdown to escape."
+msgstr "Markdown строка, которую нужно пропустить."
+
+#: of telebot.formatting.format_text:1
+msgid "Formats a list of strings into a single string."
+msgstr "Преобразовывает набор строк в одну."
+
+#: of telebot.formatting.format_text:10
+msgid "Strings to format."
+msgstr "Строки для преобразования."
+
+#: of telebot.formatting.format_text:13
+msgid "The separator to use between each string."
+msgstr "Символ для разделения строк."
+
+#: of telebot.formatting.format_text:16 telebot.formatting.hbold:9
+#: telebot.formatting.hcode:9 telebot.formatting.hitalic:9
+#: telebot.formatting.hlink:12 telebot.formatting.hpre:9
+#: telebot.formatting.hspoiler:9 telebot.formatting.hstrikethrough:9
+#: telebot.formatting.hunderline:9 telebot.formatting.mbold:9
+#: telebot.formatting.mcode:9 telebot.formatting.mitalic:9
+#: telebot.formatting.mlink:12 telebot.formatting.mspoiler:9
+#: telebot.formatting.mstrikethrough:9 telebot.formatting.munderline:9
+msgid "The formatted string."
+msgstr "Преобразованная строка."
+
+#: of telebot.formatting.hbold:1
+msgid "Returns an HTML-formatted bold string."
+msgstr "Возвращает выделенную жирным шрифтом HTML строку."
+
+#: of telebot.formatting.hbold:3 telebot.formatting.mbold:3
+msgid "The string to bold."
+msgstr "Строка для выделения жирным шрифтом."
+
+#: of telebot.formatting.hbold:6 telebot.formatting.hcode:6
+#: telebot.formatting.hitalic:6 telebot.formatting.hlink:9
+#: telebot.formatting.hpre:6 telebot.formatting.hspoiler:6
+#: telebot.formatting.hstrikethrough:6 telebot.formatting.hunderline:6
+#: telebot.formatting.mbold:6 telebot.formatting.mcode:6
+#: telebot.formatting.mitalic:6 telebot.formatting.mlink:9
+#: telebot.formatting.mspoiler:6 telebot.formatting.mstrikethrough:6
+#: telebot.formatting.munderline:6
+msgid "True if you need to escape special characters. Defaults to True."
+msgstr "True если вам нужно пропустить спец. символы. По умолчанию True."
+
+#: of telebot.formatting.hcode:1
+msgid "Returns an HTML-formatted code string."
+msgstr "Возвращает выделенную как код HTML строку."
+
+#: of telebot.formatting.hcode:3 telebot.formatting.mcode:3
+msgid "The string to code."
+msgstr "Строка для выделения как код."
+
+#: of telebot.formatting.hide_link:1
+msgid "Hide url of an image."
+msgstr "Делает невидимым URL изображения."
+
+#: of telebot.formatting.hide_link:3
+msgid "The url of the image."
+msgstr "URL изображения."
+
+#: of telebot.formatting.hide_link:6
+msgid "The hidden url."
+msgstr "Невидимый URL."
+
+#: of telebot.formatting.hitalic:1
+msgid "Returns an HTML-formatted italic string."
+msgstr "Возвращает выделенную курсивом HTML строку."
+
+#: of telebot.formatting.hitalic:3 telebot.formatting.mitalic:3
+msgid "The string to italicize."
+msgstr "Строка для выделения курсивом."
+
+#: of telebot.formatting.hlink:1
+msgid "Returns an HTML-formatted link string."
+msgstr "Возвращает HTML строку с гиперссылкой."
+
+#: of telebot.formatting.hlink:3 telebot.formatting.mlink:3
+msgid "The string to link."
+msgstr "Строка для добавления гиперссылки."
+
+#: of telebot.formatting.hlink:6 telebot.formatting.mlink:6
+msgid "The URL to link to."
+msgstr "URL для создания гиперссылки."
+
+#: of telebot.formatting.hpre:1
+msgid "Returns an HTML-formatted preformatted string."
+msgstr "Возвращает предварительно отформатированную HTML строку."
+
+#: of telebot.formatting.hpre:3
+msgid "The string to preformatted."
+msgstr "Строка для предварительного форматирования."
+
+#: of telebot.formatting.hspoiler:1
+msgid "Returns an HTML-formatted spoiler string."
+msgstr "Возвращает выделенную как спойлер HTML строку."
+
+#: of telebot.formatting.hspoiler:3 telebot.formatting.mspoiler:3
+msgid "The string to spoiler."
+msgstr "Строка для выделения как спойлер."
+
+#: of telebot.formatting.hstrikethrough:1
+msgid "Returns an HTML-formatted strikethrough string."
+msgstr "Возвращает зачеркнутую HTML строку."
+
+#: of telebot.formatting.hstrikethrough:3 telebot.formatting.mstrikethrough:3
+msgid "The string to strikethrough."
+msgstr "Строка для зачеркивания."
+
+#: of telebot.formatting.hunderline:1
+msgid "Returns an HTML-formatted underline string."
+msgstr "Возвращает подчеркнутую HTML строку."
+
+#: of telebot.formatting.hunderline:3 telebot.formatting.munderline:3
+msgid "The string to underline."
+msgstr "Строка для подчёркивания."
+
+#: of telebot.formatting.mbold:1
+msgid "Returns a Markdown-formatted bold string."
+msgstr "Возвращает выделенную жирным шрифтом Markdown строку."
+
+#: of telebot.formatting.mcode:1
+msgid "Returns a Markdown-formatted code string."
+msgstr "Возвращает выделенную как код Markdown строку."
+
+#: of telebot.formatting.mitalic:1
+msgid "Returns a Markdown-formatted italic string."
+msgstr "Возвращает выделенную курсивом Markdown строку."
+
+#: of telebot.formatting.mlink:1
+msgid "Returns a Markdown-formatted link string."
+msgstr "Возвращает Markdown строку с гиперссылкой."
+
+#: of telebot.formatting.mspoiler:1
+msgid "Returns a Markdown-formatted spoiler string."
+msgstr "Возвращает выделенную как спойлер Markdown строку."
+
+#: of telebot.formatting.mstrikethrough:1
+msgid "Returns a Markdown-formatted strikethrough string."
+msgstr "Возвращает зачеркнутую Markdown строку."
+
+#: of telebot.formatting.munderline:1
+msgid "Returns a Markdown-formatted underline string."
+msgstr "Возвращает подчеркнутую Markdown строку."
+
diff --git a/docs/source/locales/ru/LC_MESSAGES/index.po b/docs/source/locales/ru/LC_MESSAGES/index.po
new file mode 100644
index 000000000..ae4cc1fa1
--- /dev/null
+++ b/docs/source/locales/ru/LC_MESSAGES/index.po
@@ -0,0 +1,128 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-11-29 14:44+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../index.rst:8
+msgid "Welcome to pyTelegramBotAPI's documentation!"
+msgstr "Добро пожаловать в документацию pyTelegramBotAPI!"
+
+#: ../../index.rst:10
+msgid "Official documentation of pyTelegramBotAPI"
+msgstr "Официальная документация pyTelegramBotAPI"
+
+#: ../../index.rst:10
+msgid "ptba, pytba, pyTelegramBotAPI, documentation, guide"
+msgstr "ptba, pytba, pyTelegramBotAPI, документация, гайд"
+
+#: ../../index.rst:17
+msgid "TeleBot"
+msgstr ""
+
+#: ../../index.rst:18
+msgid ""
+"TeleBot is synchronous and asynchronous implementation of `Telegram Bot "
+"API `_."
+msgstr ""
+"TeleBot это синхронная и асинхронная реализация `Telegram Bot "
+"API `_."
+
+#: ../../index.rst:21
+msgid "Chats"
+msgstr "Чаты"
+
+#: ../../index.rst:22
+msgid ""
+"English chat: `Private chat "
+"`__"
+msgstr ""
+"Англоязычный чат: `Private chat "
+"`__"
+
+#: ../../index.rst:24
+msgid ""
+"Russian chat: `@pytelegrambotapi_talks_ru "
+"`__"
+msgstr ""
+"Русскоязычный чат: `@pytelegrambotapi_talks_ru "
+"`__"
+
+#: ../../index.rst:26
+msgid "News: `@pyTelegramBotAPI `__"
+msgstr "Новости: `@pyTelegramBotAPI `__"
+
+#: ../../index.rst:28
+msgid "Pypi: `Pypi `__"
+msgstr ""
+
+#: ../../index.rst:30
+msgid ""
+"Source: `Github repository "
+"`__"
+msgstr ""
+"Исходники: `Github repository "
+"`__"
+
+#: ../../index.rst:33
+msgid "Some features:"
+msgstr "Некоторые особенности:"
+
+#: ../../index.rst:34
+msgid "Easy to learn and use."
+msgstr "Простой в изучении и использовании."
+
+#: ../../index.rst:36
+msgid "Easy to understand."
+msgstr "Простой в понимании."
+
+#: ../../index.rst:38
+msgid "Both sync and async."
+msgstr "И синхронный, и асинхронный."
+
+#: ../../index.rst:40
+msgid "Examples on features."
+msgstr "Примеры возможностей."
+
+#: ../../index.rst:42
+msgid "States"
+msgstr "Состояния (стейты, FSM)"
+
+#: ../../index.rst:44
+msgid "And more..."
+msgstr "И другое..."
+
+#: ../../index.rst:47
+msgid "Content"
+msgstr "Содержимое"
+
+#: ../../index.rst:63
+msgid "Indices and tables"
+msgstr "Ссылки"
+
+#: ../../index.rst:65
+msgid ":ref:`genindex`"
+msgstr ""
+
+#: ../../index.rst:66
+msgid ":ref:`modindex`"
+msgstr ""
+
+#: ../../index.rst:67
+msgid ":ref:`search`"
+msgstr ""
+
diff --git a/docs/source/locales/ru/LC_MESSAGES/install.po b/docs/source/locales/ru/LC_MESSAGES/install.po
new file mode 100644
index 000000000..cbe2dfba5
--- /dev/null
+++ b/docs/source/locales/ru/LC_MESSAGES/install.po
@@ -0,0 +1,59 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-11-29 14:44+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../install.rst:3
+msgid "Installation Guide"
+msgstr "Гайд по установке"
+
+#: ../../install.rst:5
+msgid "Installation of pyTelegramBotAPI"
+msgstr "Установка pyTelegramBotAPI"
+
+#: ../../install.rst:5
+msgid "ptba, pytba, pyTelegramBotAPI, installation, guide"
+msgstr "ptba, pytba, pyTelegramBotAPI, установка, гайд"
+
+#: ../../install.rst:11
+msgid "Using PIP"
+msgstr "Используя PIP"
+
+#: ../../install.rst:17
+msgid "Using pipenv"
+msgstr "Используя pipenv"
+
+#: ../../install.rst:23
+msgid "By cloning repository"
+msgstr "Клонируя репозиторий"
+
+#: ../../install.rst:31
+msgid "Directly using pip"
+msgstr "Напрямую используя pip"
+
+#: ../../install.rst:37
+msgid "It is generally recommended to use the first option."
+msgstr "Рекомендуется использовать первый вариант."
+
+#: ../../install.rst:39
+msgid ""
+"While the API is production-ready, it is still under development and it "
+"has regular updates, do not forget to update it regularly by calling:"
+msgstr "Новые версии библиотеки имеют больше фич, улучшений и баг фиксов. Не забывайте"
+" обновляться вызывая:"
+
diff --git a/docs/source/locales/ru/LC_MESSAGES/quick_start.po b/docs/source/locales/ru/LC_MESSAGES/quick_start.po
new file mode 100644
index 000000000..cca355561
--- /dev/null
+++ b/docs/source/locales/ru/LC_MESSAGES/quick_start.po
@@ -0,0 +1,40 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-11-29 14:44+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../quick_start.rst:4
+msgid "Quick start"
+msgstr "Быстрый старт"
+
+#: ../../quick_start.rst:6
+msgid "Quickstart guide"
+msgstr "Быстрый старт - гайд"
+
+#: ../../quick_start.rst:6
+msgid "ptba, pytba, pyTelegramBotAPI, quickstart, guide"
+msgstr "ptba, pytba, pyTelegramBotAPI, быстрый старт, гайд"
+
+#: ../../quick_start.rst:11
+msgid "Synchronous TeleBot"
+msgstr "Синхронный телебот"
+
+#: ../../quick_start.rst:16
+msgid "Asynchronous TeleBot"
+msgstr "Асинхронный телебот"
+
diff --git a/docs/source/locales/ru/LC_MESSAGES/sync_version.po b/docs/source/locales/ru/LC_MESSAGES/sync_version.po
new file mode 100644
index 000000000..b6e677773
--- /dev/null
+++ b/docs/source/locales/ru/LC_MESSAGES/sync_version.po
@@ -0,0 +1,6803 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-01-06 13:16+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../source/sync_version/index.rst:3
+msgid "TeleBot version"
+msgstr "Синхронный TeleBot"
+
+#: ../../source/sync_version/index.rst:5
+msgid "Synchronous pyTelegramBotAPI documentation"
+msgstr "Документация синхронного pyTelegramBotAPI"
+
+#: ../../source/sync_version/index.rst:5
+msgid "ptba, pytba, pyTelegramBotAPI, methods, guide, files, sync"
+msgstr "ptba, pytba, pyTelegramBotAPI, методы, гайд, файлы, sync"
+
+#: ../../source/sync_version/index.rst:10
+msgid "TeleBot methods"
+msgstr "Методы класса TeleBot"
+
+#: of telebot.ExceptionHandler:1 telebot.Handler:1 telebot.TeleBot:1
+#: telebot.custom_filters.TextFilter:1
+#: telebot.ext.sync.webhooks.SyncWebhookListener:1
+#: telebot.handler_backends.BaseMiddleware:1
+#: telebot.handler_backends.CancelUpdate:1
+#: telebot.handler_backends.ContinueHandling:1
+#: telebot.handler_backends.SkipHandler:1 telebot.handler_backends.State:1
+#: telebot.handler_backends.StatesGroup:1
+msgid "Bases: :py:class:`object`"
+msgstr "Базовые классы: :py:class:`object`"
+
+#: of telebot.ExceptionHandler:1
+msgid "Class for handling exceptions while Polling"
+msgstr "Класс для обработки исключений, возникающих во время поллинга."
+
+#: of telebot.Handler:1
+msgid "Class for (next step|reply) handlers."
+msgstr "Класс для (next step|reply) хендлеров."
+
+#: ../../docstring of telebot.REPLY_MARKUP_TYPES:1
+msgid "telebot"
+msgstr ""
+
+#: ../../docstring of telebot.REPLY_MARKUP_TYPES
+msgid "type"
+msgstr "тип"
+
+#: ../../docstring of telebot.REPLY_MARKUP_TYPES:3
+msgid "Module"
+msgstr ""
+
+#: of telebot.TeleBot:1
+msgid "This is the main synchronous class for Bot."
+msgstr "Это основной класс для синхронного бота."
+
+#: of telebot.TeleBot:3
+msgid "It allows you to add handlers for different kind of updates."
+msgstr "Позволяет добавить хендлеры для различных апдейтов."
+
+#: of telebot.TeleBot:5
+msgid "Usage:"
+msgstr "Использование:"
+
+#: of telebot.TeleBot:7
+msgid "Creating instance of TeleBot"
+msgstr "Создание инстанса класса TeleBot"
+
+#: of telebot.TeleBot:15
+msgid ""
+"See more examples in examples/ directory: "
+"https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples"
+msgstr ""
+"Больше примеров в папке examples/ : "
+"https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples"
+
+#: of telebot.TeleBot:20
+msgid "Install coloredlogs module to specify colorful_logs=True"
+msgstr "Установите пакет coloredlogs для использования colorful_los=True"
+
+#: of telebot.TeleBot telebot.TeleBot.add_custom_filter
+#: telebot.TeleBot.add_data telebot.TeleBot.add_sticker_to_set
+#: telebot.TeleBot.answer_callback_query telebot.TeleBot.answer_inline_query
+#: telebot.TeleBot.answer_pre_checkout_query
+#: telebot.TeleBot.answer_shipping_query telebot.TeleBot.answer_web_app_query
+#: telebot.TeleBot.approve_chat_join_request telebot.TeleBot.ban_chat_member
+#: telebot.TeleBot.ban_chat_sender_chat telebot.TeleBot.callback_query_handler
+#: telebot.TeleBot.channel_post_handler telebot.TeleBot.chat_boost_handler
+#: telebot.TeleBot.chat_join_request_handler
+#: telebot.TeleBot.chat_member_handler telebot.TeleBot.chosen_inline_handler
+#: telebot.TeleBot.clear_reply_handlers
+#: telebot.TeleBot.clear_reply_handlers_by_message_id
+#: telebot.TeleBot.clear_step_handler
+#: telebot.TeleBot.clear_step_handler_by_chat_id
+#: telebot.TeleBot.close_forum_topic telebot.TeleBot.close_general_forum_topic
+#: telebot.TeleBot.copy_message telebot.TeleBot.copy_messages
+#: telebot.TeleBot.create_chat_invite_link telebot.TeleBot.create_forum_topic
+#: telebot.TeleBot.create_invoice_link telebot.TeleBot.create_new_sticker_set
+#: telebot.TeleBot.decline_chat_join_request telebot.TeleBot.delete_chat_photo
+#: telebot.TeleBot.delete_chat_sticker_set telebot.TeleBot.delete_forum_topic
+#: telebot.TeleBot.delete_message telebot.TeleBot.delete_messages
+#: telebot.TeleBot.delete_my_commands telebot.TeleBot.delete_state
+#: telebot.TeleBot.delete_sticker_from_set telebot.TeleBot.delete_sticker_set
+#: telebot.TeleBot.delete_webhook telebot.TeleBot.download_file
+#: telebot.TeleBot.edit_chat_invite_link telebot.TeleBot.edit_forum_topic
+#: telebot.TeleBot.edit_general_forum_topic
+#: telebot.TeleBot.edit_message_caption
+#: telebot.TeleBot.edit_message_live_location
+#: telebot.TeleBot.edit_message_media telebot.TeleBot.edit_message_reply_markup
+#: telebot.TeleBot.edit_message_text
+#: telebot.TeleBot.edited_channel_post_handler
+#: telebot.TeleBot.edited_message_handler
+#: telebot.TeleBot.enable_save_next_step_handlers
+#: telebot.TeleBot.enable_save_reply_handlers
+#: telebot.TeleBot.enable_saving_states telebot.TeleBot.export_chat_invite_link
+#: telebot.TeleBot.forward_message telebot.TeleBot.forward_messages
+#: telebot.TeleBot.get_chat telebot.TeleBot.get_chat_administrators
+#: telebot.TeleBot.get_chat_member telebot.TeleBot.get_chat_member_count
+#: telebot.TeleBot.get_chat_menu_button
+#: telebot.TeleBot.get_custom_emoji_stickers telebot.TeleBot.get_file
+#: telebot.TeleBot.get_file_url telebot.TeleBot.get_game_high_scores
+#: telebot.TeleBot.get_my_commands
+#: telebot.TeleBot.get_my_default_administrator_rights
+#: telebot.TeleBot.get_my_description telebot.TeleBot.get_my_name
+#: telebot.TeleBot.get_my_short_description telebot.TeleBot.get_state
+#: telebot.TeleBot.get_sticker_set telebot.TeleBot.get_updates
+#: telebot.TeleBot.get_user_chat_boosts telebot.TeleBot.get_user_profile_photos
+#: telebot.TeleBot.get_webhook_info telebot.TeleBot.hide_general_forum_topic
+#: telebot.TeleBot.infinity_polling telebot.TeleBot.inline_handler
+#: telebot.TeleBot.leave_chat telebot.TeleBot.load_next_step_handlers
+#: telebot.TeleBot.load_reply_handlers telebot.TeleBot.message_handler
+#: telebot.TeleBot.message_reaction_count_handler
+#: telebot.TeleBot.message_reaction_handler telebot.TeleBot.middleware_handler
+#: telebot.TeleBot.my_chat_member_handler telebot.TeleBot.pin_chat_message
+#: telebot.TeleBot.poll_answer_handler telebot.TeleBot.poll_handler
+#: telebot.TeleBot.polling telebot.TeleBot.pre_checkout_query_handler
+#: telebot.TeleBot.process_new_updates telebot.TeleBot.promote_chat_member
+#: telebot.TeleBot.register_callback_query_handler
+#: telebot.TeleBot.register_channel_post_handler
+#: telebot.TeleBot.register_chat_boost_handler
+#: telebot.TeleBot.register_chat_join_request_handler
+#: telebot.TeleBot.register_chat_member_handler
+#: telebot.TeleBot.register_chosen_inline_handler
+#: telebot.TeleBot.register_edited_channel_post_handler
+#: telebot.TeleBot.register_edited_message_handler
+#: telebot.TeleBot.register_for_reply
+#: telebot.TeleBot.register_for_reply_by_message_id
+#: telebot.TeleBot.register_inline_handler
+#: telebot.TeleBot.register_message_handler
+#: telebot.TeleBot.register_message_reaction_count_handler
+#: telebot.TeleBot.register_message_reaction_handler
+#: telebot.TeleBot.register_middleware_handler
+#: telebot.TeleBot.register_my_chat_member_handler
+#: telebot.TeleBot.register_next_step_handler
+#: telebot.TeleBot.register_next_step_handler_by_chat_id
+#: telebot.TeleBot.register_poll_answer_handler
+#: telebot.TeleBot.register_poll_handler
+#: telebot.TeleBot.register_pre_checkout_query_handler
+#: telebot.TeleBot.register_removed_chat_boost_handler
+#: telebot.TeleBot.register_shipping_query_handler
+#: telebot.TeleBot.removed_chat_boost_handler
+#: telebot.TeleBot.reopen_forum_topic
+#: telebot.TeleBot.reopen_general_forum_topic telebot.TeleBot.reply_to
+#: telebot.TeleBot.reset_data telebot.TeleBot.restrict_chat_member
+#: telebot.TeleBot.retrieve_data telebot.TeleBot.revoke_chat_invite_link
+#: telebot.TeleBot.run_webhooks telebot.TeleBot.send_animation
+#: telebot.TeleBot.send_audio telebot.TeleBot.send_chat_action
+#: telebot.TeleBot.send_contact telebot.TeleBot.send_dice
+#: telebot.TeleBot.send_document telebot.TeleBot.send_game
+#: telebot.TeleBot.send_invoice telebot.TeleBot.send_location
+#: telebot.TeleBot.send_media_group telebot.TeleBot.send_message
+#: telebot.TeleBot.send_photo telebot.TeleBot.send_poll
+#: telebot.TeleBot.send_sticker telebot.TeleBot.send_venue
+#: telebot.TeleBot.send_video telebot.TeleBot.send_video_note
+#: telebot.TeleBot.send_voice
+#: telebot.TeleBot.set_chat_administrator_custom_title
+#: telebot.TeleBot.set_chat_description telebot.TeleBot.set_chat_menu_button
+#: telebot.TeleBot.set_chat_permissions telebot.TeleBot.set_chat_photo
+#: telebot.TeleBot.set_chat_sticker_set telebot.TeleBot.set_chat_title
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.TeleBot.set_game_score telebot.TeleBot.set_message_reaction
+#: telebot.TeleBot.set_my_commands
+#: telebot.TeleBot.set_my_default_administrator_rights
+#: telebot.TeleBot.set_my_description telebot.TeleBot.set_my_name
+#: telebot.TeleBot.set_my_short_description telebot.TeleBot.set_state
+#: telebot.TeleBot.set_sticker_emoji_list telebot.TeleBot.set_sticker_keywords
+#: telebot.TeleBot.set_sticker_mask_position
+#: telebot.TeleBot.set_sticker_position_in_set
+#: telebot.TeleBot.set_sticker_set_thumbnail
+#: telebot.TeleBot.set_sticker_set_title telebot.TeleBot.set_update_listener
+#: telebot.TeleBot.set_webhook telebot.TeleBot.setup_middleware
+#: telebot.TeleBot.shipping_query_handler
+#: telebot.TeleBot.stop_message_live_location telebot.TeleBot.stop_poll
+#: telebot.TeleBot.unban_chat_member telebot.TeleBot.unban_chat_sender_chat
+#: telebot.TeleBot.unhide_general_forum_topic
+#: telebot.TeleBot.unpin_all_chat_messages
+#: telebot.TeleBot.unpin_all_forum_topic_messages
+#: telebot.TeleBot.unpin_all_general_forum_topic_messages
+#: telebot.TeleBot.unpin_chat_message telebot.TeleBot.upload_sticker_file
+#: telebot.custom_filters.TextFilter
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.TeleBot:23
+msgid "Token of a bot, should be obtained from @BotFather"
+msgstr "Токен бота, нужно получить от @BotFather"
+
+#: of telebot.TeleBot:26
+msgid "Default parse mode, defaults to None"
+msgstr "Глобальный parse_mode, по умолчанию None"
+
+#: of telebot.TeleBot:29
+msgid "Threaded or not, defaults to True"
+msgstr "Использовать несколько потоков, по умолчанию True"
+
+#: of telebot.TeleBot:32
+msgid "Skips pending updates, defaults to False"
+msgstr "Игнорировать апдейты, полученные до запуска, по умолчанию False"
+
+#: of telebot.TeleBot:35
+msgid "Number of maximum parallel threads, defaults to 2"
+msgstr "Максимальное количество одновременно запущенных потоков, по умолчанию 2"
+
+#: of telebot.TeleBot:38
+msgid "Next step backend class, defaults to None"
+msgstr "Класс для сохранения next step хендлеров, по умолчанию None"
+
+#: of telebot.TeleBot:41
+msgid "Reply step handler class, defaults to None"
+msgstr "Класс для сохранения reply хендлеров, по умолчанию None"
+
+#: of telebot.TeleBot:44
+msgid "Exception handler to handle errors, defaults to None"
+msgstr "Класс для обработки исключений, по умолчанию None"
+
+#: of telebot.TeleBot:47
+msgid "Last update's id, defaults to 0"
+msgstr "id последнего полученного апдейта, по умолчанию 0"
+
+#: of telebot.TeleBot:50
+msgid "Supress middleware exceptions, defaults to False"
+msgstr "Игнорировать исключения, вызванные Middleware, по умолчанию False"
+
+#: of telebot.TeleBot:53
+msgid "Storage for states, defaults to StateMemoryStorage()"
+msgstr "Хранилище состояний (стейтов), по умолчанию StateMemoryStorage()"
+
+#: of telebot.TeleBot:56
+msgid "Use class middlewares, defaults to False"
+msgstr "Использовать Middlewares, по умолчанию False"
+
+#: of telebot.TeleBot:59
+msgid "Default value for disable_web_page_preview, defaults to None"
+msgstr "Глобальное значение disable_web_page_preview, по умолчанию None"
+
+#: of telebot.TeleBot:62
+msgid "Default value for disable_notification, defaults to None"
+msgstr "Глобальное значение disable_notification, по умолчанию None"
+
+#: of telebot.TeleBot:65
+msgid "Default value for protect_content, defaults to None"
+msgstr "Глобальное значение protect_content, по умолчанию None"
+
+#: of telebot.TeleBot:68
+msgid "Default value for allow_sending_without_reply, defaults to None"
+msgstr "Глобальное значение allow_sending_without_reply, по умолчанию None"
+
+#: of telebot.TeleBot:72
+msgid "Outputs colorful logs"
+msgstr "Использовать разноцветные логи"
+
+#: of telebot.TeleBot.add_custom_filter:1
+msgid "Create custom filter."
+msgstr "Создать кастомный фильтр."
+
+#: of telebot.TeleBot.add_custom_filter:3
+msgid "Example on checking the text of a message"
+msgstr "Пример проверки текста сообщения"
+
+#: of telebot.TeleBot.add_custom_filter:12
+msgid "Class with check(message) method."
+msgstr "Класс с методом check(message)"
+
+#: of telebot.TeleBot.add_custom_filter:13
+msgid "Custom filter class with key."
+msgstr "Класс кастомного фильтра с ключом."
+
+#: of telebot.TeleBot.add_data:1
+msgid "Add data to states."
+msgstr "Добавить данные в состояние (стейт)."
+
+#: of telebot.TeleBot.add_data:3 telebot.TeleBot.delete_state:3
+#: telebot.TeleBot.get_state:4 telebot.TeleBot.reset_data:3
+#: telebot.TeleBot.set_state:9
+msgid "User's identifier"
+msgstr "id пользователя"
+
+#: of telebot.TeleBot.add_data:6 telebot.TeleBot.delete_state:6
+#: telebot.TeleBot.get_state:7 telebot.TeleBot.reset_data:6
+#: telebot.TeleBot.set_state:15
+msgid "Chat's identifier"
+msgstr "id чата"
+
+#: of telebot.TeleBot.add_data:9
+msgid "Data to add"
+msgstr "Данные для добавления"
+
+#: of telebot.TeleBot.add_data telebot.TeleBot.add_sticker_to_set
+#: telebot.TeleBot.answer_callback_query telebot.TeleBot.answer_inline_query
+#: telebot.TeleBot.answer_pre_checkout_query
+#: telebot.TeleBot.answer_shipping_query telebot.TeleBot.answer_web_app_query
+#: telebot.TeleBot.approve_chat_join_request telebot.TeleBot.ban_chat_member
+#: telebot.TeleBot.ban_chat_sender_chat telebot.TeleBot.callback_query_handler
+#: telebot.TeleBot.channel_post_handler telebot.TeleBot.chat_boost_handler
+#: telebot.TeleBot.chat_join_request_handler
+#: telebot.TeleBot.chat_member_handler telebot.TeleBot.chosen_inline_handler
+#: telebot.TeleBot.clear_reply_handlers
+#: telebot.TeleBot.clear_reply_handlers_by_message_id
+#: telebot.TeleBot.clear_step_handler
+#: telebot.TeleBot.clear_step_handler_by_chat_id telebot.TeleBot.close
+#: telebot.TeleBot.close_forum_topic telebot.TeleBot.copy_message
+#: telebot.TeleBot.copy_messages telebot.TeleBot.create_chat_invite_link
+#: telebot.TeleBot.create_forum_topic telebot.TeleBot.create_invoice_link
+#: telebot.TeleBot.create_new_sticker_set
+#: telebot.TeleBot.decline_chat_join_request telebot.TeleBot.delete_chat_photo
+#: telebot.TeleBot.delete_chat_sticker_set telebot.TeleBot.delete_forum_topic
+#: telebot.TeleBot.delete_message telebot.TeleBot.delete_messages
+#: telebot.TeleBot.delete_my_commands telebot.TeleBot.delete_state
+#: telebot.TeleBot.delete_sticker_from_set telebot.TeleBot.delete_sticker_set
+#: telebot.TeleBot.delete_webhook telebot.TeleBot.download_file
+#: telebot.TeleBot.edit_chat_invite_link telebot.TeleBot.edit_forum_topic
+#: telebot.TeleBot.edit_message_caption
+#: telebot.TeleBot.edit_message_live_location
+#: telebot.TeleBot.edit_message_media telebot.TeleBot.edit_message_reply_markup
+#: telebot.TeleBot.edit_message_text
+#: telebot.TeleBot.edited_channel_post_handler
+#: telebot.TeleBot.edited_message_handler
+#: telebot.TeleBot.enable_save_next_step_handlers
+#: telebot.TeleBot.export_chat_invite_link telebot.TeleBot.forward_message
+#: telebot.TeleBot.forward_messages telebot.TeleBot.get_chat
+#: telebot.TeleBot.get_chat_administrators telebot.TeleBot.get_chat_member
+#: telebot.TeleBot.get_chat_member_count telebot.TeleBot.get_chat_menu_button
+#: telebot.TeleBot.get_custom_emoji_stickers telebot.TeleBot.get_file
+#: telebot.TeleBot.get_file_url telebot.TeleBot.get_forum_topic_icon_stickers
+#: telebot.TeleBot.get_game_high_scores telebot.TeleBot.get_my_commands
+#: telebot.TeleBot.get_my_default_administrator_rights
+#: telebot.TeleBot.get_my_description telebot.TeleBot.get_my_name
+#: telebot.TeleBot.get_my_short_description telebot.TeleBot.get_state
+#: telebot.TeleBot.get_sticker_set telebot.TeleBot.get_updates
+#: telebot.TeleBot.get_user_chat_boosts telebot.TeleBot.get_user_profile_photos
+#: telebot.TeleBot.get_webhook_info telebot.TeleBot.infinity_polling
+#: telebot.TeleBot.inline_handler telebot.TeleBot.leave_chat
+#: telebot.TeleBot.log_out telebot.TeleBot.message_handler
+#: telebot.TeleBot.message_reaction_count_handler
+#: telebot.TeleBot.message_reaction_handler telebot.TeleBot.middleware_handler
+#: telebot.TeleBot.my_chat_member_handler telebot.TeleBot.pin_chat_message
+#: telebot.TeleBot.poll_answer_handler telebot.TeleBot.poll_handler
+#: telebot.TeleBot.polling telebot.TeleBot.pre_checkout_query_handler
+#: telebot.TeleBot.promote_chat_member
+#: telebot.TeleBot.register_callback_query_handler
+#: telebot.TeleBot.register_channel_post_handler
+#: telebot.TeleBot.register_chat_boost_handler
+#: telebot.TeleBot.register_chat_join_request_handler
+#: telebot.TeleBot.register_chosen_inline_handler
+#: telebot.TeleBot.register_edited_channel_post_handler
+#: telebot.TeleBot.register_edited_message_handler
+#: telebot.TeleBot.register_for_reply
+#: telebot.TeleBot.register_for_reply_by_message_id
+#: telebot.TeleBot.register_inline_handler
+#: telebot.TeleBot.register_message_handler
+#: telebot.TeleBot.register_message_reaction_count_handler
+#: telebot.TeleBot.register_message_reaction_handler
+#: telebot.TeleBot.register_middleware_handler
+#: telebot.TeleBot.register_my_chat_member_handler
+#: telebot.TeleBot.register_next_step_handler
+#: telebot.TeleBot.register_next_step_handler_by_chat_id
+#: telebot.TeleBot.register_poll_answer_handler
+#: telebot.TeleBot.register_poll_handler
+#: telebot.TeleBot.register_pre_checkout_query_handler
+#: telebot.TeleBot.register_removed_chat_boost_handler
+#: telebot.TeleBot.register_shipping_query_handler
+#: telebot.TeleBot.remove_webhook telebot.TeleBot.removed_chat_boost_handler
+#: telebot.TeleBot.reopen_forum_topic telebot.TeleBot.reply_to
+#: telebot.TeleBot.reset_data telebot.TeleBot.restrict_chat_member
+#: telebot.TeleBot.retrieve_data telebot.TeleBot.revoke_chat_invite_link
+#: telebot.TeleBot.send_animation telebot.TeleBot.send_audio
+#: telebot.TeleBot.send_chat_action telebot.TeleBot.send_contact
+#: telebot.TeleBot.send_dice telebot.TeleBot.send_document
+#: telebot.TeleBot.send_game telebot.TeleBot.send_invoice
+#: telebot.TeleBot.send_location telebot.TeleBot.send_media_group
+#: telebot.TeleBot.send_message telebot.TeleBot.send_photo
+#: telebot.TeleBot.send_poll telebot.TeleBot.send_sticker
+#: telebot.TeleBot.send_venue telebot.TeleBot.send_video
+#: telebot.TeleBot.send_video_note telebot.TeleBot.send_voice
+#: telebot.TeleBot.set_chat_administrator_custom_title
+#: telebot.TeleBot.set_chat_description telebot.TeleBot.set_chat_menu_button
+#: telebot.TeleBot.set_chat_permissions telebot.TeleBot.set_chat_photo
+#: telebot.TeleBot.set_chat_sticker_set telebot.TeleBot.set_chat_title
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.TeleBot.set_game_score telebot.TeleBot.set_message_reaction
+#: telebot.TeleBot.set_my_commands
+#: telebot.TeleBot.set_my_default_administrator_rights
+#: telebot.TeleBot.set_my_description telebot.TeleBot.set_my_name
+#: telebot.TeleBot.set_my_short_description telebot.TeleBot.set_state
+#: telebot.TeleBot.set_sticker_emoji_list telebot.TeleBot.set_sticker_keywords
+#: telebot.TeleBot.set_sticker_mask_position
+#: telebot.TeleBot.set_sticker_position_in_set
+#: telebot.TeleBot.set_sticker_set_thumbnail
+#: telebot.TeleBot.set_sticker_set_title telebot.TeleBot.set_webhook
+#: telebot.TeleBot.setup_middleware telebot.TeleBot.shipping_query_handler
+#: telebot.TeleBot.stop_message_live_location telebot.TeleBot.stop_poll
+#: telebot.TeleBot.unban_chat_member telebot.TeleBot.unban_chat_sender_chat
+#: telebot.TeleBot.unpin_all_chat_messages
+#: telebot.TeleBot.unpin_all_forum_topic_messages
+#: telebot.TeleBot.unpin_all_general_forum_topic_messages
+#: telebot.TeleBot.unpin_chat_message telebot.TeleBot.upload_sticker_file
+#: telebot.TeleBot.user telebot.custom_filters.TextFilter
+#: telebot.ext.sync.webhooks.SyncWebhookListener.run_app
+msgid "Returns"
+msgstr ""
+
+#: of telebot.TeleBot.add_data:10 telebot.TeleBot.callback_query_handler:9
+#: telebot.TeleBot.channel_post_handler:18 telebot.TeleBot.chat_boost_handler:8
+#: telebot.TeleBot.chat_join_request_handler:10
+#: telebot.TeleBot.chat_member_handler:11
+#: telebot.TeleBot.chosen_inline_handler:10
+#: telebot.TeleBot.clear_reply_handlers:6
+#: telebot.TeleBot.clear_reply_handlers_by_message_id:6
+#: telebot.TeleBot.clear_step_handler:6
+#: telebot.TeleBot.clear_step_handler_by_chat_id:6
+#: telebot.TeleBot.delete_state:9 telebot.TeleBot.edited_message_handler:21
+#: telebot.TeleBot.enable_save_next_step_handlers:13
+#: telebot.TeleBot.inline_handler:9 telebot.TeleBot.my_chat_member_handler:10
+#: telebot.TeleBot.poll_answer_handler:10 telebot.TeleBot.poll_handler:8
+#: telebot.TeleBot.pre_checkout_query_handler:9
+#: telebot.TeleBot.register_callback_query_handler:14
+#: telebot.TeleBot.register_channel_post_handler:23
+#: telebot.TeleBot.register_chat_boost_handler:13
+#: telebot.TeleBot.register_chat_join_request_handler:14
+#: telebot.TeleBot.register_chosen_inline_handler:14
+#: telebot.TeleBot.register_edited_message_handler:26
+#: telebot.TeleBot.register_for_reply:15
+#: telebot.TeleBot.register_for_reply_by_message_id:15
+#: telebot.TeleBot.register_message_handler:26
+#: telebot.TeleBot.register_message_reaction_count_handler:14
+#: telebot.TeleBot.register_message_reaction_handler:14
+#: telebot.TeleBot.register_middleware_handler:18
+#: telebot.TeleBot.register_my_chat_member_handler:14
+#: telebot.TeleBot.register_next_step_handler:15
+#: telebot.TeleBot.register_next_step_handler_by_chat_id:15
+#: telebot.TeleBot.register_poll_answer_handler:14
+#: telebot.TeleBot.register_poll_handler:14
+#: telebot.TeleBot.register_removed_chat_boost_handler:13
+#: telebot.TeleBot.register_shipping_query_handler:14
+#: telebot.TeleBot.removed_chat_boost_handler:8 telebot.TeleBot.reset_data:9
+#: telebot.TeleBot.set_state:18 telebot.TeleBot.setup_middleware:5
+#: telebot.TeleBot.shipping_query_handler:9
+#: telebot.custom_filters.TextFilter:22
+#: telebot.ext.sync.webhooks.SyncWebhookListener.run_app:4
+msgid "None"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:1
+msgid ""
+"Use this method to add a new sticker to a set created by the bot. The "
+"format of the added sticker must match the format of the other stickers "
+"in the set. Emoji sticker sets can have up to 200 stickers. Animated and "
+"video sticker sets can have up to 50 stickers. Static sticker sets can "
+"have up to 120 stickers. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#addstickertoset"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#addstickertoset"
+
+#: of telebot.TeleBot.add_sticker_to_set:10
+msgid ""
+"**_sticker, mask_position, emojis parameters are deprecated, use stickers"
+" instead"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:12
+#: telebot.TeleBot.create_new_sticker_set:10
+msgid "User identifier of created sticker set owner"
+msgstr "id пользователя, создавшего стикерпак"
+
+#: of telebot.TeleBot.add_sticker_to_set:15
+#: telebot.TeleBot.delete_sticker_set:3 telebot.TeleBot.get_sticker_set:5
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail:4
+#: telebot.TeleBot.set_sticker_set_thumbnail:6
+#: telebot.TeleBot.set_sticker_set_title:4
+msgid "Sticker set name"
+msgstr "Имя стикерпака"
+
+#: of telebot.TeleBot.add_sticker_to_set:18
+#: telebot.TeleBot.create_new_sticker_set:21
+msgid "One or more emoji corresponding to the sticker"
+msgstr "Один или несколько эмодзи, относящихся к стикеру"
+
+#: of telebot.TeleBot.add_sticker_to_set:21
+#: telebot.TeleBot.create_new_sticker_set:24
+msgid ""
+"PNG image with the sticker, must be up to 512 kilobytes in size, "
+"dimensions must not exceed 512px, and either width or height must be "
+"exactly 512px. Pass a file_id as a String to send a file that already "
+"exists on the Telegram servers, pass an HTTP URL as a String for Telegram"
+" to get a file from the Internet, or upload a new one using multipart"
+"/form-data."
+msgstr ""
+"Изображение стикера в формате PNG, весом не более 512 килобайт, размеры "
+"не должны превышать 512px, либо ширина, либо высота должны быть ровно "
+"512px. Передайте file_id в формате str, чтобы отправить уже загруженный "
+"на сервера Telegram файл, передайте HTTP URL в формате str, чтобы "
+"Telegram скачал файл из интернета, или загрузите новый файл с помощью "
+"multipart/form-data."
+
+#: of telebot.TeleBot.add_sticker_to_set:26
+#: telebot.TeleBot.create_new_sticker_set:29
+msgid "TGS animation with the sticker, uploaded using multipart/form-data."
+msgstr ""
+"Анимированный стикер в формате TGS, загруженный с помощью multipart/form-"
+"data."
+
+#: of telebot.TeleBot.add_sticker_to_set:29
+#: telebot.TeleBot.create_new_sticker_set:32
+msgid "WebM animation with the sticker, uploaded using multipart/form-data."
+msgstr ""
+"Анимированный стикер в формате WebM, загруженный с помощью multipart"
+"/form-data."
+
+#: of telebot.TeleBot.add_sticker_to_set:32
+#: telebot.TeleBot.create_new_sticker_set:42
+msgid ""
+"A JSON-serialized object for position where the mask should be placed on "
+"faces"
+msgstr "Позиция для размещения маски на лицах в формате JSON"
+
+#: of telebot.TeleBot.add_sticker_to_set:35
+msgid ""
+"A JSON-serialized list of 1-50 initial stickers to be added to the "
+"sticker set"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:38
+#: telebot.TeleBot.answer_callback_query:22
+#: telebot.TeleBot.answer_inline_query:38
+#: telebot.TeleBot.answer_pre_checkout_query:21
+#: telebot.TeleBot.answer_shipping_query:18
+#: telebot.TeleBot.close_forum_topic:13
+#: telebot.TeleBot.create_new_sticker_set:56
+#: telebot.TeleBot.delete_forum_topic:13
+#: telebot.TeleBot.delete_sticker_from_set:6
+#: telebot.TeleBot.edit_forum_topic:22 telebot.TeleBot.reopen_forum_topic:13
+#: telebot.TeleBot.set_sticker_keywords:11
+#: telebot.TeleBot.set_sticker_position_in_set:11
+#: telebot.TeleBot.set_sticker_set_thumbnail:15
+#: telebot.TeleBot.unpin_all_forum_topic_messages:13
+#: telebot.TeleBot.unpin_all_general_forum_topic_messages:11
+msgid "On success, True is returned."
+msgstr "В случае успеха возвращается True."
+
+#: of telebot.TeleBot.add_sticker_to_set telebot.TeleBot.answer_callback_query
+#: telebot.TeleBot.answer_inline_query
+#: telebot.TeleBot.answer_pre_checkout_query
+#: telebot.TeleBot.answer_shipping_query telebot.TeleBot.answer_web_app_query
+#: telebot.TeleBot.approve_chat_join_request telebot.TeleBot.ban_chat_member
+#: telebot.TeleBot.ban_chat_sender_chat telebot.TeleBot.close_forum_topic
+#: telebot.TeleBot.copy_message telebot.TeleBot.copy_messages
+#: telebot.TeleBot.create_chat_invite_link telebot.TeleBot.create_forum_topic
+#: telebot.TeleBot.create_invoice_link telebot.TeleBot.create_new_sticker_set
+#: telebot.TeleBot.decline_chat_join_request telebot.TeleBot.delete_chat_photo
+#: telebot.TeleBot.delete_chat_sticker_set telebot.TeleBot.delete_forum_topic
+#: telebot.TeleBot.delete_message telebot.TeleBot.delete_my_commands
+#: telebot.TeleBot.delete_sticker_from_set telebot.TeleBot.delete_sticker_set
+#: telebot.TeleBot.delete_webhook telebot.TeleBot.download_file
+#: telebot.TeleBot.edit_chat_invite_link telebot.TeleBot.edit_forum_topic
+#: telebot.TeleBot.edit_message_caption
+#: telebot.TeleBot.edit_message_live_location
+#: telebot.TeleBot.edit_message_media telebot.TeleBot.edit_message_reply_markup
+#: telebot.TeleBot.edit_message_text telebot.TeleBot.export_chat_invite_link
+#: telebot.TeleBot.forward_message telebot.TeleBot.forward_messages
+#: telebot.TeleBot.get_chat telebot.TeleBot.get_chat_administrators
+#: telebot.TeleBot.get_chat_member telebot.TeleBot.get_chat_member_count
+#: telebot.TeleBot.get_chat_menu_button
+#: telebot.TeleBot.get_custom_emoji_stickers telebot.TeleBot.get_file_url
+#: telebot.TeleBot.get_forum_topic_icon_stickers
+#: telebot.TeleBot.get_game_high_scores telebot.TeleBot.get_my_commands
+#: telebot.TeleBot.get_my_default_administrator_rights
+#: telebot.TeleBot.get_state telebot.TeleBot.get_sticker_set
+#: telebot.TeleBot.get_updates telebot.TeleBot.get_user_chat_boosts
+#: telebot.TeleBot.get_user_profile_photos telebot.TeleBot.get_webhook_info
+#: telebot.TeleBot.log_out telebot.TeleBot.pin_chat_message
+#: telebot.TeleBot.promote_chat_member telebot.TeleBot.remove_webhook
+#: telebot.TeleBot.reopen_forum_topic telebot.TeleBot.reply_to
+#: telebot.TeleBot.restrict_chat_member telebot.TeleBot.retrieve_data
+#: telebot.TeleBot.revoke_chat_invite_link telebot.TeleBot.send_animation
+#: telebot.TeleBot.send_audio telebot.TeleBot.send_chat_action
+#: telebot.TeleBot.send_contact telebot.TeleBot.send_dice
+#: telebot.TeleBot.send_document telebot.TeleBot.send_game
+#: telebot.TeleBot.send_invoice telebot.TeleBot.send_location
+#: telebot.TeleBot.send_media_group telebot.TeleBot.send_message
+#: telebot.TeleBot.send_photo telebot.TeleBot.send_poll
+#: telebot.TeleBot.send_sticker telebot.TeleBot.send_venue
+#: telebot.TeleBot.send_video telebot.TeleBot.send_video_note
+#: telebot.TeleBot.set_chat_administrator_custom_title
+#: telebot.TeleBot.set_chat_description telebot.TeleBot.set_chat_menu_button
+#: telebot.TeleBot.set_chat_permissions telebot.TeleBot.set_chat_photo
+#: telebot.TeleBot.set_chat_sticker_set telebot.TeleBot.set_chat_title
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail
+#: telebot.TeleBot.set_game_score telebot.TeleBot.set_my_commands
+#: telebot.TeleBot.set_my_default_administrator_rights
+#: telebot.TeleBot.set_sticker_emoji_list telebot.TeleBot.set_sticker_keywords
+#: telebot.TeleBot.set_sticker_mask_position
+#: telebot.TeleBot.set_sticker_position_in_set
+#: telebot.TeleBot.set_sticker_set_thumbnail
+#: telebot.TeleBot.set_sticker_set_title telebot.TeleBot.set_webhook
+#: telebot.TeleBot.stop_message_live_location telebot.TeleBot.stop_poll
+#: telebot.TeleBot.unban_chat_member telebot.TeleBot.unban_chat_sender_chat
+#: telebot.TeleBot.unpin_all_chat_messages
+#: telebot.TeleBot.unpin_all_forum_topic_messages
+#: telebot.TeleBot.unpin_all_general_forum_topic_messages
+#: telebot.TeleBot.unpin_chat_message telebot.TeleBot.upload_sticker_file
+#: telebot.TeleBot.user
+msgid "Return type"
+msgstr ""
+
+#: of telebot.TeleBot.add_sticker_to_set:39
+#: telebot.TeleBot.answer_callback_query:23
+#: telebot.TeleBot.answer_inline_query:39
+#: telebot.TeleBot.answer_pre_checkout_query:22
+#: telebot.TeleBot.answer_shipping_query:19
+#: telebot.TeleBot.approve_chat_join_request:15
+#: telebot.TeleBot.ban_chat_member:25 telebot.TeleBot.ban_chat_sender_chat:17
+#: telebot.TeleBot.close:9 telebot.TeleBot.close_forum_topic:14
+#: telebot.TeleBot.create_new_sticker_set:57
+#: telebot.TeleBot.decline_chat_join_request:15
+#: telebot.TeleBot.delete_chat_photo:13
+#: telebot.TeleBot.delete_chat_sticker_set:11
+#: telebot.TeleBot.delete_forum_topic:14 telebot.TeleBot.delete_message:23
+#: telebot.TeleBot.delete_my_commands:17
+#: telebot.TeleBot.delete_sticker_from_set:7
+#: telebot.TeleBot.delete_sticker_set:7 telebot.TeleBot.delete_webhook:13
+#: telebot.TeleBot.edit_forum_topic:23 telebot.TeleBot.leave_chat:8
+#: telebot.TeleBot.log_out:11 telebot.TeleBot.pin_chat_message:19
+#: telebot.TeleBot.promote_chat_member:70 telebot.TeleBot.remove_webhook:4
+#: telebot.TeleBot.reopen_forum_topic:14
+#: telebot.TeleBot.restrict_chat_member:61 telebot.TeleBot.send_chat_action:26
+#: telebot.TeleBot.set_chat_administrator_custom_title:18
+#: telebot.TeleBot.set_chat_description:14
+#: telebot.TeleBot.set_chat_menu_button:15
+#: telebot.TeleBot.set_chat_permissions:21 telebot.TeleBot.set_chat_photo:16
+#: telebot.TeleBot.set_chat_title:17
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail:11
+#: telebot.TeleBot.set_message_reaction:18 telebot.TeleBot.set_my_commands:18
+#: telebot.TeleBot.set_my_default_administrator_rights:18
+#: telebot.TeleBot.set_sticker_emoji_list:11
+#: telebot.TeleBot.set_sticker_keywords:12
+#: telebot.TeleBot.set_sticker_mask_position:12
+#: telebot.TeleBot.set_sticker_position_in_set:12
+#: telebot.TeleBot.set_sticker_set_thumbnail:16
+#: telebot.TeleBot.set_sticker_set_title:11
+#: telebot.TeleBot.unban_chat_member:20
+#: telebot.TeleBot.unban_chat_sender_chat:15
+#: telebot.TeleBot.unpin_all_chat_messages:12
+#: telebot.TeleBot.unpin_all_forum_topic_messages:14
+#: telebot.TeleBot.unpin_all_general_forum_topic_messages:12
+#: telebot.TeleBot.unpin_chat_message:15
+msgid ":obj:`bool`"
+msgstr ""
+
+#: of telebot.TeleBot.answer_callback_query:1
+msgid ""
+"Use this method to send answers to callback queries sent from inline "
+"keyboards. The answer will be displayed to the user as a notification at "
+"the top of the chat screen or as an alert."
+msgstr ""
+"Используйте этот метод для отправки ответов на callback запросы, "
+"отправленные с помощью inline кнопок. Ответ будет показан пользователю "
+"как уведомление поверх чата или pop-up предупреждение."
+
+#: of telebot.TeleBot.answer_callback_query:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answercallbackquery"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#answercallbackquery"
+
+#: of telebot.TeleBot.answer_callback_query:6
+#: telebot.TeleBot.answer_pre_checkout_query:10
+#: telebot.TeleBot.answer_shipping_query:5
+#: telebot.TeleBot.answer_web_app_query:8
+msgid "Unique identifier for the query to be answered"
+msgstr "Уникальный id запроса для ответа"
+
+#: of telebot.TeleBot.answer_callback_query:9
+msgid ""
+"Text of the notification. If not specified, nothing will be shown to the "
+"user, 0-200 characters"
+msgstr ""
+"Текст уведомления. если не задан, то уведомление не будет показано, 0-200"
+" символов"
+
+#: of telebot.TeleBot.answer_callback_query:12
+msgid ""
+"If True, an alert will be shown by the client instead of a notification "
+"at the top of the chat screen. Defaults to false."
+msgstr ""
+"Если True, вместо уведомления поверх чата будет показано pop-up "
+"предупреждение, по умолчанию False."
+
+#: of telebot.TeleBot.answer_callback_query:15
+msgid ""
+"URL that will be opened by the user's client. If you have created a Game "
+"and accepted the conditions via @BotFather, specify the URL that opens "
+"your game - note that this will only work if the query comes from a "
+"callback_game button."
+msgstr ""
+"URL, который будет открыт пользовательским клиентом. Если вы создали игру"
+" и приняли условия через @BotFather, задайте URL, открывающий вашу игру -"
+" учитывайте, что это сработает только если запрос был отправлен с помощью"
+" callback_game кнопки."
+
+#: of telebot.TeleBot.answer_callback_query:19
+msgid ""
+"The maximum amount of time in seconds that the result of the callback "
+"query may be cached client-side. Telegram apps will support caching "
+"starting in version 3.14. Defaults to 0."
+msgstr ""
+"Максимальная длительность хранения ответа на callback query "
+"пользовательским клиентом в секундах. Приложения Telegram поддерживают "
+"хранение ответов начиная с версии 3.14, по умолчанию 0."
+
+#: of telebot.TeleBot.answer_inline_query:1
+msgid ""
+"Use this method to send answers to an inline query. On success, True is "
+"returned. No more than 50 results per query are allowed."
+msgstr ""
+"Используйте этот метод для отправки ответов на inline query. В случае "
+"успеха возвращается True. Разрешено отправить не более 50 результатов на "
+"один запрос."
+
+#: of telebot.TeleBot.answer_inline_query:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answerinlinequery"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#answerinlinequery"
+
+#: of telebot.TeleBot.answer_inline_query:6
+msgid "Unique identifier for the answered query"
+msgstr "Уникальный id запроса для ответа"
+
+#: of telebot.TeleBot.answer_inline_query:9
+msgid "Array of results for the inline query"
+msgstr "Массив результатов для ответа на inline query"
+
+#: of telebot.TeleBot.answer_inline_query:12
+msgid ""
+"The maximum amount of time in seconds that the result of the inline query"
+" may be cached on the server."
+msgstr ""
+"Максимальная длительность хранения результатов inline query на сервере в "
+"секундах."
+
+#: of telebot.TeleBot.answer_inline_query:16
+msgid ""
+"Pass True, if results may be cached on the server side only for the user "
+"that sent the query."
+msgstr ""
+"Передайте True, если результаты должны быть сохранены на сервере только "
+"для пользователя, отправившего запрос."
+
+#: of telebot.TeleBot.answer_inline_query:20
+msgid ""
+"Pass the offset that a client should send in the next query with the same"
+" text to receive more results."
+msgstr ""
+"Передайте смещение, которое клиент должен отправить в следующем запросе с"
+" таким же текстом, чтобы получить новые результаты."
+
+#: of telebot.TeleBot.answer_inline_query:24
+msgid ""
+"Deep-linking parameter for the /start message sent to the bot when user "
+"presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - "
+"are allowed. Example: An inline bot that sends YouTube videos can ask the"
+" user to connect the bot to their YouTube account to adapt search results"
+" accordingly. To do this, it displays a 'Connect your YouTube account' "
+"button above the results, or even before showing any. The user presses "
+"the button, switches to a private chat with the bot and, in doing so, "
+"passes a start parameter that instructs the bot to return an OAuth link. "
+"Once done, the bot can offer a switch_inline button so that the user can "
+"easily return to the chat where they wanted to use the bot's inline "
+"capabilities."
+msgstr ""
+"Параметр для команды /start, отправляемой боту, когда пользователь "
+"нажимает кнопку переключения. 1-64 символа, разрешены только A-Z, a-z, "
+"0-9, _ и -. Пример: Inline бот, который отправляет видео с YouTube может "
+"попросить пользователя подключить бота к его YouTube аккаунту, чтобы "
+"поиск соответствовал предпочтениям пользователя. Чтобы это сделать, бот "
+"отправляет пользователю кнопку 'Подключить YouTube аккаунт' над "
+"результатами, или даже до их показа. Пользователь нажимает на кнопку, "
+"автоматически переходит в приватный чат с ботом и в это время передаёт "
+"стартовый параметр, по которому бот возвращает ссылку для авторизации "
+"(OAuth). Как только авторизация пройдена, бот может предложить "
+"switch_inline кнопку, чтобы пользователь мог легко вернуться в чат, где "
+"он хотел использовать возможности inline бота."
+
+#: of telebot.TeleBot.answer_inline_query:32
+msgid ""
+"Parameter for the start message sent to the bot when user presses the "
+"switch button"
+msgstr ""
+"Параметр для передачи боту вместе с сообщением /start, отправленному при "
+"нажатии кнопки переключения"
+
+#: of telebot.TeleBot.answer_inline_query:35
+#, fuzzy
+msgid ""
+"A JSON-serialized object describing a button to be shown above inline "
+"query results"
+msgstr "Объект в формате JSON, описывающий сообщение, которое нужно отправить"
+
+#: of telebot.TeleBot.answer_pre_checkout_query:1
+msgid ""
+"Once the user has confirmed their payment and shipping details, the Bot "
+"API sends the final confirmation in the form of an Update with the field "
+"pre_checkout_query. Use this method to respond to such pre-checkout "
+"queries. On success, True is returned."
+msgstr ""
+"Как только пользователь подтвердил детали оплаты и доставки, Bot API "
+"отправляет финальное подтверждение в виде апдейта с полем "
+"pre_checkout_query. Используйте этот метод для ответа на такие pre-"
+"checkout запросы. В случае успеха возвращается True."
+
+#: of telebot.TeleBot.answer_pre_checkout_query:6
+msgid ""
+"The Bot API must receive an answer within 10 seconds after the pre-"
+"checkout query was sent."
+msgstr ""
+"Bot API должно получить ответ в течение 10 секунд после отправки pre-"
+"checkout query."
+
+#: of telebot.TeleBot.answer_pre_checkout_query:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answerprecheckoutquery"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#answerprecheckoutquery"
+
+#: of telebot.TeleBot.answer_pre_checkout_query:13
+msgid ""
+"Specify True if everything is alright (goods are available, etc.) and the"
+" bot is ready to proceed with the order. Use False if there are any "
+"problems."
+msgstr ""
+"Задайте True если всё правильно (выбранные товары доступны и т.д.) и бот "
+"готов обработать заказ. Задайте False если есть какие-то проблемы."
+
+#: of telebot.TeleBot.answer_pre_checkout_query:16
+msgid ""
+"Required if ok is False. Error message in human readable form that "
+"explains the reason for failure to proceed with the checkout (e.g. "
+"\"Sorry, somebody just bought the last of our amazing black T-shirts "
+"while you were busy filling out your payment details. Please choose a "
+"different color or garment!\"). Telegram will display this message to the"
+" user."
+msgstr ""
+"Обязательный в случае, когда ok - False. Сообщение об ошибке, которое "
+"может прочитать человек, объясняющее причину, по которой бот не может "
+"обработать заказ (например \"Извините, кто-то только что купил последнюю "
+"из наших прекрасных черных футболок с коротким рукавом пока вы заполняли "
+"детали оплаты. Пожалуйста выберите другой цвет или фасон!\"). Telegram "
+"покажет это сообщение пользователю."
+
+#: of telebot.TeleBot.answer_shipping_query:1
+msgid "Asks for an answer to a shipping question."
+msgstr "Запрашивает ответ на вопрос о доставке."
+
+#: of telebot.TeleBot.answer_shipping_query:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#answershippingquery"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#answershippingquery"
+
+#: of telebot.TeleBot.answer_shipping_query:8
+msgid ""
+"Specify True if delivery to the specified address is possible and False "
+"if there are any problems (for example, if delivery to the specified "
+"address is not possible)"
+msgstr ""
+"Задайте True если доставка по выбранному адресу возможна и False, если "
+"есть какие-то проблемы (например, доставка по выбранному адресу не "
+"осуществляется)"
+
+#: of telebot.TeleBot.answer_shipping_query:11
+msgid ""
+"Required if ok is True. A JSON-serialized array of available shipping "
+"options."
+msgstr ""
+"Обязательный в случае, когда ok - True. Массив вариантов доставки в "
+"формате JSON."
+
+#: of telebot.TeleBot.answer_shipping_query:14
+msgid ""
+"Required if ok is False. Error message in human readable form that "
+"explains why it is impossible to complete the order (e.g. \"Sorry, "
+"delivery to your desired address is unavailable'). Telegram will display "
+"this message to the user."
+msgstr ""
+"Обязательный в случае, когда ok - False. Сообщение об ошибке, которое "
+"может прочитать человек, объясняющее причину, по которой невозможно "
+"завершить заказ (например \"Извините, доставка по запрошенному адресу "
+"недоступна\"). Telegram покажет это сообщение пользователю."
+
+#: of telebot.TeleBot.answer_web_app_query:1
+msgid ""
+"Use this method to set the result of an interaction with a Web App and "
+"send a corresponding message on behalf of the user to the chat from which"
+" the query originated. On success, a SentWebAppMessage object is "
+"returned."
+msgstr ""
+"Используйте этот метод, чтобы задать результат взаимодействия с Web App и"
+" отправить соответствующее сообщение от лица пользователя в чат, из "
+"которого пришел запрос. В случае успеха возвращается объект "
+"SentWebAppMessage."
+
+#: of telebot.TeleBot.answer_web_app_query:6
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#answerwebappquery"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#answerwebappquery"
+
+#: of telebot.TeleBot.answer_web_app_query:11
+msgid "A JSON-serialized object describing the message to be sent"
+msgstr "Объект в формате JSON, описывающий сообщение, которое нужно отправить"
+
+#: of telebot.TeleBot.answer_web_app_query:14
+msgid "On success, a SentWebAppMessage object is returned."
+msgstr "В случае успеха возвращается объект SentWebAppMessage."
+
+#: of telebot.TeleBot.answer_web_app_query:15
+msgid ":class:`telebot.types.SentWebAppMessage`"
+msgstr ""
+
+#: of telebot.TeleBot.approve_chat_join_request:1
+msgid ""
+"Use this method to approve a chat join request. The bot must be an "
+"administrator in the chat for this to work and must have the "
+"can_invite_users administrator right. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы одобрить запрос на вступление в чат. Бот "
+"должен быть администратором чата и иметь права администратора "
+"can_invite_users. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.approve_chat_join_request:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#approvechatjoinrequest"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#approvechatjoinrequest"
+
+#: of telebot.TeleBot.approve_chat_join_request:7
+#: telebot.TeleBot.decline_chat_join_request:7
+#: telebot.TeleBot.delete_chat_sticker_set:7 telebot.TeleBot.get_chat_member:5
+#: telebot.TeleBot.set_chat_administrator_custom_title:6
+#: telebot.TeleBot.set_chat_permissions:7
+#: telebot.TeleBot.set_chat_sticker_set:7
+msgid ""
+"Unique identifier for the target chat or username of the target "
+"supergroup (in the format @supergroupusername)"
+msgstr ""
+"Уникальный id чата или username супергруппы (в формате "
+"@supergroupusername)"
+
+#: of telebot.TeleBot.approve_chat_join_request:11
+#: telebot.TeleBot.ban_chat_member:12
+#: telebot.TeleBot.decline_chat_join_request:11
+#: telebot.TeleBot.get_chat_member:8 telebot.TeleBot.get_user_chat_boosts:8
+#: telebot.TeleBot.get_user_profile_photos:6
+#: telebot.TeleBot.promote_chat_member:11
+#: telebot.TeleBot.restrict_chat_member:14
+#: telebot.TeleBot.set_chat_administrator_custom_title:10
+#: telebot.TeleBot.unban_chat_member:13
+msgid "Unique identifier of the target user"
+msgstr "Уникальный id сделавшего запрос пользователя"
+
+#: of telebot.TeleBot.approve_chat_join_request:14
+#: telebot.TeleBot.ban_chat_sender_chat:16
+#: telebot.TeleBot.decline_chat_join_request:14
+#: telebot.TeleBot.delete_chat_photo:12 telebot.TeleBot.delete_my_commands:16
+#: telebot.TeleBot.log_out:10 telebot.TeleBot.pin_chat_message:18
+#: telebot.TeleBot.promote_chat_member:69 telebot.TeleBot.remove_webhook:3
+#: telebot.TeleBot.set_chat_administrator_custom_title:17
+#: telebot.TeleBot.set_chat_description:13
+#: telebot.TeleBot.set_chat_menu_button:14 telebot.TeleBot.set_chat_photo:15
+#: telebot.TeleBot.set_chat_title:16 telebot.TeleBot.set_my_commands:17
+#: telebot.TeleBot.set_my_default_administrator_rights:17
+#: telebot.TeleBot.set_my_description:14 telebot.TeleBot.set_my_name:12
+#: telebot.TeleBot.set_my_short_description:14 telebot.TeleBot.set_webhook:46
+#: telebot.TeleBot.unban_chat_sender_chat:14
+#: telebot.TeleBot.unpin_all_chat_messages:11
+#: telebot.TeleBot.unpin_chat_message:14
+msgid "True on success."
+msgstr "True в случае успеха."
+
+#: of telebot.TeleBot.ban_chat_member:1
+msgid ""
+"Use this method to ban a user in a group, a supergroup or a channel. In "
+"the case of supergroups and channels, the user will not be able to return"
+" to the chat on their own using invite links, etc., unless unbanned "
+"first. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы заблокировать пользователя в группе, "
+"супергруппе или канале. В случае супергрупп и каналов, пользователь не "
+"сможет вернуться в чат самостоятельно, используя ссылки с приглашением и "
+"т.д., пока не будет разблокирован. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.ban_chat_member:6
+msgid "Telegram documentation: https://core.telegram.org/bots/api#banchatmember"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#banchatmember"
+
+#: of telebot.TeleBot.ban_chat_member:8 telebot.TeleBot.restrict_chat_member:10
+msgid ""
+"Unique identifier for the target group or username of the target "
+"supergroup or channel (in the format @channelusername)"
+msgstr ""
+"Уникальный id группы или username супергруппы или канала (в формате "
+"@channelusername)"
+
+#: of telebot.TeleBot.ban_chat_member:15
+msgid ""
+"Date when the user will be unbanned, unix time. If user is banned for "
+"more than 366 days or less than 30 seconds from the current time they are"
+" considered to be banned forever"
+msgstr ""
+"Дата, когда пользователь будет разблокирован, в формате UNIX time. Если "
+"пользователь заблокирован больше чем на 366 дней или меньше чем на 30 "
+"секунд, то он будет заблокирован до ручной разблокировки"
+
+#: of telebot.TeleBot.ban_chat_member:19
+msgid ""
+"Bool: Pass True to delete all messages from the chat for the user that is"
+" being removed. If False, the user will be able to see messages in the "
+"group that were sent before the user was removed. Always True for "
+"supergroups and channels."
+msgstr ""
+"Bool: Передайте True, чтобы удалить все сообщения пользователя из чата. "
+"Если False, пользователю будут доступны все сообщения в группе, "
+"отправленные до его блокировки. Всегда True для супергрупп и каналов."
+
+#: of telebot.TeleBot.ban_chat_member:24
+#: telebot.TeleBot.delete_chat_sticker_set:10 telebot.TeleBot.delete_message:22
+#: telebot.TeleBot.delete_messages:14 telebot.TeleBot.delete_sticker_set:6
+#: telebot.TeleBot.delete_webhook:12 telebot.TeleBot.send_chat_action:25
+#: telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail:10
+#: telebot.TeleBot.set_sticker_emoji_list:10
+#: telebot.TeleBot.set_sticker_mask_position:11
+#: telebot.TeleBot.set_sticker_set_title:10
+msgid "Returns True on success."
+msgstr "Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.ban_chat_sender_chat:1
+msgid ""
+"Use this method to ban a channel chat in a supergroup or a channel. The "
+"owner of the chat will not be able to send messages and join live streams"
+" on behalf of the chat, unless it is unbanned first. The bot must be an "
+"administrator in the supergroup or channel for this to work and must have"
+" the appropriate administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы заблокировать канал в супергруппе или "
+"канале. Владелец канала не сможет отправлять сообщения и участвовать в "
+"прямых эфирах от лица канала, пока канал не будет разблокирован. Бот "
+"должен быть администратором супергруппы или канала и иметь "
+"соответствующие права администратора.Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.ban_chat_sender_chat:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#banchatsenderchat"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#banchatsenderchat"
+
+#: of telebot.TeleBot.ban_chat_sender_chat:10
+#: telebot.TeleBot.close_forum_topic:7
+#: telebot.TeleBot.close_general_forum_topic:7 telebot.TeleBot.copy_message:5
+#: telebot.TeleBot.copy_messages:3 telebot.TeleBot.create_forum_topic:7
+#: telebot.TeleBot.delete_forum_topic:7 telebot.TeleBot.delete_message:13
+#: telebot.TeleBot.delete_messages:8 telebot.TeleBot.edit_forum_topic:7
+#: telebot.TeleBot.edit_general_forum_topic:7
+#: telebot.TeleBot.edit_message_live_location:13
+#: telebot.TeleBot.forward_message:8 telebot.TeleBot.forward_messages:3
+#: telebot.TeleBot.hide_general_forum_topic:7
+#: telebot.TeleBot.pin_chat_message:7 telebot.TeleBot.reopen_forum_topic:7
+#: telebot.TeleBot.reopen_general_forum_topic:7
+#: telebot.TeleBot.send_animation:6 telebot.TeleBot.send_audio:9
+#: telebot.TeleBot.send_dice:5 telebot.TeleBot.send_document:5
+#: telebot.TeleBot.send_game:5 telebot.TeleBot.send_location:5
+#: telebot.TeleBot.send_media_group:6 telebot.TeleBot.send_message:9
+#: telebot.TeleBot.send_photo:5 telebot.TeleBot.send_sticker:6
+#: telebot.TeleBot.send_video:5 telebot.TeleBot.send_video_note:6
+#: telebot.TeleBot.send_voice:7 telebot.TeleBot.set_chat_description:6
+#: telebot.TeleBot.set_chat_title:9
+#: telebot.TeleBot.stop_message_live_location:6
+#: telebot.TeleBot.unban_chat_sender_chat:8
+#: telebot.TeleBot.unhide_general_forum_topic:7
+#: telebot.TeleBot.unpin_all_forum_topic_messages:7
+#: telebot.TeleBot.unpin_chat_message:7
+msgid ""
+"Unique identifier for the target chat or username of the target channel "
+"(in the format @channelusername)"
+msgstr "Уникальный id чата или username канала (в формате @channelusername)"
+
+#: of telebot.TeleBot.ban_chat_sender_chat:13
+msgid "Unique identifier of the target sender chat"
+msgstr "Уникальный id канала для блокировки"
+
+#: of telebot.TeleBot.callback_query_handler:1
+msgid ""
+"Handles new incoming callback query. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.CallbackQuery` object."
+msgstr ""
+"Обрабатывает новый callback query. В качестве параметра передаёт в "
+"декорируемую функцию объект :class:`telebot.types.CallbackQuery`."
+
+#: of telebot.TeleBot.callback_query_handler:4
+#: telebot.TeleBot.channel_post_handler:10 telebot.TeleBot.chat_boost_handler:4
+#: telebot.TeleBot.chat_join_request_handler:5
+#: telebot.TeleBot.chat_member_handler:6
+#: telebot.TeleBot.chosen_inline_handler:5
+#: telebot.TeleBot.edited_channel_post_handler:10
+#: telebot.TeleBot.edited_message_handler:10 telebot.TeleBot.inline_handler:4
+#: telebot.TeleBot.message_reaction_count_handler:4
+#: telebot.TeleBot.message_reaction_handler:4
+#: telebot.TeleBot.my_chat_member_handler:5
+#: telebot.TeleBot.poll_answer_handler:5 telebot.TeleBot.poll_handler:4
+#: telebot.TeleBot.pre_checkout_query_handler:4
+#: telebot.TeleBot.register_callback_query_handler:6
+#: telebot.TeleBot.register_channel_post_handler:15
+#: telebot.TeleBot.register_chat_boost_handler:6
+#: telebot.TeleBot.register_chat_join_request_handler:6
+#: telebot.TeleBot.register_chat_member_handler:6
+#: telebot.TeleBot.register_chosen_inline_handler:6
+#: telebot.TeleBot.register_edited_channel_post_handler:15
+#: telebot.TeleBot.register_edited_message_handler:15
+#: telebot.TeleBot.register_inline_handler:6
+#: telebot.TeleBot.register_message_handler:15
+#: telebot.TeleBot.register_message_reaction_count_handler:6
+#: telebot.TeleBot.register_message_reaction_handler:6
+#: telebot.TeleBot.register_my_chat_member_handler:6
+#: telebot.TeleBot.register_poll_answer_handler:6
+#: telebot.TeleBot.register_poll_handler:6
+#: telebot.TeleBot.register_pre_checkout_query_handler:6
+#: telebot.TeleBot.register_removed_chat_boost_handler:6
+#: telebot.TeleBot.register_shipping_query_handler:6
+#: telebot.TeleBot.removed_chat_boost_handler:4
+#: telebot.TeleBot.shipping_query_handler:4
+msgid "Function executed as a filter"
+msgstr "Функция, используемая в качестве фильтра"
+
+#: of telebot.TeleBot.callback_query_handler:7
+#: telebot.TeleBot.channel_post_handler:16 telebot.TeleBot.chat_boost_handler:7
+#: telebot.TeleBot.chat_join_request_handler:8
+#: telebot.TeleBot.chat_member_handler:9
+#: telebot.TeleBot.chosen_inline_handler:8
+#: telebot.TeleBot.edited_channel_post_handler:16
+#: telebot.TeleBot.edited_message_handler:19 telebot.TeleBot.inline_handler:7
+#: telebot.TeleBot.message_handler:50
+#: telebot.TeleBot.message_reaction_count_handler:7
+#: telebot.TeleBot.message_reaction_handler:7
+#: telebot.TeleBot.my_chat_member_handler:8
+#: telebot.TeleBot.poll_answer_handler:8 telebot.TeleBot.poll_handler:7
+#: telebot.TeleBot.pre_checkout_query_handler:7
+#: telebot.TeleBot.register_callback_query_handler:12
+#: telebot.TeleBot.register_channel_post_handler:21
+#: telebot.TeleBot.register_chat_boost_handler:11
+#: telebot.TeleBot.register_chat_join_request_handler:12
+#: telebot.TeleBot.register_chat_member_handler:12
+#: telebot.TeleBot.register_chosen_inline_handler:12
+#: telebot.TeleBot.register_edited_channel_post_handler:21
+#: telebot.TeleBot.register_edited_message_handler:24
+#: telebot.TeleBot.register_inline_handler:12
+#: telebot.TeleBot.register_message_handler:24
+#: telebot.TeleBot.register_message_reaction_count_handler:12
+#: telebot.TeleBot.register_message_reaction_handler:12
+#: telebot.TeleBot.register_my_chat_member_handler:12
+#: telebot.TeleBot.register_poll_answer_handler:12
+#: telebot.TeleBot.register_poll_handler:12
+#: telebot.TeleBot.register_pre_checkout_query_handler:11
+#: telebot.TeleBot.register_removed_chat_boost_handler:11
+#: telebot.TeleBot.register_shipping_query_handler:12
+#: telebot.TeleBot.removed_chat_boost_handler:7
+#: telebot.TeleBot.shipping_query_handler:7
+msgid "Optional keyword arguments(custom filters)"
+msgstr "Необязательные именованные аргументы(кастомные фильтры)"
+
+#: of telebot.TeleBot.channel_post_handler:1
+msgid ""
+"Handles new incoming channel post of any kind - text, photo, sticker, "
+"etc. As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+"Обрабатывает новый пост любого типа в канале - текст, фото, стикер и т.д."
+" В качестве параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.Message`."
+
+#: of telebot.TeleBot.channel_post_handler:4
+#: telebot.TeleBot.edited_channel_post_handler:4
+#: telebot.TeleBot.edited_message_handler:4 telebot.TeleBot.message_handler:34
+msgid "Optional list of strings (commands to handle)."
+msgstr "Необязательный список строк - команд для обработки."
+
+#: of telebot.TeleBot.channel_post_handler:7
+#: telebot.TeleBot.edited_channel_post_handler:7
+#: telebot.TeleBot.edited_message_handler:7 telebot.TeleBot.message_handler:37
+msgid "Optional regular expression."
+msgstr "Необязательное регулярное выражение."
+
+#: of telebot.TeleBot.channel_post_handler:13
+#: telebot.TeleBot.edited_channel_post_handler:13
+#: telebot.TeleBot.edited_message_handler:13 telebot.TeleBot.message_handler:44
+#: telebot.TeleBot.register_channel_post_handler:6
+#: telebot.TeleBot.register_edited_channel_post_handler:6
+#: telebot.TeleBot.register_edited_message_handler:6
+#: telebot.TeleBot.register_message_handler:6
+msgid "Supported message content types. Must be a list. Defaults to ['text']."
+msgstr "Обрабатываемые виды контента. Обязан быть списком. По умолчанию ['text']"
+
+#: of telebot.TeleBot.chat_boost_handler:1
+#, fuzzy
+msgid ""
+"Handles new incoming chat boost state. it passes "
+":class:`telebot.types.ChatBoostUpdated` object."
+msgstr ""
+"Обрабатывает новый callback query. В качестве параметра передаёт в "
+"декорируемую функцию объект :class:`telebot.types.CallbackQuery`."
+
+#: of telebot.TeleBot.chat_join_request_handler:1
+msgid ""
+"Handles a request to join the chat has been sent. The bot must have the "
+"can_invite_users administrator right in the chat to receive these "
+"updates. As a parameter to the decorator function, it passes "
+":class:`telebot.types.ChatJoinRequest` object."
+msgstr ""
+"Обрабатывает запрос на вступление в чат. Бот должен иметь права "
+"администратора can_invite_users в чате, чтобы получать такие апдейты. В "
+"качестве параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.ChatJoinRequest`."
+
+#: of telebot.TeleBot.chat_member_handler:1
+msgid ""
+"Handles update in a status of a user in a chat. The bot must be an "
+"administrator in the chat and must explicitly specify “chat_member” in "
+"the list of allowed_updates to receive these updates. As a parameter to "
+"the decorator function, it passes "
+":class:`telebot.types.ChatMemberUpdated` object."
+msgstr ""
+"Обрабатывает изменение статуса пользователя в чате. Бот должен быть "
+"администратором чата и явно указать “chat_member“ в allowed_updates, "
+"чтобы получать такие апдейты. В качестве параметра передаёт в "
+"декорируемую функцию объект :class:`telebot.types.ChatMemberUpdated`."
+
+#: of telebot.TeleBot.chosen_inline_handler:1
+msgid ""
+"Handles the result of an inline query that was chosen by a user and sent "
+"to their chat partner. Please see our documentation on the feedback "
+"collecting for details on how to enable these updates for your bot. As a "
+"parameter to the decorator function, it passes "
+":class:`telebot.types.ChosenInlineResult` object."
+msgstr ""
+"Обрабатывает результат inline query, который был выбран пользователем и "
+"отправлен собеседнику в чате. Пожалуйста ознакомьтесь с документацией по "
+"сбору фидбека для получения таких апдейтов вашим ботом. В качестве "
+"параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.ChosenInlineResult`."
+
+#: of telebot.TeleBot.clear_reply_handlers:1
+#: telebot.TeleBot.clear_reply_handlers_by_message_id:1
+msgid ""
+"Clears all callback functions registered by register_for_reply() and "
+"register_for_reply_by_message_id()."
+msgstr ""
+"Очищает список функций, зарегистрированных с помощью register_for_reply()"
+" и register_for_reply_by_message_id()."
+
+#: of telebot.TeleBot.clear_reply_handlers:3
+msgid "The message for which we want to clear reply handlers"
+msgstr "Сообщение, у которого нужно очистить список reply хендлеров"
+
+#: of telebot.TeleBot.clear_reply_handlers_by_message_id:3
+msgid "The message id for which we want to clear reply handlers"
+msgstr "id сообщения, у которого нужно очистить список reply хендлеров"
+
+#: of telebot.TeleBot.clear_step_handler:1
+#: telebot.TeleBot.clear_step_handler_by_chat_id:1
+msgid "Clears all callback functions registered by register_next_step_handler()."
+msgstr ""
+"Очищает список функций, зарегистрированных с помощью "
+"register_next_step_handler()."
+
+#: of telebot.TeleBot.clear_step_handler:3
+msgid ""
+"The message for which we want to handle new message after that in same "
+"chat."
+msgstr "Сообщение, после которого нужно обработать новое сообщение в том же чате."
+
+#: of telebot.TeleBot.clear_step_handler_by_chat_id:3
+msgid "The chat for which we want to clear next step handlers"
+msgstr "Чат, в котором мы хотим очистить список next step хендлеров"
+
+#: of telebot.TeleBot.close:1
+msgid ""
+"Use this method to close the bot instance before moving it from one local"
+" server to another. You need to delete the webhook before calling this "
+"method to ensure that the bot isn't launched again after server restart. "
+"The method will return error 429 in the first 10 minutes after the bot is"
+" launched. Returns True on success."
+msgstr ""
+"Используйте этот метод чтобы закрыть инстанс бота прежде чем перемещать "
+"его с одного локального сервера на другой. Вы должны удалить вебхук перед"
+" вызовом этого метода, чтобы убедиться. что бот не будет запущен повторно"
+" после перезапуска сервера. Метод будет возвращать ошибку 429 в течение "
+"10 минут после запуска бота. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.close:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#close"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#close"
+
+#: of telebot.TeleBot.close_forum_topic:1
+msgid ""
+"Use this method to close an open topic in a forum supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the can_manage_topics administrator rights, unless it is the creator of "
+"the topic. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы закрыть открытый топик в чате супергруппы. "
+"Бот должен быть администратором чата и иметь права администратора "
+"can_manage_topics, за исключением случаев, когда бот является создателем "
+"топика. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.close_forum_topic:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#closeforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#closeforumtopic"
+
+#: of telebot.TeleBot.close_forum_topic
+msgid "aram chat_id"
+msgstr ""
+
+#: of telebot.TeleBot.close_forum_topic:10
+msgid "Identifier of the topic to close"
+msgstr "id топика для закрытия"
+
+#: of telebot.TeleBot.close_general_forum_topic:1
+msgid ""
+"Use this method to close the 'General' topic in a forum supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы закрыть открытый топик в чате супергруппы. "
+"Бот должен быть администратором чата и иметь права администратора "
+"can_manage_topics, за исключением случаев, когда бот является создателем "
+"топика. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.close_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#closegeneralforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#closeforumtopic"
+
+#: of telebot.TeleBot.copy_message:1 telebot.TeleBot.copy_messages:1
+msgid "Use this method to copy messages of any kind."
+msgstr "Используйте этот метод для копирования любых сообщений."
+
+#: of telebot.TeleBot.copy_message:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#copymessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#copymessage"
+
+#: of telebot.TeleBot.copy_message:8 telebot.TeleBot.copy_messages:6
+#: telebot.TeleBot.forward_message:11 telebot.TeleBot.forward_messages:6
+msgid ""
+"Unique identifier for the chat where the original message was sent (or "
+"channel username in the format @channelusername)"
+msgstr ""
+"Уникальный id чата, в который было отправлено исходное сообщение (или "
+"username канала в формате @channelusername)"
+
+#: of telebot.TeleBot.copy_message:10 telebot.TeleBot.forward_message:14
+msgid "Message identifier in the chat specified in from_chat_id"
+msgstr "id сообщения в чате, заданном в from_chat_id"
+
+#: of telebot.TeleBot.copy_message:13
+msgid ""
+"New caption for media, 0-1024 characters after entities parsing. If not "
+"specified, the original caption is kept"
+msgstr ""
+"Новая подпись для медиа, 0-1024 символа после форматирования. Если не "
+"задано, используется исходная подпись"
+
+#: of telebot.TeleBot.copy_message:16
+msgid "Mode for parsing entities in the new caption."
+msgstr "Режим форматирования новой подписи."
+
+#: of telebot.TeleBot.copy_message:19
+msgid ""
+"A JSON-serialized list of special entities that appear in the new "
+"caption, which can be specified instead of parse_mode"
+msgstr ""
+"Список отформатированных частей новой подписи в формате JSON, можно "
+"использовать вместо parse_mode"
+
+#: of telebot.TeleBot.copy_message:22 telebot.TeleBot.send_animation:48
+#: telebot.TeleBot.send_audio:36 telebot.TeleBot.send_contact:20
+#: telebot.TeleBot.send_dice:12 telebot.TeleBot.send_document:23
+#: telebot.TeleBot.send_game:11 telebot.TeleBot.send_invoice:67
+#: telebot.TeleBot.send_location:22 telebot.TeleBot.send_message:24
+#: telebot.TeleBot.send_photo:22 telebot.TeleBot.send_poll:44
+#: telebot.TeleBot.send_venue:27 telebot.TeleBot.send_video:35
+#: telebot.TeleBot.send_video_note:24 telebot.TeleBot.send_voice:28
+msgid ""
+"Sends the message silently. Users will receive a notification with no "
+"sound."
+msgstr ""
+"Отправить сообщение, при получении которого пользователи получат "
+"уведомление без звука."
+
+#: of telebot.TeleBot.copy_message:25 telebot.TeleBot.send_animation:34
+#: telebot.TeleBot.send_audio:57 telebot.TeleBot.send_contact:37
+#: telebot.TeleBot.send_dice:29 telebot.TeleBot.send_document:50
+#: telebot.TeleBot.send_game:26 telebot.TeleBot.send_invoice:95
+#: telebot.TeleBot.send_location:43 telebot.TeleBot.send_media_group:15
+#: telebot.TeleBot.send_message:27 telebot.TeleBot.send_photo:25
+#: telebot.TeleBot.send_poll:64 telebot.TeleBot.send_sticker:30
+#: telebot.TeleBot.send_venue:50 telebot.TeleBot.send_video:38
+#: telebot.TeleBot.send_video_note:42 telebot.TeleBot.send_voice:43
+msgid "Protects the contents of the sent message from forwarding and saving"
+msgstr "Запретить пересылку и сохранение содержимого сообщения"
+
+#: of telebot.TeleBot.copy_message:28 telebot.TeleBot.copy_message:31
+#: telebot.TeleBot.edit_message_text:23 telebot.TeleBot.polling:44
+#: telebot.TeleBot.send_animation:37 telebot.TeleBot.send_animation:40
+#: telebot.TeleBot.send_animation:63 telebot.TeleBot.send_audio:39
+#: telebot.TeleBot.send_audio:42 telebot.TeleBot.send_audio:63
+#: telebot.TeleBot.send_contact:23 telebot.TeleBot.send_contact:26
+#: telebot.TeleBot.send_dice:20 telebot.TeleBot.send_dice:23
+#: telebot.TeleBot.send_document:26 telebot.TeleBot.send_document:29
+#: telebot.TeleBot.send_document:56 telebot.TeleBot.send_location:25
+#: telebot.TeleBot.send_location:28 telebot.TeleBot.send_media_group:18
+#: telebot.TeleBot.send_media_group:21 telebot.TeleBot.send_message:21
+#: telebot.TeleBot.send_message:30 telebot.TeleBot.send_message:33
+#: telebot.TeleBot.send_photo:28 telebot.TeleBot.send_photo:31
+#: telebot.TeleBot.send_sticker:21 telebot.TeleBot.send_sticker:24
+#: telebot.TeleBot.send_venue:30 telebot.TeleBot.send_venue:33
+#: telebot.TeleBot.send_video:41 telebot.TeleBot.send_video:44
+#: telebot.TeleBot.send_video:64 telebot.TeleBot.send_video_note:27
+#: telebot.TeleBot.send_video_note:30 telebot.TeleBot.send_video_note:48
+#: telebot.TeleBot.send_voice:31 telebot.TeleBot.send_voice:34
+msgid "deprecated."
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:34 telebot.TeleBot.send_animation:43
+#: telebot.TeleBot.send_contact:29 telebot.TeleBot.send_dice:15
+#: telebot.TeleBot.send_document:15 telebot.TeleBot.send_game:20
+#: telebot.TeleBot.send_location:17 telebot.TeleBot.send_message:36
+#: telebot.TeleBot.send_photo:34 telebot.TeleBot.send_poll:53
+#: telebot.TeleBot.send_sticker:13 telebot.TeleBot.send_venue:36
+#: telebot.TeleBot.send_video:47 telebot.TeleBot.send_video_note:19
+#: telebot.TeleBot.send_voice:20
+msgid ""
+"Additional interface options. A JSON-serialized object for an inline "
+"keyboard, custom reply keyboard, instructions to remove reply keyboard or"
+" to force a reply from the user."
+msgstr ""
+"Дополнительные элементы интерфейса. Inline клавиатура, текстовая "
+"клавиатура, запрос на удаление текстовой клавиатуры или запрос на ответ "
+"от пользователя."
+
+#: of telebot.TeleBot.copy_message:39 telebot.TeleBot.delete_message:19
+#: telebot.TeleBot.edit_message_live_location:23
+#: telebot.TeleBot.forward_message:20 telebot.TeleBot.send_animation:51
+#: telebot.TeleBot.send_audio:45 telebot.TeleBot.send_chat_action:19
+#: telebot.TeleBot.send_contact:34 telebot.TeleBot.send_dice:26
+#: telebot.TeleBot.send_document:32 telebot.TeleBot.send_location:31
+#: telebot.TeleBot.send_media_group:24 telebot.TeleBot.send_message:40
+#: telebot.TeleBot.send_photo:39 telebot.TeleBot.send_sticker:27
+#: telebot.TeleBot.send_venue:41 telebot.TeleBot.send_video:52
+#: telebot.TeleBot.send_video_note:33 telebot.TeleBot.send_voice:37
+#: telebot.TeleBot.stop_message_live_location:19
+msgid "Timeout in seconds for the request."
+msgstr "Таймаут запроса в секундах."
+
+#: of telebot.TeleBot.copy_message:42 telebot.TeleBot.forward_message:23
+#: telebot.TeleBot.send_audio:60 telebot.TeleBot.send_dice:32
+#: telebot.TeleBot.send_location:46 telebot.TeleBot.send_message:43
+#: telebot.TeleBot.send_photo:42 telebot.TeleBot.send_voice:46
+msgid "Identifier of a message thread, in which the message will be sent"
+msgstr "id топика, в который нужно отправить сообщение"
+
+#: of telebot.TeleBot.copy_message:45 telebot.TeleBot.send_dice:35
+#: telebot.TeleBot.send_photo:48
+msgid "Additional parameters for replies to messages"
+msgstr ""
+
+#: of telebot.TeleBot.copy_message:48
+#, fuzzy
+msgid "On success, the MessageId of the sent message is returned."
+msgstr "В случае успеха возвращает отправленное сообщение (Message)."
+
+#: of telebot.TeleBot.copy_message:49 telebot.TeleBot.forward_messages:22
+#, fuzzy
+msgid ":class:`telebot.types.MessageID`"
+msgstr "Экземпляр класса :class:`telebot.types.Message`"
+
+#: of telebot.TeleBot.copy_messages:9 telebot.TeleBot.forward_messages:9
+#, fuzzy
+msgid "Message identifiers in the chat specified in from_chat_id"
+msgstr "id сообщения в чате, заданном в from_chat_id"
+
+#: of telebot.TeleBot.copy_messages:12 telebot.TeleBot.forward_message:5
+#: telebot.TeleBot.forward_messages:12
+msgid ""
+"Sends the message silently. Users will receive a notification with no "
+"sound"
+msgstr ""
+"Отправить сообщение, при получении которого пользователи получат "
+"уведомление без звука"
+
+#: of telebot.TeleBot.copy_messages:15 telebot.TeleBot.forward_messages:15
+#, fuzzy
+msgid "Identifier of a message thread, in which the messages will be sent"
+msgstr "id топика, в который нужно отправить сообщение"
+
+#: of telebot.TeleBot.copy_messages:18 telebot.TeleBot.forward_message:17
+#: telebot.TeleBot.forward_messages:18
+msgid "Protects the contents of the forwarded message from forwarding and saving"
+msgstr "Запретить пересылку и сохранение содержимого пересланного сообщения"
+
+#: of telebot.TeleBot.copy_messages:21
+msgid "Pass True to copy the messages without their captions"
+msgstr ""
+
+#: of telebot.TeleBot.copy_messages:24
+#, fuzzy
+msgid "On success, an array of MessageId of the sent messages is returned."
+msgstr "В случае успеха возвращает отправленное сообщение (Message)."
+
+#: of telebot.TeleBot.copy_messages:25
+#, fuzzy
+msgid ":obj:`list` of :class:`telebot.types.MessageID`"
+msgstr "Экземпляр класса :class:`telebot.types.Message`"
+
+#: of telebot.TeleBot.create_chat_invite_link:1
+msgid ""
+"Use this method to create an additional invite link for a chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate administrator rights. The link can be revoked using the "
+"method revokeChatInviteLink. Returns the new invite link as "
+"ChatInviteLink object."
+msgstr ""
+"Используйте этот метод, чтобы создать дополнительную ссылку-приглашение в"
+" чат. Бот должен быть администратором чата и иметь соответствующие права "
+"администратора. Ссылка может быть аннулирована методом "
+"revokeChatInviteLink. Возвращает новую ссылку-приглашение "
+"(ChatInviteLink)."
+
+#: of telebot.TeleBot.create_chat_invite_link:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createchatinvitelink"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#createchatinvitelink"
+
+#: of telebot.TeleBot.create_chat_invite_link:8
+#: telebot.TeleBot.edit_chat_invite_link:6
+#: telebot.TeleBot.export_chat_invite_link:6
+#: telebot.TeleBot.revoke_chat_invite_link:7
+msgid ""
+"Id: Unique identifier for the target chat or username of the target "
+"channel (in the format @channelusername)"
+msgstr "Уникальный id чата или username канала (в формате @channelusername)"
+
+#: of telebot.TeleBot.create_chat_invite_link:12
+#: telebot.TeleBot.edit_chat_invite_link:10
+msgid "Invite link name; 0-32 characters"
+msgstr "Название ссылки-приглашения; 0-32 символа"
+
+#: of telebot.TeleBot.create_chat_invite_link:15
+#: telebot.TeleBot.edit_chat_invite_link:16
+msgid "Point in time (Unix timestamp) when the link will expire"
+msgstr "Время, когда ссылка будет аннулирована в формате Unix timestamp"
+
+#: of telebot.TeleBot.create_chat_invite_link:18
+#: telebot.TeleBot.edit_chat_invite_link:19
+msgid "Maximum number of users that can be members of the chat simultaneously"
+msgstr "Максимальное количество пользователей в чате"
+
+#: of telebot.TeleBot.create_chat_invite_link:21
+#: telebot.TeleBot.edit_chat_invite_link:22
+msgid ""
+"True, if users joining the chat via the link need to be approved by chat "
+"administrators. If True, member_limit can't be specified"
+msgstr ""
+"True, если пользователи, использующие эту ссылку должны быть одобрены "
+"администраторами чата. Нельзя использовать True вместе с member_limit"
+
+#: of telebot.TeleBot.create_chat_invite_link:24
+#: telebot.TeleBot.edit_chat_invite_link:25
+#: telebot.TeleBot.revoke_chat_invite_link:14
+msgid "Returns the new invite link as ChatInviteLink object."
+msgstr "Возвращает новую ссылку-приглашение (ChatInviteLink)."
+
+#: of telebot.TeleBot.create_chat_invite_link:25
+#: telebot.TeleBot.edit_chat_invite_link:26
+#: telebot.TeleBot.revoke_chat_invite_link:15
+msgid ":class:`telebot.types.ChatInviteLink`"
+msgstr ""
+
+#: of telebot.TeleBot.create_forum_topic:1
+msgid ""
+"Use this method to create a topic in a forum supergroup chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"can_manage_topics administrator rights. Returns information about the "
+"created topic as a ForumTopic object."
+msgstr ""
+"Используйте этот метод, чтобы создать топик в супергруппе. Бот должен "
+"быть администратором чата и иметь права администратора can_manage_topics."
+" Возвращает информацию о созданном топике (ForumTopic)."
+
+#: of telebot.TeleBot.create_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#createforumtopic"
+
+#: of telebot.TeleBot.create_forum_topic:10
+msgid "Name of the topic, 1-128 characters"
+msgstr "Имя топика, 1-128 символов"
+
+#: of telebot.TeleBot.create_forum_topic:13
+msgid ""
+"Color of the topic icon in RGB format. Currently, must be one of "
+"0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F"
+msgstr ""
+"Цвет иконки топика в формате RGB. В текущий момент, доступны цвета "
+"0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F"
+
+#: of telebot.TeleBot.create_forum_topic:16
+msgid ""
+"Custom emoji for the topic icon. Must be an emoji of type “tgs” and must "
+"be exactly 1 character long"
+msgstr ""
+"Кастомный эмодзи для использования в качестве иконки топика. Должно быть "
+"“tgs” эмодзи и быть ровно 1 символом"
+
+#: of telebot.TeleBot.create_forum_topic:19
+msgid ""
+"On success, information about the created topic is returned as a "
+"ForumTopic object."
+msgstr "В случае успеха возвращается информация о созданном топике (ForumTopic)."
+
+#: of telebot.TeleBot.create_forum_topic:20
+msgid ":class:`telebot.types.ForumTopic`"
+msgstr ""
+
+#: of telebot.TeleBot.create_invoice_link:1
+msgid ""
+"Use this method to create a link for an invoice. Returns the created "
+"invoice link as String on success."
+msgstr ""
+"используйте этот метод, чтобы создать ссылку-инвойс. Возвращает созданную"
+" ссылку в случае успеха (String)."
+
+#: of telebot.TeleBot.create_invoice_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createinvoicelink"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#createinvoicelink"
+
+#: of telebot.TeleBot.create_invoice_link:7 telebot.TeleBot.send_invoice:8
+msgid "Product name, 1-32 characters"
+msgstr "Название товара, 1-32 символа"
+
+#: of telebot.TeleBot.create_invoice_link:10 telebot.TeleBot.send_invoice:11
+msgid "Product description, 1-255 characters"
+msgstr "Описание товара, 1-255 символов"
+
+#: of telebot.TeleBot.create_invoice_link:13 telebot.TeleBot.send_invoice:14
+msgid ""
+"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to "
+"the user, use for your internal processes."
+msgstr ""
+"Дополнительные данные, 1-128 байт. Не будет показано пользователю, "
+"используйте во внутренних процессах."
+
+#: of telebot.TeleBot.create_invoice_link:17 telebot.TeleBot.send_invoice:18
+msgid "Payments provider token, obtained via @Botfather"
+msgstr "Токен платежной системы, полученный через @BotFather"
+
+#: of telebot.TeleBot.create_invoice_link:20 telebot.TeleBot.send_invoice:21
+msgid ""
+"Three-letter ISO 4217 currency code, see "
+"https://core.telegram.org/bots/payments#supported-currencies"
+msgstr ""
+"Трехбуквенный код валюты в формате ISO 4217, см. "
+"https://core.telegram.org/bots/payments#supported-currencies"
+
+#: of telebot.TeleBot.create_invoice_link:24 telebot.TeleBot.send_invoice:25
+msgid ""
+"Price breakdown, a list of components (e.g. product price, tax, discount,"
+" delivery cost, delivery tax, bonus, etc.)"
+msgstr ""
+"Детали цены, список компонент (например цена продукта, налог, скидка, "
+"стоимость доставки, налог на доставку, бонус и т.д.)"
+
+#: of telebot.TeleBot.create_invoice_link:28 telebot.TeleBot.send_invoice:87
+msgid "The maximum accepted amount for tips in the smallest units of the currency"
+msgstr "Максимальный размер чаевых в наименьших единицах выбранной валюты"
+
+#: of telebot.TeleBot.create_invoice_link:31 telebot.TeleBot.send_invoice:90
+msgid ""
+"A JSON-serialized array of suggested amounts of tips in the smallest "
+"units of the currency. At most 4 suggested tip amounts can be specified."
+" The suggested tip amounts must be positive, passed in a strictly "
+"increased order and must not exceed max_tip_amount."
+msgstr ""
+"Массив предлагаемых вариантов чаевых в наименьших единицах выбранной "
+"валюты в формате JSON. Можно задать не более 4 вариантов. Варианты чаевых"
+" должны быть больше нуля, перечисленные в порядке строгого возрастания и "
+"не превышать max_tip_amount."
+
+#: of telebot.TeleBot.create_invoice_link:36 telebot.TeleBot.send_invoice:80
+msgid ""
+"A JSON-serialized data about the invoice, which will be shared with the "
+"payment provider. A detailed description of required fields should be "
+"provided by the payment provider."
+msgstr ""
+"Данные о инвойсе в формате JSON, которые будут переданы платежной "
+"системе. Подробное описание обязательных полей должно быть предоставлено "
+"провайдером платежной системы."
+
+#: of telebot.TeleBot.create_invoice_link:40
+msgid ""
+"URL of the product photo for the invoice. Can be a photo of the goods or "
+"a photo of the invoice. People like it better when they see a photo of "
+"what they are paying for."
+msgstr ""
+"URL изображения товара для инвойса. Может быть изображением товаров или "
+"изображением инвойса. Людям больше нравится видеть фото товара, за "
+"который они платят."
+
+#: of telebot.TeleBot.create_invoice_link:44 telebot.TeleBot.send_invoice:37
+msgid "Photo size in bytes"
+msgstr "Вес изображения в байтах"
+
+#: of telebot.TeleBot.create_invoice_link:47 telebot.TeleBot.send_invoice:40
+msgid "Photo width"
+msgstr "Ширина изображения"
+
+#: of telebot.TeleBot.create_invoice_link:50 telebot.TeleBot.send_invoice:43
+msgid "Photo height"
+msgstr "Высота изображения"
+
+#: of telebot.TeleBot.create_invoice_link:53 telebot.TeleBot.send_invoice:46
+msgid "Pass True, if you require the user's full name to complete the order"
+msgstr ""
+"Передайте True, если для совершения заказа требуется полное имя "
+"пользователя"
+
+#: of telebot.TeleBot.create_invoice_link:56 telebot.TeleBot.send_invoice:49
+msgid "Pass True, if you require the user's phone number to complete the order"
+msgstr ""
+"Передайте True, если для совершения заказа требуется номер телефона "
+"пользователя"
+
+#: of telebot.TeleBot.create_invoice_link:59 telebot.TeleBot.send_invoice:52
+msgid "Pass True, if you require the user's email to complete the order"
+msgstr "Передайте True, если для совершения заказа требуется email пользователя"
+
+#: of telebot.TeleBot.create_invoice_link:62 telebot.TeleBot.send_invoice:55
+msgid ""
+"Pass True, if you require the user's shipping address to complete the "
+"order"
+msgstr "Передайте True, если для совершения заказа требуется адрес доставки"
+
+#: of telebot.TeleBot.create_invoice_link:65 telebot.TeleBot.send_invoice:61
+msgid "Pass True, if user's phone number should be sent to provider"
+msgstr ""
+"Передайте True, если номер телефона пользователя нужно отправить "
+"платежной системе"
+
+#: of telebot.TeleBot.create_invoice_link:68 telebot.TeleBot.send_invoice:64
+msgid "Pass True, if user's email address should be sent to provider"
+msgstr "Передайте True, если email пользователя нужно отправить платежной системе"
+
+#: of telebot.TeleBot.create_invoice_link:71 telebot.TeleBot.send_invoice:58
+msgid "Pass True, if the final price depends on the shipping method"
+msgstr "Передайте True, если окончательная цена зависит от способа доставки"
+
+#: of telebot.TeleBot.create_invoice_link:74
+msgid "Created invoice link as String on success."
+msgstr "Созданная ссылка-инвойс (String) в случае успеха."
+
+#: of telebot.TeleBot.create_invoice_link:75
+#: telebot.TeleBot.export_chat_invite_link:11 telebot.TeleBot.get_file_url:7
+msgid ":obj:`str`"
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:1
+msgid ""
+"Use this method to create new sticker set owned by a user. The bot will "
+"be able to edit the created sticker set. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы создать новый стикерпак, владельцем "
+"которого станет пользователь. Бот будет иметь возможность редактировать "
+"созданный стикерпак. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.create_new_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#createnewstickerset"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#createnewstickerset"
+
+#: of telebot.TeleBot.create_new_sticker_set:8
+msgid ""
+"Fields *_sticker are deprecated, pass a list of stickers to stickers "
+"parameter instead."
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:13
+msgid ""
+"Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., "
+"animals). Can contain only English letters, digits and underscores. Must "
+"begin with a letter, can't contain consecutive underscores and must end "
+"in \"_by_\". is case insensitive. 1-64 "
+"characters."
+msgstr ""
+"Короткое имя стикерпака для использования в ссылках вида "
+"t.me/addstickers/ (например animals). Может содержать только латинские "
+"буквы, цифры и нижние подчеркивания. Должно начинаться с буквы, не может "
+"содержать подряд идущие нижние подчеркивания и должно заканчиваться на "
+"\"_by_\". учитывает регистр. 1-64 символа."
+
+#: of telebot.TeleBot.create_new_sticker_set:18
+msgid "Sticker set title, 1-64 characters"
+msgstr "Название стикерпака, 1-64 символа"
+
+#: of telebot.TeleBot.create_new_sticker_set:35
+msgid ""
+"Pass True, if a set of mask stickers should be created. Deprecated since "
+"Bot API 6.2, use sticker_type instead."
+msgstr ""
+"Передайте True, если создаётся стикерпак масок. Устарело, начиная с Bot "
+"API 6.2, используйте sticker_type."
+
+#: of telebot.TeleBot.create_new_sticker_set:39
+#, fuzzy
+msgid ""
+"Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. "
+"By default, a regular sticker set is created."
+msgstr ""
+"Необязательный, тип стикерпака, передайте “regular” или “mask”. "
+"Стикерпаки кастомных эмодзи пока что не могут быть созданы с помощью Bot "
+"API. По умолчанию будет создан обычный стикерпак."
+
+#: of telebot.TeleBot.create_new_sticker_set:45
+msgid ""
+"Pass True if stickers in the sticker set must be repainted to the color "
+"of text when used in messages, the accent color if used as emoji status, "
+"white on chat photos, or another appropriate color based on context; for "
+"custom emoji sticker sets only"
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:50
+msgid "List of stickers to be added to the set"
+msgstr ""
+
+#: of telebot.TeleBot.create_new_sticker_set:53
+msgid ""
+"Format of stickers in the set, must be one of “static”, “animated”, "
+"“video”"
+msgstr ""
+
+#: of telebot.TeleBot.decline_chat_join_request:1
+msgid ""
+"Use this method to decline a chat join request. The bot must be an "
+"administrator in the chat for this to work and must have the "
+"can_invite_users administrator right. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы отклонить запрос на вступление в чат. Бот "
+"должен быть администратором чата и иметь права администратора "
+"can_invite_users. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.decline_chat_join_request:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#declinechatjoinrequest"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#declinechatjoinrequest"
+
+#: of telebot.TeleBot.delete_chat_photo:1
+msgid ""
+"Use this method to delete a chat photo. Photos can't be changed for "
+"private chats. The bot must be an administrator in the chat for this to "
+"work and must have the appropriate admin rights. Returns True on success."
+" Note: In regular groups (non-supergroups), this method will only work if"
+" the ‘All Members Are Admins’ setting is off in the target group."
+msgstr ""
+"Используйте этот метод, чтобы удалить фото чата. Нельзя изменить фото в "
+"приватных чатах. Бот должен быть администратором чата и иметь "
+"соответствующие права администратора. Возвращает True в случае успеха. "
+"Примечание: В обычных группах (не супергруппах), метод будет работать "
+"только в случаях, когда настройка ‘All Members Are Admins’ выключена."
+
+#: of telebot.TeleBot.delete_chat_photo:6
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletechatphoto"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deletechatphoto"
+
+#: of telebot.TeleBot.delete_chat_photo:8 telebot.TeleBot.set_chat_photo:9
+#: telebot.TeleBot.unpin_all_chat_messages:7
+msgid ""
+"Int or Str: Unique identifier for the target chat or username of the "
+"target channel (in the format @channelusername)"
+msgstr "Уникальный id чата или username канала (в формате @channelusername)"
+
+#: of telebot.TeleBot.delete_chat_sticker_set:1
+msgid ""
+"Use this method to delete a group sticker set from a supergroup. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate admin rights. Use the field can_set_sticker_set optionally "
+"returned in getChat requests to check if the bot can use this method. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить стикерпак группы из супергруппы. "
+"Бот должен быть администратором чата и иметь соответствующие права "
+"администратора. Используйте поле can_set_sticker_set, возвращаемое "
+"методом getChat, чтобы проверить, что бот может использовать этот метод. "
+"Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.delete_chat_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletechatstickerset"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#deletechatstickerset"
+
+#: of telebot.TeleBot.delete_forum_topic:1
+msgid ""
+"Use this method to delete a topic in a forum supergroup chat. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"can_manage_topics administrator rights, unless it is the creator of the "
+"topic. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить топик в супергруппе. Бот должен "
+"быть администратором чата и иметь права администратора can_manage_topics,"
+" за исключением случае, когда бот является создателем топика. Возвращает "
+"True в случае успеха."
+
+#: of telebot.TeleBot.delete_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deleteforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deleteforumtopic"
+
+#: of telebot.TeleBot.delete_forum_topic:10
+msgid "Identifier of the topic to delete"
+msgstr "id топика, который нужно удалить"
+
+#: of telebot.TeleBot.delete_message:1
+msgid ""
+"Use this method to delete a message, including service messages, with the"
+" following limitations: - A message can only be deleted if it was sent "
+"less than 48 hours ago. - A dice message in a private chat can only be "
+"deleted if it was sent more than 24 hours ago. - Bots can delete outgoing"
+" messages in private chats, groups, and supergroups. - Bots can delete "
+"incoming messages in private chats. - Bots granted can_post_messages "
+"permissions can delete outgoing messages in channels. - If the bot is an "
+"administrator of a group, it can delete any message there. - If the bot "
+"has can_delete_messages permission in a supergroup or a channel, it can "
+"delete any message there. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить сообщение, в том числе сервисное, "
+"ограничения: - Сообщение может быть удалено только если оно было "
+"отправлено менее 48 часов назад. - Dice-сообщение в приватном чате может "
+"быть удалено только если оно было отправлено более 24 часов назад. - Боты"
+" могут удалять свои сообщения в приватных чатах, группах и супергруппах. "
+"- Боты могут удалять чужие сообщение в приватных чатах. - Боты с правами "
+"администратора can_post_messages могут удалять сообщения в каналах. - "
+"Если бот является администратором группы, он может удалить любое "
+"сообщение в ней. - Если бот имеет права администратора "
+"can_delete_messages в супергруппе или канале, он может удалить любое "
+"сообщение в них. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.delete_message:11
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletemessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deletemessage"
+
+#: of telebot.TeleBot.delete_message:16
+msgid "Identifier of the message to delete"
+msgstr "id сообщения, которое нужно удалить"
+
+#: of telebot.TeleBot.delete_messages:1
+msgid ""
+"Use this method to delete multiple messages in a chat. The number of "
+"messages to be deleted must not exceed 100. If the chat is a private "
+"chat, the user must be an administrator of the chat for this to work and "
+"must have the appropriate admin rights. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.delete_messages:6
+#, fuzzy
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletemessages"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deletemessage"
+
+#: of telebot.TeleBot.delete_messages:11
+#, fuzzy
+msgid "Identifiers of the messages to be deleted"
+msgstr "id сообщения, которое нужно удалить"
+
+#: of telebot.TeleBot.delete_my_commands:1
+msgid ""
+"Use this method to delete the list of the bot's commands for the given "
+"scope and user language. After deletion, higher level commands will be "
+"shown to affected users. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить список команд бота для заданных "
+"поля видимости и языка. После удаления, команды более широкого поля "
+"видимости будут доступны пользователям, которых коснулись изменения. "
+"Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.delete_my_commands:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletemycommands"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deletemycommands"
+
+#: of telebot.TeleBot.delete_my_commands:7 telebot.TeleBot.get_my_commands:6
+#: telebot.TeleBot.set_my_commands:8
+msgid ""
+"The scope of users for which the commands are relevant. Defaults to "
+"BotCommandScopeDefault."
+msgstr "Область видимости команд. По умолчанию BotCommandScopeDefault."
+
+#: of telebot.TeleBot.delete_my_commands:11 telebot.TeleBot.get_my_commands:10
+#: telebot.TeleBot.set_my_commands:12
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, commands will be applied "
+"to all users from the given scope, for whose language there are no "
+"dedicated commands"
+msgstr ""
+"Двухбуквенный языковой код в формате ISO 639-1. Если не задан, изменения "
+"коснутся команд для всех пользователей в заданном поле видимости, не "
+"имеющих команд на их языке"
+
+#: of telebot.TeleBot.delete_state:1
+msgid "Delete the current state of a user."
+msgstr "Удалить текущее состояние (стейт) пользователя."
+
+#: of telebot.TeleBot.delete_sticker_from_set:1
+msgid ""
+"Use this method to delete a sticker from a set created by the bot. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить стикер из стикерпака, созданного "
+"ботом. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.delete_sticker_from_set:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#deletestickerfromset"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#deletestickerfromset"
+
+#: of telebot.TeleBot.delete_sticker_from_set:5
+#: telebot.TeleBot.set_sticker_position_in_set:5
+msgid "File identifier of the sticker"
+msgstr "id файла стикера"
+
+#: of telebot.TeleBot.delete_sticker_set:1
+#, fuzzy
+msgid "Use this method to delete a sticker set. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить стикер из стикерпака, созданного "
+"ботом. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.delete_webhook:1
+msgid ""
+"Use this method to remove webhook integration if you decide to switch "
+"back to getUpdates. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить вебхук, если вы решите перейти "
+"обратно на getUpdates. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.delete_webhook:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#deletewebhook"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deletewebhook"
+
+#: of telebot.TeleBot.delete_webhook:6 telebot.TeleBot.run_webhooks:36
+#: telebot.TeleBot.set_webhook:36
+msgid "Pass True to drop all pending updates, defaults to None"
+msgstr ""
+"Передайте True, чтобы удалить все предшествующие запуску бота апдейты, по"
+" умолчанию None"
+
+#: of telebot.TeleBot.delete_webhook:9 telebot.TeleBot.run_webhooks:39
+msgid "Request connection timeout, defaults to None"
+msgstr "Тайм-аут запроса, по умолчанию None"
+
+#: of telebot.TeleBot.disable_save_next_step_handlers:1
+#: telebot.TeleBot.disable_save_reply_handlers:1
+msgid "Disable saving next step handlers (by default saving disable)"
+msgstr ""
+"Отключить сохранение next step хендлеров (по умолчанию сохранение "
+"отключено)"
+
+#: of telebot.TeleBot.disable_save_next_step_handlers:3
+msgid ""
+"This function is left to keep backward compatibility whose purpose was to"
+" disable file saving capability for handlers. For the same purpose, "
+"MemoryHandlerBackend is reassigned as a new next_step_backend backend "
+"instead of FileHandlerBackend."
+msgstr ""
+"Эта функция оставлена для обратной совместимости, для отключения "
+"возможности сохранения хендлеров в файл. В тех же целях "
+"MemoryHandlerBackend переопределен как новый next_step_backend вместо "
+"FileHandlerBackend."
+
+#: of telebot.TeleBot.disable_save_reply_handlers:3
+msgid ""
+"This function is left to keep backward compatibility whose purpose was to"
+" disable file saving capability for handlers. For the same purpose, "
+"MemoryHandlerBackend is reassigned as a new reply_backend backend instead"
+" of FileHandlerBackend."
+msgstr ""
+"Эта функция оставлена для обратной совместимости, для отключения "
+"возможности сохранения хендлеров в файл. В тех же целях "
+"MemoryHandlerBackend переопределен как новый reply_backend вместо "
+"FileHandlerBackend."
+
+#: of telebot.TeleBot.download_file:1
+msgid "Downloads file."
+msgstr "Скачивает файл."
+
+#: of telebot.TeleBot.download_file:3
+msgid "Path where the file should be downloaded."
+msgstr "Путь, куда файл нужно сохранить."
+
+#: of telebot.TeleBot.download_file:6
+msgid "bytes"
+msgstr ""
+
+#: of telebot.TeleBot.download_file:7
+msgid ":obj:`bytes`"
+msgstr ""
+
+#: of telebot.TeleBot.edit_chat_invite_link:1
+msgid ""
+"Use this method to edit a non-primary invite link created by the bot. The"
+" bot must be an administrator in the chat for this to work and must have "
+"the appropriate admin rights."
+msgstr ""
+"Используйте этот метод, чтобы изменить неосновную ссылку-приглашение, "
+"созданную ботом. Бот должен быть администратором чата и иметь "
+"соответствующие права администратора."
+
+#: of telebot.TeleBot.edit_chat_invite_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editchatinvitelink"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#editchatinvitelink"
+
+#: of telebot.TeleBot.edit_chat_invite_link:13
+msgid "The invite link to edit"
+msgstr "Ссылка-приглашение для изменения"
+
+#: of telebot.TeleBot.edit_forum_topic:1
+msgid ""
+"Use this method to edit name and icon of a topic in a forum supergroup "
+"chat. The bot must be an administrator in the chat for this to work and "
+"must have can_manage_topics administrator rights, unless it is the "
+"creator of the topic. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы изменить название и иконку топика в "
+"супергруппе. Бот должен быть администратором чата и иметь права "
+"администратора can_manage_topics, кроме случаев, когда бот является "
+"создателем топика. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.edit_forum_topic:5
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#editforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#editforumtopic"
+
+#: of telebot.TeleBot.edit_forum_topic:10
+msgid "Identifier of the topic to edit"
+msgstr "id топика для изменения"
+
+#: of telebot.TeleBot.edit_forum_topic:13
+msgid ""
+"Optional, New name of the topic, 1-128 characters. If not specififed or "
+"empty, the current name of the topic will be kept"
+msgstr ""
+"Необязательный, новое имя топика, 1-128 символов. Если не задано или "
+"пустое, сохранится текущее имя топика"
+
+#: of telebot.TeleBot.edit_forum_topic:17
+msgid ""
+"Optional, New unique identifier of the custom emoji shown as the topic "
+"icon. Use getForumTopicIconStickers to get all allowed custom emoji "
+"identifiers. Pass an empty string to remove the icon. If not specified, "
+"the current icon will be kept"
+msgstr ""
+"Необязательный, новый уникальный id кастомного эмодзи, используемого в "
+"качестве иконки топика. Используйте getForumTopicIconStickers, чтобы "
+"получить все доступные id кастомных эмодзи. Передайте пустую строку, "
+"чтобы убрать иконку. Если не задан, сохранится текущая иконка топика"
+
+#: of telebot.TeleBot.edit_general_forum_topic:1
+msgid ""
+"Use this method to edit the name of the 'General' topic in a forum "
+"supergroup chat. The bot must be an administrator in the chat for this to"
+" work and must have can_manage_topics administrator rights. Returns True "
+"on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить топик в супергруппе. Бот должен "
+"быть администратором чата и иметь права администратора can_manage_topics,"
+" за исключением случае, когда бот является создателем топика. Возвращает "
+"True в случае успеха."
+
+#: of telebot.TeleBot.edit_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editgeneralforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#editforumtopic"
+
+#: of telebot.TeleBot.edit_general_forum_topic:10
+msgid "New topic name, 1-128 characters"
+msgstr "Название товара, 1-32 символа"
+
+#: of telebot.TeleBot.edit_message_caption:1
+msgid "Use this method to edit captions of messages."
+msgstr "Используйте этот метод, чтобы изменить подписи к медиа в сообщениях"
+
+#: of telebot.TeleBot.edit_message_caption:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagecaption"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#editmessagecaption"
+
+#: of telebot.TeleBot.edit_message_caption:5
+msgid "New caption of the message"
+msgstr "Новая подпись к медиа"
+
+#: of telebot.TeleBot.edit_message_caption:8
+msgid ""
+"Required if inline_message_id is not specified. Unique identifier for the"
+" target chat or username of the target channel"
+msgstr ""
+"Обязательный, если не указан inline_message_id. Уникальный id чата или "
+"username канала"
+
+#: of telebot.TeleBot.edit_message_caption:11
+msgid "Required if inline_message_id is not specified."
+msgstr "Обязательный, если не указан inline_message_id."
+
+#: of telebot.TeleBot.edit_message_caption:14
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the inline "
+"message."
+msgstr "Обязательный, если не указан inline_message_id. id inline сообщения."
+
+#: of telebot.TeleBot.edit_message_caption:17
+msgid "New caption of the message, 0-1024 characters after entities parsing"
+msgstr "Новая подпись к медиа в сообщении, 0-1024 символа после форматирования"
+
+#: of telebot.TeleBot.edit_message_caption:20
+msgid ""
+"A JSON-serialized array of objects that describe how the caption should "
+"be parsed."
+msgstr ""
+"Массив объектов, описывающих то, как будет происходить парсинг подписи к "
+"медиа в формате JSON."
+
+#: of telebot.TeleBot.edit_message_caption:23
+#: telebot.TeleBot.edit_message_media:19
+#: telebot.TeleBot.edit_message_reply_markup:14
+#: telebot.TeleBot.edit_message_text:26
+msgid "A JSON-serialized object for an inline keyboard."
+msgstr "JSON-сериализованный объект inline клавиатуры."
+
+#: of telebot.TeleBot.edit_message_caption:26
+#: telebot.TeleBot.edit_message_media:22
+#: telebot.TeleBot.edit_message_reply_markup:17
+#: telebot.TeleBot.edit_message_text:32
+msgid ""
+"On success, if edited message is sent by the bot, the edited Message is "
+"returned, otherwise True is returned."
+msgstr ""
+"В случае успеха если изменённое сообщение отправлено ботом, возвращается "
+"новый объект Message, иначе (inline сообщения) возвращается True."
+
+#: of telebot.TeleBot.edit_message_caption:27
+msgid ":obj:`types.Message` | :obj:`bool`"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_live_location:3
+msgid ""
+"Use this method to edit live location messages. A location can be edited "
+"until its live_period expires or editing is explicitly"
+msgstr ""
+"Используйте этот метод, чтобы изменить live местоположение в сообщении. "
+"Местоположение может быть изменено пока не истечёт live_period или не"
+
+#: of telebot.TeleBot.edit_message_live_location:2
+msgid ""
+"disabled by a call to stopMessageLiveLocation. On success, if the edited "
+"message is not an inline message, the edited Message is returned, "
+"otherwise True is returned."
+msgstr ""
+"отключено вызовом метода stopMessageLiveLocation. В случае успеха если "
+"измененное сообщение не является inline сообщением, возвращается новый "
+"объект Message, иначе возвращается True."
+
+#: of telebot.TeleBot.edit_message_live_location:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagelivelocation"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#editmessagelivelocation"
+
+#: of telebot.TeleBot.edit_message_live_location:7
+msgid "Latitude of new location"
+msgstr "Широта нового местоположения"
+
+#: of telebot.TeleBot.edit_message_live_location:10
+msgid "Longitude of new location"
+msgstr "Долгота нового местоположения"
+
+#: of telebot.TeleBot.edit_message_live_location:16
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the message"
+" to edit"
+msgstr ""
+"Обязательный, если не указан inline_message_id. id сообщения, которое "
+"нужно изменить"
+
+#: of telebot.TeleBot.edit_message_live_location:19
+#: telebot.TeleBot.stop_message_live_location:15
+msgid "A JSON-serialized object for a new inline keyboard."
+msgstr "JSON-сериализованный объект новой inline клавиатуры."
+
+#: of telebot.TeleBot.edit_message_live_location:26
+#: telebot.TeleBot.edit_message_media:16
+#: telebot.TeleBot.edit_message_reply_markup:11
+#: telebot.TeleBot.edit_message_text:14 telebot.TeleBot.get_game_high_scores:19
+#: telebot.TeleBot.set_game_score:20
+msgid ""
+"Required if chat_id and message_id are not specified. Identifier of the "
+"inline message"
+msgstr "Обязательный, если не указаны chat_id и message_id. id inline сообщения"
+
+#: of telebot.TeleBot.edit_message_live_location:29
+#: telebot.TeleBot.send_location:34
+msgid "The radius of uncertainty for the location, measured in meters; 0-1500"
+msgstr "Радиус погрешности местоположения, измеряется в метрах; 0-1500"
+
+#: of telebot.TeleBot.edit_message_live_location:32
+msgid ""
+"Direction in which the user is moving, in degrees. Must be between 1 and "
+"360 if specified."
+msgstr ""
+"Направление, в котором пользователь двигается, в градусах. Если указано, "
+"должно быть от 1 до 360."
+
+#: of telebot.TeleBot.edit_message_live_location:35
+msgid ""
+"The maximum distance for proximity alerts about approaching another chat "
+"member, in meters. Must be between 1 and 100000 if specified."
+msgstr ""
+"Максимальное расстояние для показа уведомлений о приближении других "
+"участников чата, в метрах. Если указано, должно быть от 1 до 100000."
+
+#: of telebot.TeleBot.edit_message_live_location:38
+msgid ""
+"On success, if the edited message is not an inline message, the edited "
+"Message is returned, otherwise True is returned."
+msgstr ""
+"В случае успеха если измененное сообщение не является inline сообщением, "
+"возвращается новый объект Message, иначе возвращается True."
+
+#: of telebot.TeleBot.edit_message_live_location:39
+#: telebot.TeleBot.stop_message_live_location:23
+msgid ":class:`telebot.types.Message` or bool"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_media:1
+msgid ""
+"Use this method to edit animation, audio, document, photo, or video "
+"messages. If a message is a part of a message album, then it can be "
+"edited only to a photo or a video. Otherwise, message type can be changed"
+" arbitrarily. When inline message is edited, new file can't be uploaded. "
+"Use previously uploaded file via its file_id or specify a URL."
+msgstr ""
+"Используйте этот метод, чтобы изменить гифку, аудио, документ, фото или "
+"видео в сообщении. Если сообщение является частью альбома, оно может быть"
+" изменено только на фото или видео. Иначе, тип сообщения может быть "
+"изменен на любой. При изменении inline сообщения, нельзя загрузить новый "
+"файл. используйте ранее загруженные файлы через file_id или укажите URL."
+
+#: of telebot.TeleBot.edit_message_media:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagemedia"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#editmessagemedia"
+
+#: of telebot.TeleBot.edit_message_media:8
+msgid "A JSON-serialized object for a new media content of the message"
+msgstr "JSON-сериализованный объект нового медиа контента"
+
+#: of telebot.TeleBot.edit_message_media:10
+#: telebot.TeleBot.edit_message_reply_markup:5
+#: telebot.TeleBot.edit_message_text:8 telebot.TeleBot.get_game_high_scores:13
+#: telebot.TeleBot.set_game_score:14
+msgid ""
+"Required if inline_message_id is not specified. Unique identifier for the"
+" target chat or username of the target channel (in the format "
+"@channelusername)"
+msgstr ""
+"Обязательный, если не указан inline_message_id. Уникальный id чата или "
+"username канала (в формате @channelusername)"
+
+#: of telebot.TeleBot.edit_message_media:13
+#: telebot.TeleBot.edit_message_reply_markup:8
+#: telebot.TeleBot.edit_message_text:11 telebot.TeleBot.get_game_high_scores:16
+#: telebot.TeleBot.set_game_score:17
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the sent "
+"message"
+msgstr "Обязательный, если не указан inline_message_id. id отправленного сообщения"
+
+#: of telebot.TeleBot.edit_message_media:23
+#: telebot.TeleBot.edit_message_reply_markup:18
+#: telebot.TeleBot.edit_message_text:33 telebot.TeleBot.set_game_score:27
+msgid ":obj:`types.Message` or :obj:`bool`"
+msgstr ""
+
+#: of telebot.TeleBot.edit_message_reply_markup:1
+msgid "Use this method to edit only the reply markup of messages."
+msgstr "Используйте этот метод, чтобы изменить только reply markup сообщения."
+
+#: of telebot.TeleBot.edit_message_reply_markup:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#editmessagereplymarkup"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#editmessagereplymarkup"
+
+#: of telebot.TeleBot.edit_message_text:1
+msgid "Use this method to edit text and game messages."
+msgstr "Используйте этот метод, чтобы изменить текстовые и игровые сообщения."
+
+#: of telebot.TeleBot.edit_message_text:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#editmessagetext"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#editmessagetext"
+
+#: of telebot.TeleBot.edit_message_text:5
+msgid "New text of the message, 1-4096 characters after entities parsing"
+msgstr "Новый текст сообщения, 1-4096 символов после форматирования"
+
+#: of telebot.TeleBot.edit_message_text:17 telebot.TeleBot.send_message:15
+msgid "Mode for parsing entities in the message text."
+msgstr "Режим форматирования в тексте сообщения."
+
+#: of telebot.TeleBot.edit_message_text:20
+msgid ""
+"List of special entities that appear in the message text, which can be "
+"specified instead of parse_mode"
+msgstr ""
+"Список отформатированных частей в тексте сообщения, можно использовать "
+"вместо parse_mode"
+
+#: of telebot.TeleBot.edit_message_text:29
+msgid ""
+"A JSON-serialized object for options used to automatically generate "
+"previews for links."
+msgstr ""
+
+#: of telebot.TeleBot.edited_channel_post_handler:1
+msgid ""
+"Handles new version of a channel post that is known to the bot and was "
+"edited. As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+"Обрабатывает новую версию поста в канале, который доступен боту и был "
+"изменён. В качестве параметра, передаёт в декорируемую функцию объект "
+":class:`telebot.types.Message`."
+
+#: of telebot.TeleBot.edited_message_handler:1
+msgid ""
+"Handles new version of a message that is known to the bot and was edited."
+" As a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object."
+msgstr ""
+"Обрабатывает новую версию сообщения, которое доступно боту и было "
+"изменено. В качестве параметра, передаёт в декорируемую функцию объект "
+":class:`telebot.types.Message`."
+
+#: of telebot.TeleBot.edited_message_handler:16
+#: telebot.TeleBot.message_handler:47
+msgid "list of chat types"
+msgstr "список видов чатов"
+
+#: of telebot.TeleBot.enable_save_next_step_handlers:1
+msgid "Enable saving next step handlers (by default saving disabled)"
+msgstr ""
+"Разрешить сохранение next step хендлеров (по умолчанию сохранение "
+"отключено)"
+
+#: of telebot.TeleBot.enable_save_next_step_handlers:3
+#: telebot.TeleBot.enable_save_reply_handlers:3
+msgid ""
+"This function explicitly assigns FileHandlerBackend (instead of Saver) "
+"just to keep backward compatibility whose purpose was to enable file "
+"saving capability for handlers. And the same implementation is now "
+"available with FileHandlerBackend"
+msgstr ""
+"Эта функция, целью которой было включить возможность сохранения файлов "
+"для обработчиков, явно назначает FileHandlerBackend (вместо Saver) просто"
+" для сохранения обратной совместимости. Та же реализация теперь доступна "
+"с FileHandlerBackend."
+
+#: of telebot.TeleBot.enable_save_next_step_handlers:7
+#: telebot.TeleBot.enable_save_reply_handlers:7
+msgid "Delay between changes in handlers and saving, defaults to 120"
+msgstr "Задержка между изменениями в хендлерах и сохранении, по умолчанию 120"
+
+#: of telebot.TeleBot.enable_save_next_step_handlers:10
+msgid "Filename of save file, defaults to \"./.handler-saves/step.save\""
+msgstr "Имя файла для сохранения, по умолчанию \"./.handler-saves/step.save\""
+
+#: of telebot.TeleBot.enable_save_reply_handlers:1
+msgid "Enable saving reply handlers (by default saving disable)"
+msgstr "Разрешить сохранение reply хендлеров (по умолчанию сохранение отключено)"
+
+#: of telebot.TeleBot.enable_save_reply_handlers:10
+msgid "Filename of save file, defaults to \"./.handler-saves/reply.save\""
+msgstr "Имя файла для сохранения, по умолчанию \"./.handler-saves/reply.save\""
+
+#: of telebot.TeleBot.enable_saving_states:1
+msgid "Enable saving states (by default saving disabled)"
+msgstr "Разрешить сохранение стейтов (по умолчанию сохранение отключено)"
+
+#: of telebot.TeleBot.enable_saving_states:4
+msgid ""
+"It is recommended to pass a :class:`~telebot.storage.StatePickleStorage` "
+"instance as state_storage to TeleBot class."
+msgstr ""
+"Рекомендуется передавать экземпляр класса "
+":class:`~telebot.storage.StatePickleStorage` в качестве state_storage при"
+" инициализации класса TeleBot вместо использования этой функции."
+
+#: of telebot.TeleBot.enable_saving_states:7
+msgid "Filename of saving file, defaults to \"./.state-save/states.pkl\""
+msgstr "Имя файла для сохранения, по умолчанию \"./.state-save/states.pkl\""
+
+#: of telebot.TeleBot.export_chat_invite_link:1
+msgid ""
+"Use this method to export an invite link to a supergroup or a channel. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights."
+msgstr ""
+"Используйте этот метод, чтобы создать или заменить главную "
+"ссылку-приглашение в супергруппу или канал, созданную ботом. Бот должен "
+"быть администратором чата и иметь соответствующие права администратора."
+
+#: of telebot.TeleBot.export_chat_invite_link:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#exportchatinvitelink"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#exportchatinvitelink"
+
+#: of telebot.TeleBot.export_chat_invite_link:10
+msgid "exported invite link as String on success."
+msgstr "новая ссылка-приглашение (String) в случае успеха."
+
+#: of telebot.TeleBot.forward_message:1 telebot.TeleBot.forward_messages:1
+msgid "Use this method to forward messages of any kind."
+msgstr "Используйте этот метод, чтобы переслать любое сообщение."
+
+#: of telebot.TeleBot.forward_message:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#forwardmessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#forwardmessage"
+
+#: of telebot.TeleBot.forward_message:26 telebot.TeleBot.forward_messages:21
+#: telebot.TeleBot.reply_to:11 telebot.TeleBot.send_animation:69
+#: telebot.TeleBot.send_audio:69 telebot.TeleBot.send_contact:46
+#: telebot.TeleBot.send_dice:38 telebot.TeleBot.send_document:62
+#: telebot.TeleBot.send_game:35 telebot.TeleBot.send_invoice:104
+#: telebot.TeleBot.send_location:52 telebot.TeleBot.send_message:52
+#: telebot.TeleBot.send_photo:51 telebot.TeleBot.send_poll:73
+#: telebot.TeleBot.send_sticker:45 telebot.TeleBot.send_venue:59
+#: telebot.TeleBot.send_video:70 telebot.TeleBot.send_video_note:54
+#: telebot.TeleBot.send_voice:52
+msgid "On success, the sent Message is returned."
+msgstr "В случае успеха возвращает отправленное сообщение (Message)."
+
+#: of telebot.TeleBot.forward_message:27 telebot.TeleBot.reply_to:12
+#: telebot.TeleBot.send_animation:70 telebot.TeleBot.send_audio:70
+#: telebot.TeleBot.send_contact:47 telebot.TeleBot.send_dice:39
+#: telebot.TeleBot.send_document:63 telebot.TeleBot.send_location:53
+#: telebot.TeleBot.send_message:53 telebot.TeleBot.send_photo:52
+#: telebot.TeleBot.send_sticker:46 telebot.TeleBot.send_venue:60
+#: telebot.TeleBot.send_video:71 telebot.TeleBot.send_video_note:55
+msgid ":class:`telebot.types.Message`"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat:1
+msgid ""
+"Use this method to get up to date information about the chat (current "
+"name of the user for one-on-one conversations, current username of a "
+"user, group or channel, etc.). Returns a Chat object on success."
+msgstr ""
+"Используйте этот метод, чтобы получить актуальную информацию о чате "
+"(текущее имя пользователя для персональных диалогов, текущий username "
+"пользователя, группы или канала и т.д.). В случае успеха возвращает "
+"объект Chat."
+
+#: of telebot.TeleBot.get_chat:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getchat"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getchat"
+
+#: of telebot.TeleBot.get_chat:6 telebot.TeleBot.get_chat_administrators:7
+#: telebot.TeleBot.get_chat_member_count:5 telebot.TeleBot.leave_chat:5
+#: telebot.TeleBot.set_message_reaction:5
+msgid ""
+"Unique identifier for the target chat or username of the target "
+"supergroup or channel (in the format @channelusername)"
+msgstr ""
+"Уникальный id чата или username супергруппы или канала (в формате "
+"@channelusername)"
+
+#: of telebot.TeleBot.get_chat:9
+msgid "Chat information"
+msgstr "Информация о чате"
+
+#: of telebot.TeleBot.get_chat:10
+msgid ":class:`telebot.types.Chat`"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_administrators:1
+msgid ""
+"Use this method to get a list of administrators in a chat. On success, "
+"returns an Array of ChatMember objects that contains information about "
+"all chat administrators except other bots."
+msgstr ""
+"Используйте этот метод, чтобы получить список администраторов чата. В "
+"случае успеха возвращает массив объектов ChatMember, содержащих "
+"информацию обо всех администраторах чата, кроме других ботов."
+
+#: of telebot.TeleBot.get_chat_administrators:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getchatadministrators"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getchatadministrators"
+
+#: of telebot.TeleBot.get_chat_administrators:9
+msgid "List made of ChatMember objects."
+msgstr "Список объектов ChatMember."
+
+#: of telebot.TeleBot.get_chat_administrators:10
+msgid ":obj:`list` of :class:`telebot.types.ChatMember`"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_member:1
+msgid ""
+"Use this method to get information about a member of a chat. Returns a "
+"ChatMember object on success."
+msgstr ""
+"Используйте этот метод, чтобы получить информацию об участнике чата. "
+"Возвращает объект ChatMember в случае успеха."
+
+#: of telebot.TeleBot.get_chat_member:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getchatmember"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getchatmember"
+
+#: of telebot.TeleBot.get_chat_member:11
+msgid "Returns ChatMember object on success."
+msgstr "Возвращает объект ChatMember в случае успеха."
+
+#: of telebot.TeleBot.get_chat_member:12
+msgid ":class:`telebot.types.ChatMember`"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_member_count:1
+msgid "Use this method to get the number of members in a chat."
+msgstr "Используйте этот метод, чтобы получить количество участников чата."
+
+#: of telebot.TeleBot.get_chat_member_count:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getchatmembercount"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getchatmembercount"
+
+#: of telebot.TeleBot.get_chat_member_count:8
+msgid "Number of members in the chat."
+msgstr "Количество участников чата."
+
+#: of telebot.TeleBot.get_chat_member_count:9
+msgid ":obj:`int`"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_menu_button:1
+msgid ""
+"Use this method to get the current value of the bot's menu button in a "
+"private chat, or the default menu button. Returns MenuButton on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущее значение кнопки menu в "
+"приватном чате, или кнопку menu по умолчанию. Возвращает MenuButton в "
+"случае успеха."
+
+#: of telebot.TeleBot.get_chat_menu_button:5
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#getchatmenubutton"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getchatmenubutton"
+
+#: of telebot.TeleBot.get_chat_menu_button:7
+msgid ""
+"Unique identifier for the target private chat. If not specified, default "
+"bot's menu button will be returned."
+msgstr ""
+"Уникальный id приватного чата. Если не указан, будет возвращена кнопка "
+"menu по умолчанию."
+
+#: of telebot.TeleBot.get_chat_menu_button:11
+msgid "types.MenuButton"
+msgstr ""
+
+#: of telebot.TeleBot.get_chat_menu_button:12
+msgid ":class:`telebot.types.MenuButton`"
+msgstr ""
+
+#: of telebot.TeleBot.get_custom_emoji_stickers:1
+msgid ""
+"Use this method to get information about custom emoji stickers by their "
+"identifiers. Returns an Array of Sticker objects."
+msgstr ""
+"Используйте этот метод, чтобы получить информацию о кастомных эмодзи по "
+"их id. Возвращает массив объектов Sticker."
+
+#: of telebot.TeleBot.get_custom_emoji_stickers:4
+msgid ""
+"List of custom emoji identifiers. At most 200 custom emoji identifiers "
+"can be specified."
+msgstr "Список id кастомных эмодзи. Можно указать не более 200 id."
+
+#: of telebot.TeleBot.get_custom_emoji_stickers:7
+msgid "Returns an Array of Sticker objects."
+msgstr "Возвращает массив объектов Sticker."
+
+#: of telebot.TeleBot.get_custom_emoji_stickers:8
+msgid ":obj:`list` of :class:`telebot.types.Sticker`"
+msgstr ""
+
+#: of telebot.TeleBot.get_file:1
+msgid ""
+"Use this method to get basic info about a file and prepare it for "
+"downloading. For the moment, bots can download files of up to 20MB in "
+"size. On success, a File object is returned. It is guaranteed that the "
+"link will be valid for at least 1 hour. When the link expires, a new one "
+"can be requested by calling get_file again."
+msgstr ""
+"Используйте этот метод, чтобы получить базовую информацию о файле и "
+"подготовить его к скачиванию. На текущий момент, боты могут скачивать "
+"файлы весом до 20MB. В случае успеха возвращается объект File. "
+"Гарантируется, что ссылка на скачивание будет актуальна как минимум 1 "
+"час. Когда ссылка перестаёт быть актуальной, новая может быть снова "
+"запрошена с помощью get_file."
+
+#: of telebot.TeleBot.get_file:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getfile"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getfile"
+
+#: of telebot.TeleBot.get_file:9
+msgid "File identifier"
+msgstr "id файла"
+
+#: of telebot.TeleBot.get_file:12 telebot.TeleBot.upload_sticker_file:21
+msgid ":class:`telebot.types.File`"
+msgstr ""
+
+#: of telebot.TeleBot.get_file_url:1
+msgid "Get a valid URL for downloading a file."
+msgstr "Получить актуальную ссылку для скачивания файла."
+
+#: of telebot.TeleBot.get_file_url:3
+msgid "File identifier to get download URL for."
+msgstr "id файла для получения ссылки на скачивание."
+
+#: of telebot.TeleBot.get_file_url:6
+msgid "URL for downloading the file."
+msgstr "Ссылка для скачивания файла."
+
+#: of telebot.TeleBot.get_forum_topic_icon_stickers:1
+msgid ""
+"Use this method to get custom emoji stickers, which can be used as a "
+"forum topic icon by any user. Requires no parameters. Returns an Array of"
+" Sticker objects."
+msgstr ""
+"Используйте этот метод, чтобы получить кастомные эмодзи, которые могут "
+"быть использованы любыми пользователями в качестве иконок топиков. Не "
+"требует параметров. Возвращает массив объектов Sticker."
+
+#: of telebot.TeleBot.get_forum_topic_icon_stickers:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getforumtopiciconstickers"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getforumtopiciconstickers"
+
+#: of telebot.TeleBot.get_forum_topic_icon_stickers:6
+msgid "On success, a list of StickerSet objects is returned."
+msgstr "В случае успеха возвращается список объектов StickerSet."
+
+#: of telebot.TeleBot.get_forum_topic_icon_stickers:7
+msgid "List[:class:`telebot.types.StickerSet`]"
+msgstr ""
+
+#: of telebot.TeleBot.get_game_high_scores:1
+msgid ""
+"Use this method to get data for high score tables. Will return the score "
+"of the specified user and several of their neighbors in a game. On "
+"success, returns an Array of GameHighScore objects."
+msgstr ""
+"Используйте этот метод, чтобы получить данные для таблицы рекордов. "
+"Вернёт очки указанного пользователя и несколько соседних результатов. В "
+"случае успеха возвращает массив объектов GameHighScore."
+
+#: of telebot.TeleBot.get_game_high_scores:4
+msgid ""
+"This method will currently return scores for the target user, plus two of"
+" their closest neighbors on each side. Will also return the top three "
+"users if the user and their neighbors are not among them. Please note "
+"that this behavior is subject to change."
+msgstr ""
+"На текущий момент этот метод вернёт очки указанного пользователя и по два"
+" соседних результата с каждой стороны. Также вернет результаты трёх "
+"лучших игроков, если результат пользователя и соседние не являются тремя "
+"лучшими. Пожалуйста учитывайте, что это поведение может быть изменено."
+
+#: of telebot.TeleBot.get_game_high_scores:8
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getgamehighscores"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getgamehighscores"
+
+#: of telebot.TeleBot.get_game_high_scores:10 telebot.TeleBot.retrieve_data:3
+#: telebot.TeleBot.set_game_score:5 telebot.TeleBot.set_sticker_set_thumbnail:9
+msgid "User identifier"
+msgstr "id пользователя"
+
+#: of telebot.TeleBot.get_game_high_scores:22
+msgid "On success, returns an Array of GameHighScore objects."
+msgstr "В случае успеха возвращает массив объектов GameHighScore."
+
+#: of telebot.TeleBot.get_me:1
+msgid ""
+"A simple method for testing your bot's authentication token. Requires no "
+"parameters. Returns basic information about the bot in form of a User "
+"object."
+msgstr ""
+"Простой метод для тестирования токена бота. Не требует параметров. "
+"Возвращает базовую информацию о боте в виде объекта User."
+
+#: of telebot.TeleBot.get_me:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getme"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getme"
+
+#: of telebot.TeleBot.get_my_commands:1
+msgid ""
+"Use this method to get the current list of the bot's commands. Returns "
+"List of BotCommand on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий список команд бота. "
+"Возвращает список объектов BotCommand в случае успеха."
+
+#: of telebot.TeleBot.get_my_commands:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getmycommands"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getmycommands"
+
+#: of telebot.TeleBot.get_my_commands:15
+msgid "List of BotCommand on success."
+msgstr "Список объектов BotCommand в случае успеха."
+
+#: of telebot.TeleBot.get_my_commands:16
+msgid ":obj:`list` of :class:`telebot.types.BotCommand`"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_default_administrator_rights:1
+msgid ""
+"Use this method to get the current default administrator rights of the "
+"bot. Returns ChatAdministratorRights on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущие права администратора для "
+"бота по умолчанию. Возвращает объект ChatAdministratorRights в случае "
+"успеха."
+
+#: of telebot.TeleBot.get_my_default_administrator_rights:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getmydefaultadministratorrights"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getmydefaultadministratorrights"
+
+#: of telebot.TeleBot.get_my_default_administrator_rights:6
+msgid ""
+"Pass True to get the default administrator rights of the bot in channels."
+" Otherwise, the default administrator rights of the bot for groups and "
+"supergroups will be returned."
+msgstr ""
+"Передайте True, чтобы получить права администратора для бота по умолчанию"
+" в каналах. Иначе, будут возвращены права администратора для бота по "
+"умолчанию в группах и супергруппах."
+
+#: of telebot.TeleBot.get_my_default_administrator_rights:9
+msgid "Returns ChatAdministratorRights on success."
+msgstr "Возвращает объект ChatAdministratorRights в случае успеха."
+
+#: of telebot.TeleBot.get_my_default_administrator_rights:10
+msgid ":class:`telebot.types.ChatAdministratorRights`"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_description:1
+#, fuzzy
+msgid ""
+"Use this method to get the current bot description for the given user "
+"language. Returns BotDescription on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий список команд бота. "
+"Возвращает список объектов BotCommand в случае успеха."
+
+#: of telebot.TeleBot.get_my_description:4
+#, fuzzy
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getmydescription"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatdescription"
+
+#: of telebot.TeleBot.get_my_description:6
+#: telebot.TeleBot.get_my_short_description:6
+msgid "A two-letter ISO 639-1 language code or an empty string"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_description:9
+#, fuzzy
+msgid ":class:`telebot.types.BotDescription`"
+msgstr "Экземпляр класса :class:`telebot.types.Message`"
+
+#: of telebot.TeleBot.get_my_name:1
+#, fuzzy
+msgid ""
+"Use this method to get the current bot name for the given user language. "
+"Returns BotName on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий список команд бота. "
+"Возвращает список объектов BotCommand в случае успеха."
+
+#: of telebot.TeleBot.get_my_name:4
+#, fuzzy
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getmyname"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getme"
+
+#: of telebot.TeleBot.get_my_name:6
+msgid "Optional. A two-letter ISO 639-1 language code or an empty string"
+msgstr ""
+
+#: of telebot.TeleBot.get_my_name:9
+#, fuzzy
+msgid ":class:`telebot.types.BotName`"
+msgstr "Экземпляр класса :class:`telebot.types.Message`"
+
+#: of telebot.TeleBot.get_my_short_description:1
+#, fuzzy
+msgid ""
+"Use this method to get the current bot short description for the given "
+"user language. Returns BotShortDescription on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий список команд бота. "
+"Возвращает список объектов BotCommand в случае успеха."
+
+#: of telebot.TeleBot.get_my_short_description:4
+#, fuzzy
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getmyshortdescription"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatdescription"
+
+#: of telebot.TeleBot.get_my_short_description:9
+msgid ":class:`telebot.types.BotShortDescription`"
+msgstr ""
+
+#: of telebot.TeleBot.get_state:1
+msgid ""
+"Gets current state of a user. Not recommended to use this method. But it "
+"is ok for debugging."
+msgstr ""
+"Получает текущее состояние (стейт) пользователя. Не рекомендуется "
+"использовать этот метод. Но это удобно для дебага."
+
+#: of telebot.TeleBot.get_state:10
+msgid "state of a user"
+msgstr "состояние (стейт) пользователя"
+
+#: of telebot.TeleBot.get_state:11
+msgid ":obj:`int` or :obj:`str` or :class:`telebot.types.State`"
+msgstr ""
+
+#: of telebot.TeleBot.get_sticker_set:1
+msgid ""
+"Use this method to get a sticker set. On success, a StickerSet object is "
+"returned."
+msgstr ""
+"Используйте этот метод, чтобы получить стикерпак. В случае успеха "
+"возвращается объект StickerSet."
+
+#: of telebot.TeleBot.get_sticker_set:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getstickerset"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getstickerset"
+
+#: of telebot.TeleBot.get_sticker_set:8
+msgid "On success, a StickerSet object is returned."
+msgstr "В случае успеха возвращается объект StickerSet."
+
+#: of telebot.TeleBot.get_sticker_set:9 telebot.TeleBot.set_chat_sticker_set:14
+msgid ":class:`telebot.types.StickerSet`"
+msgstr ""
+
+#: of telebot.TeleBot.get_updates:1
+msgid ""
+"Use this method to receive incoming updates using long polling (wiki). An"
+" Array of Update objects is returned."
+msgstr ""
+"Используйте этот метод, чтобы получить новые апдейты с помощью long "
+"polling-а (wiki). Возвращается массив объектов Update."
+
+#: of telebot.TeleBot.get_updates:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getupdates"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getupdates"
+
+#: of telebot.TeleBot.get_updates:6
+msgid ""
+"Identifier of the first update to be returned. Must be greater by one "
+"than the highest among the identifiers of previously received updates. By"
+" default, updates starting with the earliest unconfirmed update are "
+"returned. An update is considered confirmed as soon as getUpdates is "
+"called with an offset higher than its update_id. The negative offset can "
+"be specified to retrieve updates starting from -offset update from the "
+"end of the updates queue. All previous updates will forgotten."
+msgstr ""
+"id первого апдейта. Должен быть на единицу больше наибольшего id среди "
+"ранее полученных апдейтов. По умолчанию, возвращается список апдейтов, "
+"начиная с самого раннего неполученного. Апдейт считается полученным как "
+"только вызван метод getUpdates со смещением больше, чем id этого апдейта."
+" Отрицательное смещение может быть указано для получения последних offset"
+" апдейтов. Все предыдущие апдейты будут считаться полученными."
+
+#: of telebot.TeleBot.get_updates:12
+msgid ""
+"Limits the number of updates to be retrieved. Values between 1-100 are "
+"accepted. Defaults to 100."
+msgstr ""
+"Максимальное число апдейтов для получения. Допускаются значения от 1 до "
+"100. По умолчанию 100."
+
+#: of telebot.TeleBot.get_updates:15 telebot.TeleBot.get_webhook_info:6
+#: telebot.TeleBot.polling:21
+msgid "Request connection timeout"
+msgstr "Тайм-аут запроса"
+
+#: of telebot.TeleBot.get_updates:18
+msgid "Array of string. List the types of updates you want your bot to receive."
+msgstr "Массив строк. Список видов апдейтов, которые вы хотите получать."
+
+#: of telebot.TeleBot.get_updates:21
+msgid "Timeout in seconds for long polling."
+msgstr "Тайм-аут поллинга в секундах."
+
+#: of telebot.TeleBot.get_updates:24
+msgid "An Array of Update objects is returned."
+msgstr "Возвращается массив объектов Update."
+
+#: of telebot.TeleBot.get_updates:25
+msgid ":obj:`list` of :class:`telebot.types.Update`"
+msgstr ""
+
+#: of telebot.TeleBot.get_user_chat_boosts:1
+#, fuzzy
+msgid ""
+"Use this method to get the list of boosts added to a chat by a user. "
+"Requires administrator rights in the chat. Returns a UserChatBoosts "
+"object."
+msgstr ""
+"Используйте этот метод, чтобы получить список бустов, полученных от "
+"пользователя. Бот должен быть администратором чата. Возвращает объект "
+"UserChatBoosts в случае успеха."
+
+#: of telebot.TeleBot.get_user_chat_boosts:3
+#, fuzzy
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getuserchatboosts"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getuserchatboosts"
+
+#: of telebot.TeleBot.get_user_chat_boosts:5
+#: telebot.TeleBot.send_chat_action:10 telebot.TeleBot.send_contact:5
+#: telebot.TeleBot.send_poll:6 telebot.TeleBot.send_venue:5
+#: telebot.TeleBot.stop_poll:5
+msgid "Unique identifier for the target chat or username of the target channel"
+msgstr "Уникальный id чата или username канала"
+
+#: of telebot.TeleBot.get_user_chat_boosts:11
+#, fuzzy
+msgid "On success, a UserChatBoosts object is returned."
+msgstr "В случае успеха возвращается объект UserChatBoosts."
+
+#: of telebot.TeleBot.get_user_chat_boosts:12
+#, fuzzy
+msgid ":class:`telebot.types.UserChatBoosts`"
+msgstr "Экземпляр класса :class:`telebot.types.UserChatBoosts`"
+
+#: of telebot.TeleBot.get_user_profile_photos:1
+msgid ""
+"Use this method to get a list of profile pictures for a user. Returns a "
+":class:`telebot.types.UserProfilePhotos` object."
+msgstr ""
+"Используйте этот метод, чтобы получить список аватарок пользователя. "
+"Возвращает объект :class:`telebot.types.UserProfilePhotos`."
+
+#: of telebot.TeleBot.get_user_profile_photos:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#getuserprofilephotos"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#getuserprofilephotos"
+
+#: of telebot.TeleBot.get_user_profile_photos:9
+msgid ""
+"Sequential number of the first photo to be returned. By default, all "
+"photos are returned."
+msgstr ""
+"Порядковый номер первого фото для получения. По умолчанию, возвращаются "
+"все фото."
+
+#: of telebot.TeleBot.get_user_profile_photos:12
+msgid ""
+"Limits the number of photos to be retrieved. Values between 1-100 are "
+"accepted. Defaults to 100."
+msgstr ""
+"Максимальное число фото для получения. Допускаются значения от 1 до 100. "
+"По умолчанию 100."
+
+#: of telebot.TeleBot.get_user_profile_photos:15
+msgid ""
+"`UserProfilePhotos "
+"`_"
+msgstr ""
+
+#: of telebot.TeleBot.get_user_profile_photos:16
+msgid ":class:`telebot.types.UserProfilePhotos`"
+msgstr ""
+
+#: of telebot.TeleBot.get_webhook_info:1
+msgid ""
+"Use this method to get current webhook status. Requires no parameters. On"
+" success, returns a WebhookInfo object. If the bot is using getUpdates, "
+"will return an object with the url field empty."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий статус вебхука. Не требует"
+" параметров. В случае успеха возвращает объект WebhookInfo. Если бот "
+"использует getUpdates, вернёт объект с пустым атрибутом url."
+
+#: of telebot.TeleBot.get_webhook_info:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#getwebhookinfo"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#getwebhookinfo"
+
+#: of telebot.TeleBot.get_webhook_info:9
+msgid "On success, returns a WebhookInfo object."
+msgstr "В случае успеха возвращает объект WebhookInfo."
+
+#: of telebot.TeleBot.get_webhook_info:10
+msgid ":class:`telebot.types.WebhookInfo`"
+msgstr ""
+
+#: of telebot.TeleBot.hide_general_forum_topic:1
+msgid ""
+"Use this method to hide the 'General' topic in a forum supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить топик в супергруппе. Бот должен "
+"быть администратором чата и иметь права администратора can_manage_topics,"
+" за исключением случае, когда бот является создателем топика. Возвращает "
+"True в случае успеха."
+
+#: of telebot.TeleBot.hide_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#hidegeneralforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#deleteforumtopic"
+
+#: of telebot.TeleBot.infinity_polling:1
+msgid ""
+"Wrap polling with infinite loop and exception handling to avoid bot stops"
+" polling."
+msgstr ""
+"Запустить поллинг в бесконечном цикле с обработкой исключений, чтобы "
+"избежать непредвиденных остановок поллинга."
+
+#: of telebot.TeleBot.infinity_polling:5 telebot.TeleBot.polling:13
+msgid "Install watchdog and psutil before using restart_on_change option."
+msgstr "Установите watchdog и psutil, чтобы использовать restart_on_change."
+
+#: of telebot.TeleBot.infinity_polling:7
+msgid "Request connection timeout."
+msgstr "Тайм-аут запроса."
+
+#: of telebot.TeleBot.infinity_polling:10 telebot.TeleBot.polling:27
+msgid "Timeout in seconds for long polling (see API docs)"
+msgstr "Тайм-аут поллинга в секундах (см. документацию API)"
+
+#: of telebot.TeleBot.infinity_polling:13 telebot.TeleBot.polling:24
+msgid "skip old updates"
+msgstr "пропускать старые апдейты"
+
+#: of telebot.TeleBot.infinity_polling:16 telebot.TeleBot.polling:30
+msgid ""
+"Custom (different from logger itself) logging level for infinity_polling "
+"logging. Use logger levels from logging as a value. None/NOTSET = no "
+"error logging"
+msgstr ""
+"Кастомный (отличающийся от логгера) уровень логирования для "
+"infinity_polling. Используйте уровни из logging в качестве значений. "
+"None/NOTSET = не логировать ошибки."
+
+#: of telebot.TeleBot.infinity_polling:20
+msgid ""
+"A list of the update types you want your bot to receive. For example, "
+"specify [“message”, “edited_channel_post”, “callback_query”] to only "
+"receive updates of these types. See util.update_types for a complete list"
+" of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used. Please note that this parameter doesn't affect "
+"updates created before the call to the get_updates, so unwanted updates "
+"may be received for a short period of time."
+msgstr ""
+"Список видов апдейтов, которые вы хотите получать. Например, укажите "
+"[“message”, “edited_channel_post”, “callback_query”], чтобы получать "
+"апдейты только этих видов. Полный список доступных видов апдейтов - "
+"util.update_types. Укажите пустой список, чтобы получать все апдейты, "
+"кроме chat_member (по умолчанию). Если не задан, будет использована "
+"последняя настройка. Пожалуйста учитывайте, что этот параметр не влияет "
+"на апдейты, отправленные до вызова get_updates, поэтому нежелательные "
+"апдейты могут быть получены в течение короткого периода времени."
+
+#: of telebot.TeleBot.infinity_polling:29 telebot.TeleBot.polling:47
+msgid "Restart a file on file(s) change. Defaults to False"
+msgstr "Перезапуск при изменении файлов. По умолчанию False"
+
+#: of telebot.TeleBot.infinity_polling:32
+msgid "Path to watch for changes. Defaults to current directory"
+msgstr "Путь для мониторинга изменений. По умолчанию текущая директория."
+
+#: of telebot.TeleBot.inline_handler:1
+msgid ""
+"Handles new incoming inline query. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.InlineQuery` object."
+msgstr ""
+"Обрабатывает inline query. В качестве параметра, передаёт в декорируемую "
+"функцию объект :class:`telebot.types.InlineQuery`."
+
+#: of telebot.TeleBot.leave_chat:1
+msgid ""
+"Use this method for your bot to leave a group, supergroup or channel. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы покинуть группу, супергруппу или канал. "
+"Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.leave_chat:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#leavechat"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#leavechat"
+
+#: of telebot.TeleBot.load_next_step_handlers:1
+msgid "Load next step handlers from save file"
+msgstr "Загрузить next step хендлеры из файла"
+
+#: of telebot.TeleBot.load_next_step_handlers:3
+msgid ""
+"This function is left to keep backward compatibility whose purpose was to"
+" load handlers from file with the help of FileHandlerBackend and is only "
+"recommended to use if next_step_backend was assigned as "
+"FileHandlerBackend before entering this function"
+msgstr ""
+"Эта функция оставлена для обратной совместимости, для загрузки хендлеров "
+"из файла с помощью FileHandlerBackend и рекомендуется к использованию "
+"только если next_step_backend был определён как FileHandlerBackend до "
+"вызова этой функции"
+
+#: of telebot.TeleBot.load_next_step_handlers:8
+msgid ""
+"Filename of the file where handlers was saved, defaults to \"./.handler-"
+"saves/step.save\""
+msgstr ""
+"Имя файла, в котором были сохранены хендлеры, по умолчанию \"./.handler-"
+"saves/step.save\""
+
+#: of telebot.TeleBot.load_next_step_handlers:11
+msgid ""
+"If True is passed, after the loading file will be deleted, defaults to "
+"True"
+msgstr "Если передано True, файл будет удалён после загрузки, по умолчанию True"
+
+#: of telebot.TeleBot.load_reply_handlers:1
+msgid "Load reply handlers from save file"
+msgstr "Загрузить reply хендлеры из файла"
+
+#: of telebot.TeleBot.load_reply_handlers:3
+msgid ""
+"This function is left to keep backward compatibility whose purpose was to"
+" load handlers from file with the help of FileHandlerBackend and is only "
+"recommended to use if reply_backend was assigned as FileHandlerBackend "
+"before entering this function"
+msgstr ""
+"Эта функция оставлена для обратной совместимости, для загрузки хендлеров "
+"из файла с помощью FileHandlerBackend и рекомендуется к использованию "
+"только если reply_backend был определён как FileHandlerBackend до вызова "
+"этой функции"
+
+#: of telebot.TeleBot.load_reply_handlers:7
+msgid ""
+"Filename of the file where handlers was saved, defaults to \"./.handler-"
+"saves/reply.save\""
+msgstr ""
+"Имя файла, в котором были сохранены хендлеры, по умолчанию \"./.handler-"
+"saves/reply.save\""
+
+#: of telebot.TeleBot.load_reply_handlers:10
+msgid ""
+"If True is passed, after the loading file will be deleted, defaults to "
+"True, defaults to True"
+msgstr "Если передано True, файл будет удалён после загрузки, по умолчанию True"
+
+#: of telebot.TeleBot.log_out:1
+msgid ""
+"Use this method to log out from the cloud Bot API server before launching"
+" the bot locally. You MUST log out the bot before running it locally, "
+"otherwise there is no guarantee that the bot will receive updates. After "
+"a successful call, you can immediately log in on a local server, but will"
+" not be able to log in back to the cloud Bot API server for 10 minutes. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы отключиться от облачного Bot API сервера "
+"перед локальным запуском бота. Вы ДОЛЖНЫ отключить бота перед тем, как "
+"запускать его локально, иначе нет никаких гарантий, что бот будет "
+"получать апдейты. После успешного вызова, вы можете тут же подключиться к"
+" локальному серверу, но не сможете подключиться обратно к облачному Bot "
+"API серверу в течение 10 минут. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.log_out:8
+msgid "Telegram documentation: https://core.telegram.org/bots/api#logout"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#logout"
+
+#: of telebot.TeleBot.message_handler:1
+msgid ""
+"Handles New incoming message of any kind - text, photo, sticker, etc. As "
+"a parameter to the decorator function, it passes "
+":class:`telebot.types.Message` object. All message handlers are tested in"
+" the order they were added."
+msgstr ""
+"Обрабатывает входящие сообщения всех видов - text, photo, sticker, и т.д."
+" В качестве параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.Message`. Все хендлеры сообщений проверяются в том "
+"порядке, в котором были добавлены."
+
+#: of telebot.TeleBot.message_handler:5 telebot.TeleBot.middleware_handler:7
+#: telebot.TeleBot.register_middleware_handler:6
+msgid "Example:"
+msgstr "Пример:"
+
+#: of telebot.TeleBot.message_handler:7
+msgid "Usage of message_handler"
+msgstr "Использование message_handler"
+
+#: of telebot.TeleBot.message_handler:40
+msgid ""
+"Optional lambda function. The lambda receives the message to test as the "
+"first parameter. It must return True if the command should handle the "
+"message."
+msgstr ""
+"Необязательная lambda функция. Получает сообщение (объект Message) в "
+"качестве первого параметра. Функция должна вернуть True если хендлер "
+"должен обработать сообщение."
+
+#: of telebot.TeleBot.message_handler:52
+#: telebot.TeleBot.register_edited_channel_post_handler:23
+#: telebot.TeleBot.register_inline_handler:14
+#: telebot.TeleBot.register_pre_checkout_query_handler:13
+msgid "decorated function"
+msgstr "декорируемая функция"
+
+#: of telebot.TeleBot.message_reaction_count_handler:1
+#, fuzzy
+msgid ""
+"Handles new incoming message reaction count. As a parameter to the "
+"decorator function, it passes "
+":class:`telebot.types.MessageReactionCountUpdated` object."
+msgstr ""
+"Обрабатывает новый callback query. В качестве параметра передаёт в "
+"декорируемую функцию объект :class:`telebot.types.CallbackQuery`."
+
+#: of telebot.TeleBot.message_reaction_handler:1
+#, fuzzy
+msgid ""
+"Handles new incoming message reaction. As a parameter to the decorator "
+"function, it passes :class:`telebot.types.MessageReactionUpdated` object."
+msgstr ""
+"Обрабатывает новый callback query. В качестве параметра передаёт в "
+"декорируемую функцию объект :class:`telebot.types.CallbackQuery`."
+
+#: of telebot.TeleBot.middleware_handler:1
+msgid "Function-based middleware handler decorator."
+msgstr "Функция-декоратор для middleware хендлера."
+
+#: of telebot.TeleBot.middleware_handler:3
+msgid ""
+"This decorator can be used to decorate functions that must be handled as "
+"middlewares before entering any other message handlers But, be careful "
+"and check type of the update inside the handler if more than one "
+"update_type is given"
+msgstr ""
+"Этот декоратор может быть использован, чтобы декорировать функции, "
+"которые будут использоваться в качестве middleware перед обработкой "
+"апдейтов, будьте аккуратны и проверяйте вид апдейта внутри функции если "
+"возможны апдейты разных видов"
+
+#: of telebot.TeleBot.middleware_handler:9
+msgid "Usage of middleware_handler"
+msgstr "Использование middleware_handler"
+
+#: of telebot.TeleBot.middleware_handler:24
+#: telebot.TeleBot.register_middleware_handler:15
+msgid ""
+"Optional list of update types that can be passed into the middleware "
+"handler."
+msgstr ""
+"Необязательный список видов апдейтов, которые будут обработаны этим "
+"middleware хендлером."
+
+#: of telebot.TeleBot.middleware_handler:27
+msgid "function"
+msgstr "функция"
+
+#: of telebot.TeleBot.my_chat_member_handler:1
+msgid ""
+"Handles update in a status of a bot. For private chats, this update is "
+"received only when the bot is blocked or unblocked by the user. As a "
+"parameter to the decorator function, it passes "
+":class:`telebot.types.ChatMemberUpdated` object."
+msgstr ""
+"Обрабатывает изменения статуса бота. Для приватных чатов, этот апдейт "
+"отправляется только когда бот был заблокирован или разблокирован "
+"пользователем. В качестве параметра передаёт в декорируемую функцию "
+"объект :class:`telebot.types.ChatMemberUpdated`."
+
+#: of telebot.TeleBot.pin_chat_message:1
+msgid ""
+"Use this method to pin a message in a supergroup. The bot must be an "
+"administrator in the chat for this to work and must have the appropriate "
+"admin rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы закрепить сообщение в супергруппе. Бот "
+"должен быть администратором чата и иметь соответствующие права "
+"администратора. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.pin_chat_message:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#pinchatmessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#pinchatmessage"
+
+#: of telebot.TeleBot.pin_chat_message:11
+msgid "Identifier of a message to pin"
+msgstr "id сообщения, которое нужно закрепить"
+
+#: of telebot.TeleBot.pin_chat_message:14
+msgid ""
+"Pass True, if it is not necessary to send a notification to all group "
+"members about the new pinned message"
+msgstr ""
+"Передайте True, если всем участникам группы необходимо отправить "
+"уведомление о закреплённом сообщении"
+
+#: of telebot.TeleBot.poll_answer_handler:1
+msgid ""
+"Handles change of user's answer in a non-anonymous poll(when user changes"
+" the vote). Bots receive new votes only in polls that were sent by the "
+"bot itself. As a parameter to the decorator function, it passes "
+":class:`telebot.types.PollAnswer` object."
+msgstr ""
+"Обрабатывает изменения ответа пользователя в не анонимном опросе(когда "
+"пользователь меняет выбор). Боты получают новые ответы только в опросах, "
+"которые отправили сами. В качестве параметра передаёт в декорируемую "
+"функцию объект :class:`telebot.types.PollAnswer`."
+
+#: of telebot.TeleBot.poll_handler:1
+msgid ""
+"Handles new state of a poll. Bots receive only updates about stopped "
+"polls and polls, which are sent by the bot As a parameter to the "
+"decorator function, it passes :class:`telebot.types.Poll` object."
+msgstr ""
+"Обрабатывает изменения в состоянии опроса. Боты получают только апдейты о"
+" завершенных опросах и опросах, которые отправили сами. В качестве "
+"параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.Poll`."
+
+#: of telebot.TeleBot.polling:1
+msgid ""
+"This function creates a new Thread that calls an internal "
+"__retrieve_updates function. This allows the bot to retrieve Updates "
+"automatically and notify listeners and message handlers accordingly."
+msgstr ""
+"Эта функция создаёт новый Thread, который вызывает служебную функцию "
+"__retrieve_updates. Это позволяет боту получать апдейты (Update) "
+"автоматически и вызывать соответствующие листенеры и хендлеры."
+
+#: of telebot.TeleBot.polling:4
+msgid "Warning: Do not call this function more than once!"
+msgstr "Предупреждение: Не вызывайте эту функцию более одного раза!"
+
+#: of telebot.TeleBot.polling:6
+msgid "Always gets updates."
+msgstr "Всегда получает апдейты."
+
+#: of telebot.TeleBot.polling:8
+msgid "Use :meth:`infinity_polling` instead."
+msgstr "Используйте :meth:`infinity_polling`."
+
+#: of telebot.TeleBot.polling:15
+msgid "Delay between two update retrivals"
+msgstr "Задержка между получением апдейтов"
+
+#: of telebot.TeleBot.polling:18
+msgid "Do not stop polling when an ApiException occurs."
+msgstr "Не останавливать поллинг при возникновении ApiException."
+
+#: of telebot.TeleBot.polling:34
+msgid ""
+"A list of the update types you want your bot to receive. For example, "
+"specify [“message”, “edited_channel_post”, “callback_query”] to only "
+"receive updates of these types. See util.update_types for a complete list"
+" of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used. Please note that this parameter doesn't affect "
+"updates created before the call to the get_updates, so unwanted updates "
+"may be received for a short period of time."
+msgstr ""
+"Список видов апдейтов, которые вы хотите получать. Например, укажите "
+"[“message”, “edited_channel_post”, “callback_query”], чтобы получать "
+"апдейты только этих видов. Полный список доступных видов апдейтов - "
+"util.update_types. Укажите пустой список, чтобы получать все апдейты, "
+"кроме chat_member (по умолчанию). Если не задан, будет использована "
+"последняя настройка. Пожалуйста учитывайте, что этот параметр не влияет "
+"на апдейты, отправленные до вызова get_updates, поэтому нежелательные "
+"апдейты могут быть получены в течение короткого периода времени."
+
+#: of telebot.TeleBot.polling:34
+msgid ""
+"A list of the update types you want your bot to receive. For example, "
+"specify [“message”, “edited_channel_post”, “callback_query”] to only "
+"receive updates of these types. See util.update_types for a complete list"
+" of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used."
+msgstr ""
+"Список видов апдейтов, которые вы хотите получать. Например, укажите "
+"[“message”, “edited_channel_post”, “callback_query”], чтобы получать "
+"апдейты только этих видов. Полный список доступных видов апдейтов - "
+"util.update_types. Укажите пустой список, чтобы получать все апдейты, "
+"кроме chat_member (по умолчанию). Если не задан, будет использована "
+"последняя настройка."
+
+#: of telebot.TeleBot.polling:40
+msgid ""
+"Please note that this parameter doesn't affect updates created before the"
+" call to the get_updates, so unwanted updates may be received for a short"
+" period of time."
+msgstr ""
+"Пожалуйста учитывайте, что этот параметр не влияет на апдейты, "
+"отправленные до вызова get_updates, поэтому нежелательные апдейты могут "
+"быть получены в течение короткого периода времени."
+
+#: of telebot.TeleBot.polling:50
+msgid "Path to watch for changes. Defaults to None"
+msgstr "Путь для мониторинга изменений. По умолчанию None"
+
+#: of telebot.TeleBot.pre_checkout_query_handler:1
+msgid ""
+"New incoming pre-checkout query. Contains full information about "
+"checkout. As a parameter to the decorator function, it passes "
+":class:`telebot.types.PreCheckoutQuery` object."
+msgstr ""
+"Новая pre-checkout query. Содержит полную информацию о заказе. В качестве"
+" параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.PreCheckoutQuery`."
+
+#: of telebot.TeleBot.process_new_updates:1
+msgid ""
+"Processes new updates. Just pass list of subclasses of Update to this "
+"method."
+msgstr ""
+"Обрабатывает новые апдейты. Просто передайте список апдейтов(Update и его"
+" наследники)."
+
+#: of telebot.TeleBot.process_new_updates:3
+msgid "List of :class:`telebot.types.Update` objects."
+msgstr "Список объектов :class:`telebot.types.Update`."
+
+#: of telebot.TeleBot.process_new_updates
+msgid "return None"
+msgstr "возвращает None"
+
+#: of telebot.TeleBot.promote_chat_member:1
+msgid ""
+"Use this method to promote or demote a user in a supergroup or a channel."
+" The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights. Pass False for all boolean parameters "
+"to demote a user."
+msgstr ""
+"Используйте этот метод, чтобы повысить или понизить пользователя в "
+"супергруппе или канале. Бот должен быть администратором чата и иметь "
+"соответствующие права администратора. Передайте False во все boolean "
+"параметры, чтобы понизить пользователя."
+
+#: of telebot.TeleBot.promote_chat_member:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#promotechatmember"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#promotechatmember"
+
+#: of telebot.TeleBot.promote_chat_member:7
+msgid ""
+"Unique identifier for the target chat or username of the target channel ("
+" in the format @channelusername)"
+msgstr "Уникальный id чата или username канала (в формате @channelusername)"
+
+#: of telebot.TeleBot.promote_chat_member:14
+msgid ""
+"Pass True, if the administrator can change chat title, photo and other "
+"settings"
+msgstr ""
+"Передайте True, если администратор может менять название чата, аватарку и"
+" другие настройки"
+
+#: of telebot.TeleBot.promote_chat_member:17
+msgid "Pass True, if the administrator can create channel posts, channels only"
+msgstr ""
+"Передайте True, если администратор может создавать посты в канале, только"
+" для каналов"
+
+#: of telebot.TeleBot.promote_chat_member:20
+msgid ""
+"Pass True, if the administrator can edit messages of other users, "
+"channels only"
+msgstr ""
+"Передайте True, если администратор может изменять сообщения других "
+"пользователей, только для каналов"
+
+#: of telebot.TeleBot.promote_chat_member:23
+msgid "Pass True, if the administrator can delete messages of other users"
+msgstr ""
+"Передайте True, если администратор может удалять сообщения других "
+"пользователей"
+
+#: of telebot.TeleBot.promote_chat_member:26
+msgid "Pass True, if the administrator can invite new users to the chat"
+msgstr ""
+"Передайте True, если администратор может приглашать новых пользователей в"
+" чат"
+
+#: of telebot.TeleBot.promote_chat_member:29
+msgid "Pass True, if the administrator can restrict, ban or unban chat members"
+msgstr ""
+"Передайте True, если администратор может ограничивать, банить или "
+"разбанивать участников чата"
+
+#: of telebot.TeleBot.promote_chat_member:32
+msgid "Pass True, if the administrator can pin messages, supergroups only"
+msgstr ""
+"Передайте True, если администратор может закреплять сообщения, только для"
+" супергрупп"
+
+#: of telebot.TeleBot.promote_chat_member:35
+msgid ""
+"Pass True, if the administrator can add new administrators with a subset "
+"of his own privileges or demote administrators that he has promoted, "
+"directly or indirectly (promoted by administrators that were appointed by"
+" him)"
+msgstr ""
+"Передайте True, если администратор может добавлять новых администраторов "
+"с подмножеством его собственных прав администратора или понижать "
+"администраторов, которых он повысил, напрямую или косвенно "
+"(администраторами, которых он назначил)"
+
+#: of telebot.TeleBot.promote_chat_member:40
+msgid "Pass True, if the administrator's presence in the chat is hidden"
+msgstr "Передайте True, если присутствие администратора в чате скрыто"
+
+#: of telebot.TeleBot.promote_chat_member:43
+msgid ""
+"Pass True, if the administrator can access the chat event log, chat "
+"statistics, message statistics in channels, see channel members, see "
+"anonymous administrators in supergroups and ignore slow mode. Implied by "
+"any other administrator privilege"
+msgstr ""
+"Передайте True, если администратор имеет доступ к логу событий чата, "
+"статистике чата, статистике сообщений в каналах, видеть участников "
+"канала, видеть анонимных администраторов в супергруппах и игнорировать "
+"медленный режим. Подразумевается любым другим правом администратора"
+
+#: of telebot.TeleBot.promote_chat_member:49
+msgid ""
+"Pass True, if the administrator can manage voice chats For now, bots can "
+"use this privilege only for passing to other administrators."
+msgstr ""
+"Передайте True, если администратор может управлять голосовыми чатами. На "
+"текущий момент, боты могут использовать это право администратора только "
+"для передачи другим администраторам."
+
+#: of telebot.TeleBot.promote_chat_member:53
+msgid "Deprecated, use can_manage_video_chats."
+msgstr "Устарело, используйте can_manage_video_chats."
+
+#: of telebot.TeleBot.promote_chat_member:56
+msgid ""
+"Pass True if the user is allowed to create, rename, close, and reopen "
+"forum topics, supergroups only"
+msgstr ""
+"Передайте True, если пользователю разрешено создавать, переименовывать, "
+"закрывать, и возобновлять топики, только для супергрупп"
+
+#: of telebot.TeleBot.promote_chat_member:60
+#, fuzzy
+msgid "Pass True if the administrator can create the channel's stories"
+msgstr ""
+"Передайте True, если администратор может создавать посты в канале, только"
+" для каналов"
+
+#: of telebot.TeleBot.promote_chat_member:63
+#, fuzzy
+msgid "Pass True if the administrator can edit the channel's stories"
+msgstr ""
+"Передайте True, если администратор может изменять сообщения других "
+"пользователей, только для каналов"
+
+#: of telebot.TeleBot.promote_chat_member:66
+#, fuzzy
+msgid "Pass True if the administrator can delete the channel's stories"
+msgstr ""
+"Передайте True, если администратор может создавать посты в канале, только"
+" для каналов"
+
+#: of telebot.TeleBot.register_callback_query_handler:1
+msgid "Registers callback query handler."
+msgstr "Регистрирует хендлер callback query."
+
+#: of telebot.TeleBot.register_callback_query_handler:3
+#: telebot.TeleBot.register_channel_post_handler:3
+#: telebot.TeleBot.register_chat_boost_handler:3
+#: telebot.TeleBot.register_chat_join_request_handler:3
+#: telebot.TeleBot.register_chat_member_handler:3
+#: telebot.TeleBot.register_chosen_inline_handler:3
+#: telebot.TeleBot.register_edited_channel_post_handler:3
+#: telebot.TeleBot.register_edited_message_handler:3
+#: telebot.TeleBot.register_inline_handler:3
+#: telebot.TeleBot.register_message_handler:3
+#: telebot.TeleBot.register_message_reaction_count_handler:3
+#: telebot.TeleBot.register_message_reaction_handler:3
+#: telebot.TeleBot.register_my_chat_member_handler:3
+#: telebot.TeleBot.register_poll_answer_handler:3
+#: telebot.TeleBot.register_poll_handler:3
+#: telebot.TeleBot.register_pre_checkout_query_handler:3
+#: telebot.TeleBot.register_removed_chat_boost_handler:3
+#: telebot.TeleBot.register_shipping_query_handler:3
+msgid "function to be called"
+msgstr "функция-хендлер"
+
+#: of telebot.TeleBot.register_callback_query_handler:9
+#: telebot.TeleBot.register_channel_post_handler:18
+#: telebot.TeleBot.register_chat_boost_handler:9
+#: telebot.TeleBot.register_chat_join_request_handler:9
+#: telebot.TeleBot.register_chat_member_handler:9
+#: telebot.TeleBot.register_chosen_inline_handler:9
+#: telebot.TeleBot.register_edited_channel_post_handler:18
+#: telebot.TeleBot.register_edited_message_handler:21
+#: telebot.TeleBot.register_inline_handler:9
+#: telebot.TeleBot.register_message_handler:21
+#: telebot.TeleBot.register_message_reaction_count_handler:9
+#: telebot.TeleBot.register_message_reaction_handler:9
+#: telebot.TeleBot.register_my_chat_member_handler:9
+#: telebot.TeleBot.register_poll_answer_handler:9
+#: telebot.TeleBot.register_poll_handler:9
+#: telebot.TeleBot.register_pre_checkout_query_handler:8
+#: telebot.TeleBot.register_removed_chat_boost_handler:9
+#: telebot.TeleBot.register_shipping_query_handler:9
+msgid ""
+"True if you need to pass TeleBot instance to handler(useful for "
+"separating handlers into different files)"
+msgstr ""
+"True, если вам нужно передать экземпляр класса TeleBot в хендлер(удобно "
+"для разбиения кода на файлы)"
+
+#: of telebot.TeleBot.register_channel_post_handler:1
+msgid "Registers channel post message handler."
+msgstr "Регистрирует хендлер постов в каналах."
+
+#: of telebot.TeleBot.register_channel_post_handler:9
+#: telebot.TeleBot.register_edited_channel_post_handler:9
+#: telebot.TeleBot.register_edited_message_handler:9
+#: telebot.TeleBot.register_message_handler:9
+msgid "list of commands"
+msgstr "список команд"
+
+#: of telebot.TeleBot.register_channel_post_handler:12
+#: telebot.TeleBot.register_edited_channel_post_handler:12
+#: telebot.TeleBot.register_edited_message_handler:12
+msgid "Regular expression"
+msgstr "Регулярное выражение"
+
+#: of telebot.TeleBot.register_chat_boost_handler:1
+#, fuzzy
+msgid "Registers chat boost handler."
+msgstr "Регистрирует хендлер смены состояний участников чата."
+
+#: of telebot.TeleBot.register_chat_join_request_handler:1
+msgid "Registers chat join request handler."
+msgstr "Регистрирует хендлер запросов на вступление в чат."
+
+#: of telebot.TeleBot.register_chat_member_handler:1
+msgid "Registers chat member handler."
+msgstr "Регистрирует хендлер смены состояний участников чата."
+
+#: of telebot.TeleBot.register_chat_member_handler:14
+msgid ":return:None"
+msgstr ""
+
+#: of telebot.TeleBot.register_chosen_inline_handler:1
+msgid "Registers chosen inline handler."
+msgstr "Регистрирует хендлер выбора результата inline query."
+
+#: of telebot.TeleBot.register_edited_channel_post_handler:1
+msgid "Registers edited channel post message handler."
+msgstr "Регистрирует хендлер изменения постов в каналах."
+
+#: of telebot.TeleBot.register_edited_message_handler:1
+msgid "Registers edited message handler."
+msgstr "Регистрирует хендлер изменения сообщений."
+
+#: of telebot.TeleBot.register_edited_message_handler:18
+msgid "True for private chat"
+msgstr "True для приватных чатов"
+
+#: of telebot.TeleBot.register_for_reply:1
+#: telebot.TeleBot.register_for_reply_by_message_id:1
+msgid ""
+"Registers a callback function to be notified when a reply to `message` "
+"arrives."
+msgstr ""
+"Регистрирует функцию для вызова при получении ответа на выбранное "
+"сообщение."
+
+#: of telebot.TeleBot.register_for_reply:3
+#: telebot.TeleBot.register_for_reply_by_message_id:3
+msgid ""
+"Warning: In case `callback` as lambda function, saving reply handlers "
+"will not work."
+msgstr ""
+"Предупреждение: При использовании lambda функции в качестве `callback`, "
+"сохранение reply хендлеров не будет работать."
+
+#: of telebot.TeleBot.register_for_reply:5
+msgid "The message for which we are awaiting a reply."
+msgstr "Сообщение, ответ на которое нужно ждать."
+
+#: of telebot.TeleBot.register_for_reply:8
+#: telebot.TeleBot.register_for_reply_by_message_id:8
+msgid ""
+"The callback function to be called when a reply arrives. Must accept one "
+"`message` parameter, which will contain the replied message."
+msgstr ""
+"Функция, которую нужно вызвать при получении ответа на сообщение. Должна "
+"принимать параметр `message`, который будет содержать ответ на сообщение."
+
+#: of telebot.TeleBot.register_for_reply:12
+#: telebot.TeleBot.register_for_reply_by_message_id:12
+msgid "Optional arguments for the callback function."
+msgstr "Необязательные аргументы для вызываемой функции."
+
+#: of telebot.TeleBot.register_for_reply:13
+#: telebot.TeleBot.register_for_reply_by_message_id:13
+msgid "Optional keyword arguments for the callback function."
+msgstr "Необязательные именованные аргументы для вызываемой функции."
+
+#: of telebot.TeleBot.register_for_reply_by_message_id:5
+msgid "The id of the message for which we are awaiting a reply."
+msgstr "id сообщения, ответ на которое нужно ждать."
+
+#: of telebot.TeleBot.register_inline_handler:1
+msgid "Registers inline handler."
+msgstr "Регистрирует хендлер inline query."
+
+#: of telebot.TeleBot.register_message_handler:1
+msgid "Registers message handler."
+msgstr "Регистрирует хендлер сообщений."
+
+#: of telebot.TeleBot.register_message_handler:18
+msgid "List of chat types"
+msgstr "Список видов чатов"
+
+#: of telebot.TeleBot.register_message_reaction_count_handler:1
+#, fuzzy
+msgid "Registers message reaction count handler."
+msgstr "Регистрирует хендлер сообщений."
+
+#: of telebot.TeleBot.register_message_reaction_handler:1
+#, fuzzy
+msgid "Registers message reaction handler."
+msgstr "Регистрирует хендлер сообщений."
+
+#: of telebot.TeleBot.register_middleware_handler:1
+msgid "Adds function-based middleware handler."
+msgstr "Добавляет функцию-middleware."
+
+#: of telebot.TeleBot.register_middleware_handler:3
+msgid ""
+"This function will register your decorator function. Function-based "
+"middlewares are executed before handlers. But, be careful and check type "
+"of the update inside the handler if more than one update_type is given"
+msgstr ""
+"Эта функция зарегистрирует вашу функцию-middleware. Middleware функции "
+"исполняются до хендлеров. Будьте осторожны и проверяйте вид апдейта "
+"внутри функции, если указано более одного update_type"
+
+#: of telebot.TeleBot.register_middleware_handler:8
+msgid "bot = TeleBot('TOKEN')"
+msgstr ""
+
+#: of telebot.TeleBot.register_middleware_handler:10
+msgid ""
+"bot.register_middleware_handler(print_channel_post_text, "
+"update_types=['channel_post', 'edited_channel_post'])"
+msgstr ""
+
+#: of telebot.TeleBot.register_middleware_handler:12
+msgid "Function that will be used as a middleware handler."
+msgstr "Функция, которая будет использована в качестве middleware."
+
+#: of telebot.TeleBot.register_my_chat_member_handler:1
+msgid "Registers my chat member handler."
+msgstr "Регистрирует хендлер изменений статуса бота."
+
+#: of telebot.TeleBot.register_next_step_handler:1
+msgid ""
+"Registers a callback function to be notified when new message arrives "
+"after `message`."
+msgstr ""
+"Регистрирует функцию для вызова при получении нового сообщения после "
+"указанного."
+
+#: of telebot.TeleBot.register_next_step_handler:3
+#: telebot.TeleBot.register_next_step_handler_by_chat_id:3
+msgid ""
+"Warning: In case `callback` as lambda function, saving next step handlers"
+" will not work."
+msgstr ""
+"Предупреждение: При использовании lambda функции в качестве `callback`, "
+"сохранение next step хендлеров не будет работать."
+
+#: of telebot.TeleBot.register_next_step_handler:5
+msgid "The message for which we want to handle new message in the same chat."
+msgstr "Сообщение, после которого нужно обработать следующее в том же чате."
+
+#: of telebot.TeleBot.register_next_step_handler:8
+#: telebot.TeleBot.register_next_step_handler_by_chat_id:8
+msgid "The callback function which next new message arrives."
+msgstr "Функция для вызова при получении нового сообщения."
+
+#: of telebot.TeleBot.register_next_step_handler:11
+#: telebot.TeleBot.register_next_step_handler:13
+#: telebot.TeleBot.register_next_step_handler_by_chat_id:11
+#: telebot.TeleBot.register_next_step_handler_by_chat_id:13
+msgid "Args to pass in callback func"
+msgstr "Аргументы для передачи в функцию"
+
+#: of telebot.TeleBot.register_next_step_handler_by_chat_id:1
+msgid ""
+"Registers a callback function to be notified when new message arrives in "
+"the given chat."
+msgstr ""
+"Регистрирует функцию для вызова при получении нового сообщения в заданном"
+" чате."
+
+#: of telebot.TeleBot.register_next_step_handler_by_chat_id:5
+msgid "The chat (chat ID) for which we want to handle new message."
+msgstr "Чат (id чата), в котором нужно обработать новое сообщение."
+
+#: of telebot.TeleBot.register_poll_answer_handler:1
+msgid "Registers poll answer handler."
+msgstr "Регистрирует хендлер ответов в опросах."
+
+#: of telebot.TeleBot.register_poll_handler:1
+msgid "Registers poll handler."
+msgstr "Регистрирует хендлер изменений состояния опросов."
+
+#: of telebot.TeleBot.register_pre_checkout_query_handler:1
+msgid "Registers pre-checkout request handler."
+msgstr "Регистрирует хендлер pre-checkout query."
+
+#: of telebot.TeleBot.register_removed_chat_boost_handler:1
+#, fuzzy
+msgid "Registers removed chat boost handler."
+msgstr "Регистрирует хендлер изменений статуса бота."
+
+#: of telebot.TeleBot.register_shipping_query_handler:1
+msgid "Registers shipping query handler."
+msgstr "Регистрирует хендлер shipping query."
+
+#: of telebot.TeleBot.remove_webhook:1
+msgid "Deletes webhooks using set_webhook() function."
+msgstr "Удаляет вебхук, используя set_webhook()."
+
+#: of telebot.TeleBot.removed_chat_boost_handler:1
+#, fuzzy
+msgid ""
+"Handles new incoming chat boost state. it passes "
+":class:`telebot.types.ChatBoostRemoved` object."
+msgstr ""
+"Обрабатывает inline query. В качестве параметра, передаёт в декорируемую "
+"функцию объект :class:`telebot.types.InlineQuery`."
+
+#: of telebot.TeleBot.reopen_forum_topic:1
+msgid ""
+"Use this method to reopen a closed topic in a forum supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the can_manage_topics administrator rights, unless it is the creator of "
+"the topic. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы возобновить закрытый топик в супергруппе с "
+"топиками. Бот должен быть администратором чата и иметь права "
+"администратора can_manage_topics, кроме случаев, когда бот является "
+"создателем топика. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.reopen_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reopenforumtopic"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#reopenforumtopic"
+
+#: of telebot.TeleBot.reopen_forum_topic:10
+msgid "Identifier of the topic to reopen"
+msgstr "id топика для возобновления"
+
+#: of telebot.TeleBot.reopen_general_forum_topic:1
+msgid ""
+"Use this method to reopen the 'General' topic in a forum supergroup chat."
+" The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы возобновить топик 'General' в супергруппе с"
+" топиками. Бот должен быть администратором чата и иметь права "
+"администратора can_manage_topics, кроме случаев, когда бот является "
+"создателем топика. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.reopen_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reopengeneralforumtopic"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#reopengeneralforumtopic"
+
+#: of telebot.TeleBot.reply_to:1
+msgid ""
+"Convenience function for `send_message(message.chat.id, text, "
+"reply_to_message_id=message.message_id, **kwargs)`"
+msgstr ""
+"Удобная функция для замены `send_message(message.chat.id, text, "
+"reply_to_message_id=message.message_id, **kwargs)`"
+
+#: of telebot.TeleBot.reply_to:3
+msgid "Instance of :class:`telebot.types.Message`"
+msgstr "Экземпляр класса :class:`telebot.types.Message`"
+
+#: of telebot.TeleBot.reply_to:6
+msgid "Text of the message."
+msgstr "Текст сообщения."
+
+#: of telebot.TeleBot.reply_to:9
+msgid ""
+"Additional keyword arguments which are passed to "
+":meth:`telebot.TeleBot.send_message`"
+msgstr ""
+"Дополнительные именованные аргументы, передаваемые в "
+":meth:`telebot.TeleBot.send_message`"
+
+#: of telebot.TeleBot.reset_data:1
+msgid "Reset data for a user in chat."
+msgstr "Сбросить данные о пользователе в чате."
+
+#: of telebot.TeleBot.restrict_chat_member:1
+msgid ""
+"Use this method to restrict a user in a supergroup. The bot must be an "
+"administrator in the supergroup for this to work and must have the "
+"appropriate admin rights. Pass True for all boolean parameters to lift "
+"restrictions from a user."
+msgstr ""
+"Используйте этот метод, чтобы ограничить пользователя в супергруппе. Бот "
+"должен быть администратором супергруппы и иметь соответствующие права "
+"администратора. Передайте True во все boolean параметры, чтобы снять с "
+"пользователя ограничения."
+
+#: of telebot.TeleBot.restrict_chat_member:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#restrictchatmember"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#restrictchatmember"
+
+#: of telebot.TeleBot.restrict_chat_member:8
+msgid ""
+"Individual parameters are deprecated and will be removed, use "
+"'permissions' instead."
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:17
+msgid ""
+"Date when restrictions will be lifted for the user, unix time. If user is"
+" restricted for more than 366 days or less than 30 seconds from the "
+"current time, they are considered to be restricted forever"
+msgstr ""
+"Дата, когда ограничения будут сняты с пользователя, UNIX timestamp. Если "
+"пользователь ограничен более чем на 366 дней или менее чем на 30 секунд с"
+" текущего момента, он будет ограничен навсегда (пока ограничения не будут"
+" сняты вручную)"
+
+#: of telebot.TeleBot.restrict_chat_member:22
+msgid ""
+"Pass True, if the user can send text messages, contacts, locations and "
+"venues"
+msgstr ""
+"Передайте True, если пользователь может отправлять текстовые сообщения, "
+"контакты, местоположения и места"
+
+#: of telebot.TeleBot.restrict_chat_member:25
+msgid ""
+"Pass True, if the user can send audios, documents, photos, videos, video "
+"notes and voice notes, implies can_send_messages"
+msgstr ""
+"Передайте True, если пользователь может отправлять аудио, документы, "
+"фото, видео, видео заметки (кружочки) и голосовые сообщения, "
+"подразумевает can_send_messages"
+
+#: of telebot.TeleBot.restrict_chat_member:29
+msgid "Pass True, if the user is allowed to send polls, implies can_send_messages"
+msgstr ""
+"Передайте True, если пользователю разрешено отправлять опросы, "
+"подразумевает can_send_messages"
+
+#: of telebot.TeleBot.restrict_chat_member:32
+msgid ""
+"Pass True, if the user can send animations, games, stickers and use "
+"inline bots, implies can_send_media_messages"
+msgstr ""
+"Передайте True, если пользователь может отправлять гифки, игры, стикеры и"
+" использовать inline ботов, подразумевает can_send_media_messages"
+
+#: of telebot.TeleBot.restrict_chat_member:35
+msgid ""
+"Pass True, if the user may add web page previews to their messages, "
+"implies can_send_media_messages"
+msgstr ""
+"Передайте True, если пользователь может добавлять превью ссылок к своим "
+"сообщениям, подразумевает can_send_media_messages"
+
+#: of telebot.TeleBot.restrict_chat_member:39
+msgid ""
+"Pass True, if the user is allowed to change the chat title, photo and "
+"other settings. Ignored in public supergroups"
+msgstr ""
+"Передайте True, если пользователю разрешено изменять название чата, "
+"аватарку и другие настройки. Игнорируется в публичных супергруппах"
+
+#: of telebot.TeleBot.restrict_chat_member:43
+msgid ""
+"Pass True, if the user is allowed to invite new users to the chat, "
+"implies can_invite_users"
+msgstr "Передайте True, если пользователю разрешено приглашать пользователей в чат"
+
+#: of telebot.TeleBot.restrict_chat_member:47
+msgid ""
+"Pass True, if the user is allowed to pin messages. Ignored in public "
+"supergroups"
+msgstr ""
+"Передайте True, если пользователю разрешено закреплять сообщения. "
+"Игнорируется в публичных супергруппах"
+
+#: of telebot.TeleBot.restrict_chat_member:50
+#: telebot.TeleBot.set_chat_permissions:14
+msgid ""
+"Pass True if chat permissions are set independently. Otherwise, the "
+"can_send_other_messages and can_add_web_page_previews permissions will "
+"imply the can_send_messages, can_send_audios, can_send_documents, "
+"can_send_photos, can_send_videos, can_send_video_notes, and "
+"can_send_voice_notes permissions; the can_send_polls permission will "
+"imply the can_send_messages permission."
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:56
+msgid ""
+"Pass ChatPermissions object to set all permissions at once. Use this "
+"param instead of passing all boolean parameters."
+msgstr ""
+
+#: of telebot.TeleBot.restrict_chat_member:60
+#: telebot.TeleBot.set_chat_permissions:20 telebot.TeleBot.unban_chat_member:19
+msgid "True on success"
+msgstr "True в случае успеха"
+
+#: of telebot.TeleBot.retrieve_data:1
+msgid "Returns context manager with data for a user in chat."
+msgstr "Возвращает контекстный менеджер с данными о пользователе в чате."
+
+#: of telebot.TeleBot.retrieve_data:6
+msgid "Chat's unique identifier, defaults to user_id"
+msgstr "Уникальный id чата, по умолчанию user_id"
+
+#: of telebot.TeleBot.retrieve_data:9
+msgid "Context manager with data for a user in chat"
+msgstr "Контекстный менеджер с данными о пользователе в чате."
+
+#: of telebot.TeleBot.revoke_chat_invite_link:1
+msgid ""
+"Use this method to revoke an invite link created by the bot. Note: If the"
+" primary link is revoked, a new link is automatically generated The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate admin rights."
+msgstr ""
+"Используйте этот метод, чтобы аннулировать ссылку-приглашение, созданную "
+"ботом. Примечание: Если аннулируется главная ссылка-приглашение, "
+"автоматически генерируется новая. Бот должен быть администратором чата и "
+"иметь соответствующие права администратора."
+
+#: of telebot.TeleBot.revoke_chat_invite_link:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#revokechatinvitelink"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#revokechatinvitelink"
+
+#: of telebot.TeleBot.revoke_chat_invite_link:11
+msgid "The invite link to revoke"
+msgstr "Ссылка-приглашение, которую нужно аннулировать"
+
+#: of telebot.TeleBot.run_webhooks:1
+msgid "This class sets webhooks and listens to a given url and port."
+msgstr "Этот класс устанавливает вебхуки и мониторит указанный URL и порт."
+
+#: of telebot.TeleBot.run_webhooks:3
+msgid "Requires fastapi, uvicorn, and latest version of starlette."
+msgstr "Требует fastapi, uvicorn и последнюю версию starlette."
+
+#: of telebot.TeleBot.run_webhooks:5
+msgid "IP address to listen to, defaults to \"127.0.0.1\""
+msgstr "IP адрес для мониторинга, по умолчанию \"127.0.0.1\""
+
+#: of telebot.TeleBot.run_webhooks:8
+msgid "A port which will be used to listen to webhooks., defaults to 443"
+msgstr "Порт, который будет использован для мониторинга вебхуков. По умолчанию 443"
+
+#: of telebot.TeleBot.run_webhooks:11
+msgid "Path to the webhook. Defaults to /token, defaults to None"
+msgstr "Путь к вебхуку(по умолчанию /token). По умолчанию None"
+
+#: of telebot.TeleBot.run_webhooks:14
+msgid "Path to the certificate file, defaults to None"
+msgstr "Путь к файлу с SSL сертификатом, по умолчанию None"
+
+#: of telebot.TeleBot.run_webhooks:17
+msgid "Path to the certificate key file, defaults to None"
+msgstr "Путь к файлу с приватным ключом SSL сертификата, по умолчанию None"
+
+#: of telebot.TeleBot.run_webhooks:20
+msgid "Webhook URL to be set, defaults to None"
+msgstr "URL вебхука, по умолчанию None"
+
+#: of telebot.TeleBot.run_webhooks:23
+msgid ""
+"Maximum allowed number of simultaneous HTTPS connections to the webhook "
+"for update delivery, 1-100. Defaults to 40. Use lower values to limit the"
+" load on your bot's server, and higher values to increase your bot's "
+"throughput., defaults to None"
+msgstr ""
+"Максимально-допустимое количество одновременных HTTPS подключений к "
+"вебхуку для доставки апдейтов, 1-100. По умолчанию 40. Используйте "
+"меньшие значения, чтобы уменьшить нагрузку на ваш сервер и большие "
+"значения для увеличения пропускной способности вашего бота, по умолчанию "
+"None."
+
+#: of telebot.TeleBot.run_webhooks:28
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all updates "
+"regardless of type (default). If not specified, the previous setting will"
+" be used. defaults to None"
+msgstr ""
+"Список видов апдейтов, которые вы хотите получать, в формате JSON. "
+"Например, укажите [“message”, “edited_channel_post”, “callback_query”], "
+"чтобы получать апдейты только этих видов. Полный список доступных видов "
+"апдейтов - util.update_types. Укажите пустой список, чтобы получать все "
+"апдейты, кроме chat_member (по умолчанию). Если не задан, будет "
+"использована последняя настройка. По умолчанию None"
+
+#: of telebot.TeleBot.run_webhooks:33 telebot.TeleBot.set_webhook:32
+msgid ""
+"The fixed IP address which will be used to send webhook requests instead "
+"of the IP address resolved through DNS, defaults to None"
+msgstr ""
+"Фиксированный IP адрес, который будет использоваться для отправки "
+"запросов к вебхуку вместо IP адреса, полученного через DNS, по умолчанию "
+"None"
+
+#: of telebot.TeleBot.run_webhooks:42
+msgid "Secret token to be used to verify the webhook request, defaults to None"
+msgstr "Секретный токен для верификации запроса к вебхуку, по умолчанию None"
+
+#: of telebot.TeleBot.run_webhooks:45
+msgid "Length of a secret token, defaults to 20"
+msgstr "Длина секретного токена, по умолчанию 20"
+
+#: of telebot.TeleBot.run_webhooks telebot.custom_filters.TextFilter
+msgid "Raises"
+msgstr ""
+
+#: of telebot.TeleBot.run_webhooks:48
+msgid "If necessary libraries were not installed."
+msgstr "Если необходимые библиотеки не были установлены."
+
+#: of telebot.TeleBot.send_animation:1
+msgid ""
+"Use this method to send animation files (GIF or H.264/MPEG-4 AVC video "
+"without sound). On success, the sent Message is returned. Bots can "
+"currently send animation files of up to 50 MB in size, this limit may be "
+"changed in the future."
+msgstr ""
+"Используйте этот метод, чтобы отправить гифку (GIF или H.264/MPEG-4 AVC "
+"видео без звука). В случае успеха возвращается отправленное сообщение "
+"(Message). На текущий момент, боты могут отправлять гифки весом до 50 MB,"
+" это ограничение может измениться в будущем."
+
+#: of telebot.TeleBot.send_animation:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendanimation"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendanimation"
+
+#: of telebot.TeleBot.send_animation:9
+msgid ""
+"Animation to send. Pass a file_id as String to send an animation that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get an animation from the Internet, or upload a "
+"new animation using multipart/form-data."
+msgstr ""
+"Гиф-ка для отправки. Передайте file_id (String), чтобы отправить гифку, "
+"которая уже загружена на сервера Telegram (рекомендуется), передайте HTTP"
+" URL (String), чтобы отправить гифку из интернета или загрузите новую "
+"гифку с помощью multipart/form-data."
+
+#: of telebot.TeleBot.send_animation:13
+msgid "Duration of sent animation in seconds"
+msgstr "Длительность отправленной гифки в секундах"
+
+#: of telebot.TeleBot.send_animation:16
+msgid "Animation width"
+msgstr "Ширина гифки"
+
+#: of telebot.TeleBot.send_animation:19
+msgid "Animation height"
+msgstr "Высота гифки"
+
+#: of telebot.TeleBot.send_animation:22 telebot.TeleBot.send_video:20
+#: telebot.TeleBot.send_video_note:36
+msgid ""
+"Thumbnail of the file sent; can be ignored if thumbnail generation for "
+"the file is supported server-side. The thumbnail should be in JPEG format"
+" and less than 200 kB in size. A thumbnail's width and height should not "
+"exceed 320. Ignored if the file is not uploaded using multipart/form-"
+"data. Thumbnails can't be reused and can be only uploaded as a new file, "
+"so you can pass “attach://” if the thumbnail was "
+"uploaded using multipart/form-data under ."
+msgstr ""
+"Обложка отправленного файла; может быть проигнорирована, если генерация "
+"обложки поддерживается на стороне сервера. Обложка должна быть картинкой "
+"в формате JPEG и весить менее 200 kB. Ширина и высота обложки не должны "
+"превышать 320. Игнорируется, если файл не загружен с помощью multipart"
+"/form-data. Обложки не могут быть использованы повторно и могут быть "
+"загружены только как новый файл, так что вы можете передать "
+"“attach://” если обложка была загружена с помощью "
+"multipart/form-data под именем ."
+
+#: of telebot.TeleBot.send_animation:28
+msgid ""
+"Animation caption (may also be used when resending animation by file_id),"
+" 0-1024 characters after entities parsing"
+msgstr ""
+"Подпись к гифке (может быть использована при повторной отправке гифки по "
+"file_id), 0-1024 символа после форматирования"
+
+#: of telebot.TeleBot.send_animation:31
+msgid "Mode for parsing entities in the animation caption"
+msgstr "Режим форматирования подписи к гифке"
+
+#: of telebot.TeleBot.send_animation:54 telebot.TeleBot.send_video:29
+msgid ""
+"List of special entities that appear in the caption, which can be "
+"specified instead of parse_mode"
+msgstr ""
+"Список отформатированных частей подписи, можно использовать вместо "
+"parse_mode"
+
+#: of telebot.TeleBot.send_animation:57 telebot.TeleBot.send_video:58
+msgid "Identifier of a message thread, in which the video will be sent"
+msgstr "id топика, в который будет отправлено видео"
+
+#: of telebot.TeleBot.send_animation:60
+msgid "Pass True, if the animation should be sent as a spoiler"
+msgstr "Передайте True, если гифку нужно отправить как спойлер"
+
+#: of telebot.TeleBot.send_animation:66 telebot.TeleBot.send_audio:66
+#: telebot.TeleBot.send_contact:43 telebot.TeleBot.send_document:59
+#: telebot.TeleBot.send_location:49 telebot.TeleBot.send_media_group:30
+#: telebot.TeleBot.send_message:46 telebot.TeleBot.send_sticker:42
+#: telebot.TeleBot.send_venue:56 telebot.TeleBot.send_video_note:51
+#: telebot.TeleBot.send_voice:49
+msgid "Reply parameters."
+msgstr ""
+
+#: of telebot.TeleBot.send_audio:1
+msgid ""
+"Use this method to send audio files, if you want Telegram clients to "
+"display them in the music player. Your audio must be in the .MP3 or .M4A "
+"format. On success, the sent Message is returned. Bots can currently send"
+" audio files of up to 50 MB in size, this limit may be changed in the "
+"future."
+msgstr ""
+"Используйте этот метод, чтобы отправить аудио, если вы хотите, чтобы "
+"клиенты (приложения) Telegram проигрывали их в музыкальном проигрывателе."
+" Ваше аудио должно быть в формате .MP3 или .M4A. В случае успеха "
+"возвращается отправленное сообщение (Message). На текущий момент, боты "
+"могут отправлять аудио весом до 50 MB, это ограничение может измениться в"
+" будущем."
+
+#: of telebot.TeleBot.send_audio:5
+msgid "For sending voice messages, use the send_voice method instead."
+msgstr "Для отправки голосовых сообщений, используйте метод send_voice"
+
+#: of telebot.TeleBot.send_audio:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendaudio"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendaudio"
+
+#: of telebot.TeleBot.send_audio:12
+msgid ""
+"Audio file to send. Pass a file_id as String to send an audio file that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get an audio file from the Internet, or upload a "
+"new one using multipart/form-data. Audio must be in the .MP3 or .M4A "
+"format."
+msgstr ""
+"Аудио для отправки. Передайте file_id (String), чтобы отправить аудио, "
+"которое уже загружено на сервера Telegram (рекомендуется), передайте HTTP"
+" URL (String), чтобы отправить аудио из интернета или загрузите новое с "
+"помощью multipart/form-data. Аудио должно быть в формате .MP3 или .M4A."
+
+#: of telebot.TeleBot.send_audio:17
+msgid "Audio caption, 0-1024 characters after entities parsing"
+msgstr "Подпись к аудио, 0-1024 символа после форматирования"
+
+#: of telebot.TeleBot.send_audio:20
+msgid "Duration of the audio in seconds"
+msgstr "Длительность аудио в секундах"
+
+#: of telebot.TeleBot.send_audio:23
+msgid "Performer"
+msgstr "Исполнитель"
+
+#: of telebot.TeleBot.send_audio:26
+msgid "Track name"
+msgstr "Название трека"
+
+#: of telebot.TeleBot.send_audio:33
+msgid ""
+"Mode for parsing entities in the audio caption. See formatting options "
+"for more details."
+msgstr ""
+"Режим форматирования подписи к аудио. См. formatting options для "
+"получения подробностей."
+
+#: of telebot.TeleBot.send_audio:48
+msgid ""
+"Thumbnail of the file sent; can be ignored if thumbnail generation for "
+"the file is supported server-side. The thumbnail should be in JPEG format"
+" and less than 200 kB in size. A thumbnail's width and height should not "
+"exceed 320. Ignored if the file is not uploaded using multipart/form-"
+"data. Thumbnails can't be reused and can be only uploaded as a new file, "
+"so you can pass “attach://” if the thumbnail was "
+"uploaded using multipart/form-data under "
+msgstr ""
+"Обложка отправленного файла; может быть проигнорирована, если генерация "
+"обложки поддерживается на стороне сервера. Обложка должна быть картинкой "
+"в формате JPEG и весить менее 200 kB. Ширина и высота обложки не должны "
+"превышать 320. Игнорируется, если файл не загружен с помощью multipart"
+"/form-data. Обложки не могут быть использованы повторно и могут быть "
+"загружены только как новый файл, так что вы можете передать "
+"“attach://” если обложка была загружена с помощью "
+"multipart/form-data под именем ."
+
+#: of telebot.TeleBot.send_audio:54 telebot.TeleBot.send_document:38
+#: telebot.TeleBot.send_photo:19 telebot.TeleBot.send_voice:40
+msgid ""
+"A JSON-serialized list of special entities that appear in the caption, "
+"which can be specified instead of parse_mode"
+msgstr ""
+"Список отформатированных частей подписи в формате JSON, можно "
+"использовать вместо parse_mode"
+
+#: of telebot.TeleBot.send_chat_action:1
+msgid ""
+"Use this method when you need to tell the user that something is "
+"happening on the bot's side. The status is set for 5 seconds or less "
+"(when a message arrives from your bot, Telegram clients clear its typing "
+"status). Returns True on success."
+msgstr ""
+"Используйте этот метод, когда вам нужно показать пользователю, что бот "
+"что-то делает. Статус устанавливается на 5 секунд или менее (когда от "
+"бота приходит сообщение, клиенты (приложения) Telegram убирают статус "
+"typing). Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.send_chat_action:5
+msgid ""
+"Example: The ImageBot needs some time to process a request and upload the"
+" image. Instead of sending a text message along the lines of “Retrieving "
+"image, please wait…”, the bot may use sendChatAction with action = "
+"upload_photo. The user will see a “sending photo” status for the bot."
+msgstr ""
+"Пример: ImageBot-у требуется время, чтобы обработать запрос и загрузить "
+"изображение. Вместо отправки текстового сообщения “Отправка изображения, "
+"пожалуйста подождите…”, бот может использовать sendChatAction с "
+"параметром action = upload_photo. Пользователь увидит статус бота "
+"“sending photo”."
+
+#: of telebot.TeleBot.send_chat_action:8
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendchataction"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendchataction"
+
+#: of telebot.TeleBot.send_chat_action:13
+msgid ""
+"Type of action to broadcast. Choose one, depending on what the user is "
+"about to receive: typing for text messages, upload_photo for photos, "
+"record_video or upload_video for videos, record_voice or upload_voice for"
+" voice notes, upload_document for general files, choose_sticker for "
+"stickers, find_location for location data, record_video_note or "
+"upload_video_note for video notes."
+msgstr ""
+"Тип действия. Выберите один, в зависимости от того, что получит "
+"пользователь: typing для текстовых сообщений, upload_photo для фото, "
+"record_video или upload_video для видео, record_voice или upload_voice "
+"для голосовых сообщений, upload_document для файлов, choose_sticker для "
+"стикеров, find_location для данных о местоположении, record_video_note "
+"или upload_video_note для видео заметок (кружочков)."
+
+#: of telebot.TeleBot.send_chat_action:22
+msgid ""
+"The thread identifier of a message from which the reply will be "
+"sent(supergroups only)"
+msgstr "id топика, на сообщение из которого нужно ответить(только для супергрупп)"
+
+#: of telebot.TeleBot.send_contact:1
+msgid ""
+"Use this method to send phone contacts. On success, the sent Message is "
+"returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить контакт. В случае успеха "
+"возвращается отправленное сообщение (Message)."
+
+#: of telebot.TeleBot.send_contact:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendcontact"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendcontact"
+
+#: of telebot.TeleBot.send_contact:8
+msgid "Contact's phone number"
+msgstr "Телефонный номер контакта"
+
+#: of telebot.TeleBot.send_contact:11
+msgid "Contact's first name"
+msgstr "Имя контакта"
+
+#: of telebot.TeleBot.send_contact:14
+msgid "Contact's last name"
+msgstr "Фамилия контакта"
+
+#: of telebot.TeleBot.send_contact:17
+msgid "Additional data about the contact in the form of a vCard, 0-2048 bytes"
+msgstr "Дополнительные данные о контакте в формате vCard, 0-2048 байт"
+
+#: of telebot.TeleBot.send_contact:40 telebot.TeleBot.send_venue:53
+msgid "The thread identifier of a message from which the reply will be sent"
+msgstr "id топика, на сообщение из которого нужно ответить"
+
+#: of telebot.TeleBot.send_dice:1
+msgid ""
+"Use this method to send an animated emoji that will display a random "
+"value. On success, the sent Message is returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить анимированный эмодзи, который "
+"покажет случайное значение. В случае успеха возвращается отправленное "
+"сообщение (Message)."
+
+#: of telebot.TeleBot.send_dice:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#senddice"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#senddice"
+
+#: of telebot.TeleBot.send_dice:8
+msgid ""
+"Emoji on which the dice throw animation is based. Currently, must be one "
+"of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯”"
+" and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults "
+"to “🎲”"
+msgstr ""
+"Эмодзи, на котором основана анимация. На текущий момент, должно быть "
+"одним из “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, или “🎰”. Значение может быть 1-6 для "
+"“🎲”, “🎯” и “🎳”, 1-5 для “🏀” и “⚽”, и 1-64 для “🎰”. По умолчанию “🎲”"
+
+#: of telebot.TeleBot.send_document:1
+msgid "Use this method to send general files."
+msgstr "Используйте этот метод, чтобы отправить файл."
+
+#: of telebot.TeleBot.send_document:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#senddocument"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#senddocument"
+
+#: of telebot.TeleBot.send_document:8
+msgid ""
+"(document) File to send. Pass a file_id as String to send a file that "
+"exists on the Telegram servers (recommended), pass an HTTP URL as a "
+"String for Telegram to get a file from the Internet, or upload a new one "
+"using multipart/form-data"
+msgstr ""
+"(документ) Файл для отправки. Передайте file_id (String), чтобы отправить"
+" файл, который уже загружен на сервера Telegram (рекомендуется), "
+"передайте HTTP URL (String), чтобы отправить файл из интернета или "
+"загрузите новый с помощью multipart/form-data"
+
+#: of telebot.TeleBot.send_document:12
+msgid ""
+"Document caption (may also be used when resending documents by file_id), "
+"0-1024 characters after entities parsing"
+msgstr ""
+"Подпись к файлу (может быть использована при повторной отправке файла по "
+"file_id), 0-1024 символа после форматирования"
+
+#: of telebot.TeleBot.send_document:20
+msgid "Mode for parsing entities in the document caption"
+msgstr "Режим форматирования частей подписи к файлу"
+
+#: of telebot.TeleBot.send_document:35
+msgid ""
+"InputFile or String : Thumbnail of the file sent; can be ignored if "
+"thumbnail generation for the file is supported server-side. The thumbnail"
+" should be in JPEG format and less than 200 kB in size. A thumbnail's "
+"width and height should not exceed 320. Ignored if the file is not "
+"uploaded using multipart/form-data. Thumbnails can't be reused and can be"
+" only uploaded as a new file, so you can pass "
+"“attach://” if the thumbnail was uploaded using "
+"multipart/form-data under "
+msgstr ""
+"InputFile или String : Обложка отправленного файла; может быть "
+"проигнорирована, если генерация обложки поддерживается на стороне "
+"сервера. Обложка должна быть картинкой в формате JPEG и весить менее 200 "
+"kB. Ширина и высота обложки не должны превышать 320. Игнорируется, если "
+"файл не загружен с помощью multipart/form-data. Обложки не могут быть "
+"использованы повторно и могут быть загружены только как новый файл, так "
+"что вы можете передать “attach://” если обложка была "
+"загружена с помощью multipart/form-data под именем ."
+
+#: of telebot.TeleBot.send_document:41
+msgid ""
+"allows to define file name that will be visible in the Telegram instead "
+"of original file name"
+msgstr ""
+"позволяет задать имя файла, которое будет показано в Telegram вместо "
+"настоящего"
+
+#: of telebot.TeleBot.send_document:44
+msgid ""
+"Disables automatic server-side content type detection for files uploaded "
+"using multipart/form-data"
+msgstr ""
+"Отключает автоматическое обнаружение типа файла на стороне сервера для "
+"файлов, загруженных с помощью multipart/form-data"
+
+#: of telebot.TeleBot.send_document:47 telebot.TeleBot.send_sticker:33
+#: telebot.TeleBot.send_video:55
+msgid "function typo miss compatibility: do not use it"
+msgstr "опечатка: не используйте"
+
+#: of telebot.TeleBot.send_document:53 telebot.TeleBot.send_sticker:36
+msgid "The thread to which the message will be sent"
+msgstr "Топик, в которой сообщение будет отправлено"
+
+#: of telebot.TeleBot.send_game:1
+msgid "Used to send the game."
+msgstr "Используется для отправки игры."
+
+#: of telebot.TeleBot.send_game:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendgame"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendgame"
+
+#: of telebot.TeleBot.send_game:8
+msgid ""
+"Short name of the game, serves as the unique identifier for the game. Set"
+" up your games via @BotFather."
+msgstr ""
+"Короткое имя игры, служит в качестве уникального id игры. Настройте свои "
+"игрычерез @BotFather."
+
+#: of telebot.TeleBot.send_game:14 telebot.TeleBot.send_invoice:70
+#: telebot.TeleBot.send_poll:47
+#, fuzzy
+msgid "deprecated. If the message is a reply, ID of the original message"
+msgstr "Если сообщение является ответом - id сообщения, на которое дан ответ"
+
+#: of telebot.TeleBot.send_game:17 telebot.TeleBot.send_invoice:73
+#: telebot.TeleBot.send_poll:50
+#, fuzzy
+msgid ""
+"deprecated. Pass True, if the message should be sent even if the "
+"specified replied-to message is not found"
+msgstr ""
+"Передайте True, если сообщение нужно отправить даже в случае отсутствия "
+"сообщения, на которое дан ответ"
+
+#: of telebot.TeleBot.send_game:23
+msgid "Timeout in seconds for waiting for a response from the bot."
+msgstr "Тайм-аут в секундах, ожидание ответа от бота."
+
+#: of telebot.TeleBot.send_game:29
+msgid ""
+"The identifier of a message thread, in which the game message will be "
+"sent."
+msgstr "id топика, в который будет отправлено сообщение с игрой."
+
+#: of telebot.TeleBot.send_game:32 telebot.TeleBot.send_video:67
+msgid "Reply parameters"
+msgstr ""
+
+#: of telebot.TeleBot.send_game:36 telebot.TeleBot.send_invoice:105
+#: telebot.TeleBot.send_poll:74
+msgid ":obj:`types.Message`"
+msgstr ""
+
+#: of telebot.TeleBot.send_invoice:1
+msgid "Sends invoice."
+msgstr "Отправляет инвойс."
+
+#: of telebot.TeleBot.send_invoice:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendinvoice"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendinvoice"
+
+#: of telebot.TeleBot.send_invoice:5
+msgid "Unique identifier for the target private chat"
+msgstr "Уникальный id приватного чата"
+
+#: of telebot.TeleBot.send_invoice:29
+msgid ""
+"Unique deep-linking parameter that can be used to generate this invoice "
+"when used as a start parameter"
+msgstr ""
+"Уникальный deep-linking параметр, который может быть использован для "
+"генерации этого инвойса при использовании в качестве параметра /start"
+
+#: of telebot.TeleBot.send_invoice:33
+msgid ""
+"URL of the product photo for the invoice. Can be a photo of the goods or "
+"a marketing image for a service. People like it better when they see what"
+" they are paying for."
+msgstr ""
+"URL фото продукта. Может быть фото товаров или рекламным изображением "
+"сервиса. Людям больше нравится, когда они видят, за что платят."
+
+#: of telebot.TeleBot.send_invoice:76
+msgid ""
+"A JSON-serialized object for an inline keyboard. If empty, one 'Pay total"
+" price' button will be shown. If not empty, the first button must be a "
+"Pay button"
+msgstr ""
+"JSON-сериализованный объект inline клавиатуры. Если пустой, будет "
+"показана одна кнопка 'Pay total price'. Если не пустой, первая кнопка "
+"должна быть кнопкой для оплаты"
+
+#: of telebot.TeleBot.send_invoice:84 telebot.TeleBot.set_webhook:39
+msgid "Timeout of a request, defaults to None"
+msgstr "Тайм-аут запроса, по умолчанию None"
+
+#: of telebot.TeleBot.send_invoice:98
+msgid ""
+"The identifier of a message thread, in which the invoice message will be "
+"sent"
+msgstr "id топика, в который будет отправлен инвойс"
+
+#: of telebot.TeleBot.send_invoice:101
+msgid "Required if the message is a reply. Additional interface options."
+msgstr ""
+
+#: of telebot.TeleBot.send_location:1
+msgid ""
+"Use this method to send point on the map. On success, the sent Message is"
+" returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить точку на карте. В случае успеха "
+"возвращается отправленное сообщение (Message)."
+
+#: of telebot.TeleBot.send_location:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendlocation"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendlocation"
+
+#: of telebot.TeleBot.send_location:8
+msgid "Latitude of the location"
+msgstr "Широта"
+
+#: of telebot.TeleBot.send_location:11
+msgid "Longitude of the location"
+msgstr "Долгота"
+
+#: of telebot.TeleBot.send_location:14
+msgid ""
+"Period in seconds for which the location will be updated (see Live "
+"Locations, should be between 60 and 86400."
+msgstr ""
+"Время в секундах, в течение которого местоположение будет обновляться "
+"(см. Live Locations), должно быть между 60 и 86400."
+
+#: of telebot.TeleBot.send_location:37
+msgid ""
+"For live locations, a direction in which the user is moving, in degrees. "
+"Must be between 1 and 360 if specified."
+msgstr ""
+"Для live местоположений, направление, в котором пользователь двигается, в"
+" градусах. Должно быть между 1 и 360, если указано."
+
+#: of telebot.TeleBot.send_location:40
+msgid ""
+"For live locations, a maximum distance for proximity alerts about "
+"approaching another chat member, in meters. Must be between 1 and 100000 "
+"if specified."
+msgstr ""
+"Для live местоположений, максимальное расстояние для уведомлений о "
+"приближении другого участника чата, в метрах. Должно быть между 1 и "
+"100000, если указано."
+
+#: of telebot.TeleBot.send_media_group:1
+msgid ""
+"Use this method to send a group of photos, videos, documents or audios as"
+" an album. Documents and audio files can be only grouped in an album with"
+" messages of the same type. On success, an array of Messages that were "
+"sent is returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить группу фото, видео, файлов или "
+"аудио как альбом. Файлы и аудио могут быть сгруппированы в альбом только "
+"с сообщениями того же типа. В случае успеха возвращается массив "
+"отправленных сообщений (Message)."
+
+#: of telebot.TeleBot.send_media_group:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendmediagroup"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendmediagroup"
+
+#: of telebot.TeleBot.send_media_group:9
+msgid ""
+"A JSON-serialized array describing messages to be sent, must include 2-10"
+" items"
+msgstr ""
+"JSON-сериализованный массив, описывающий сообщения для отправки, должен "
+"включать от 2 до 10 элементов"
+
+#: of telebot.TeleBot.send_media_group:12
+msgid ""
+"Sends the messages silently. Users will receive a notification with no "
+"sound."
+msgstr ""
+"Отправить сообщение, при получении которого пользователя пользователи "
+"получат уведомление без звука."
+
+#: of telebot.TeleBot.send_media_group:27
+msgid "Identifier of a message thread, in which the media group will be sent"
+msgstr "id топика, в который будет отправлена группа медиа"
+
+#: of telebot.TeleBot.send_media_group:33
+msgid "On success, an array of Messages that were sent is returned."
+msgstr "В случае успеха возвращается массив отправленных сообщений (Message)."
+
+#: of telebot.TeleBot.send_message:1
+msgid "Use this method to send text messages."
+msgstr "Используйте этот метод, чтобы отправлять текстовые сообщения."
+
+#: of telebot.TeleBot.send_message:3
+msgid ""
+"Warning: Do not send more than about 4096 characters each message, "
+"otherwise you'll risk an HTTP 414 error. If you must send more than 4096 "
+"characters, use the `split_string` or `smart_split` function in util.py."
+msgstr ""
+"Предупреждение: Не отправляйте больше 4096 символов в одном сообщении, "
+"иначе вы рискуете получить ошибку HTTP 414. Если вам нужно отправить "
+"больше 4096 символов, используйте функцию `split_string` или "
+"`smart_split` из util.py."
+
+#: of telebot.TeleBot.send_message:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendmessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendmessage"
+
+#: of telebot.TeleBot.send_message:12
+msgid "Text of the message to be sent"
+msgstr "Текст сообщения для отправки"
+
+#: of telebot.TeleBot.send_message:18
+msgid ""
+"List of special entities that appear in message text, which can be "
+"specified instead of parse_mode"
+msgstr ""
+"Список отформатированных частей в тексте сообщения, можно использовать "
+"вместо parse_mode"
+
+#: of telebot.TeleBot.send_message:49
+msgid "Link preview options."
+msgstr ""
+
+#: of telebot.TeleBot.send_photo:1
+msgid "Use this method to send photos. On success, the sent Message is returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить фото. В случае успеха "
+"возвращается отправленное сообщение (Message)."
+
+#: of telebot.TeleBot.send_photo:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendphoto"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendphoto"
+
+#: of telebot.TeleBot.send_photo:8
+msgid ""
+"Photo to send. Pass a file_id as String to send a photo that exists on "
+"the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a photo from the Internet, or upload a new photo using "
+"multipart/form-data. The photo must be at most 10 MB in size. The photo's"
+" width and height must not exceed 10000 in total. Width and height ratio "
+"must be at most 20."
+msgstr ""
+"Фото для отправки. Передайте file_id (String), чтобы отправить фото, "
+"которое уже загружено на сервера Telegram (рекомендуется), передайте HTTP"
+" URL (String), чтобы отправить фото из интернета или загрузите новое с "
+"помощью multipart/form-data. Фото должно весить не более 10 MB. Ширина и "
+"высота фото не должны суммарно превышать 10000. Отношение ширины и высоты"
+" должно быть не более 20."
+
+#: of telebot.TeleBot.send_photo:13
+msgid ""
+"Photo caption (may also be used when resending photos by file_id), 0-1024"
+" characters after entities parsing"
+msgstr ""
+"Подпись к фото (может быть использована при повторной отправке файла по "
+"file_id), 0-1024 символа после форматирования"
+
+#: of telebot.TeleBot.send_photo:16
+msgid "Mode for parsing entities in the photo caption."
+msgstr "Режим форматирования подписи к фото."
+
+#: of telebot.TeleBot.send_photo:45
+msgid "Pass True, if the photo should be sent as a spoiler"
+msgstr "Передайте True, если фото должно быть отправлено как спойлер"
+
+#: of telebot.TeleBot.send_poll:1
+msgid ""
+"Use this method to send a native poll. On success, the sent Message is "
+"returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить опрос. В случае успеха "
+"возвращается отправленное сообщение (Message)."
+
+#: of telebot.TeleBot.send_poll:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendpoll"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendpoll"
+
+#: of telebot.TeleBot.send_poll:9
+msgid "Poll question, 1-300 characters"
+msgstr "Тема опроса, 1-300 символов"
+
+#: of telebot.TeleBot.send_poll:12
+msgid ""
+"A JSON-serialized list of answer options, 2-10 strings 1-100 characters "
+"each"
+msgstr "JSON-сериализованный список вариантов ответа, 2-10 строк по 1-100 символов"
+
+#: of telebot.TeleBot.send_poll:15
+msgid "True, if the poll needs to be anonymous, defaults to True"
+msgstr "True, если опрос должен быть анонимным, по умолчанию True"
+
+#: of telebot.TeleBot.send_poll:18
+msgid "Poll type, “quiz” or “regular”, defaults to “regular”"
+msgstr "Вид опроса, “quiz” или “regular”, по умолчанию “regular”"
+
+#: of telebot.TeleBot.send_poll:21
+msgid ""
+"True, if the poll allows multiple answers, ignored for polls in quiz "
+"mode, defaults to False"
+msgstr ""
+"True, если опрос позволяет выбрать несколько вариантов ответа, "
+"игнорируется в опросах вида “quiz”, по умолчанию False"
+
+#: of telebot.TeleBot.send_poll:24
+msgid ""
+"0-based identifier of the correct answer option. Available only for polls"
+" in quiz mode, defaults to None"
+msgstr ""
+"Индекс правильного варианта ответа, начиная с 0. Доступно только для "
+"опросов вида “quiz”, по умолчанию None"
+
+#: of telebot.TeleBot.send_poll:28
+msgid ""
+"Text that is shown when a user chooses an incorrect answer or taps on the"
+" lamp icon in a quiz-style poll, 0-200 characters with at most 2 line "
+"feeds after entities parsing"
+msgstr ""
+"Текст, который будет показан при выборе неправильно варианта ответа или "
+"нажатии на иконку лампочки в опросах вида “quiz”, 0-200 символов и не "
+"более 2 строк после форматирования"
+
+#: of telebot.TeleBot.send_poll:32
+msgid ""
+"Mode for parsing entities in the explanation. See formatting options for "
+"more details."
+msgstr ""
+"Режим форматирования explanation. См. formatting options для получения "
+"подробностей."
+
+#: of telebot.TeleBot.send_poll:35
+msgid ""
+"Amount of time in seconds the poll will be active after creation, 5-600. "
+"Can't be used together with close_date."
+msgstr ""
+"Время в секундах, в течение которого опрос будет активен, 5-600. Нельзя "
+"использовать вместо с close_date."
+
+#: of telebot.TeleBot.send_poll:38
+msgid "Point in time (Unix timestamp) when the poll will be automatically closed."
+msgstr "Время (UNIX timestamp), когда опрос будет автоматически завершен."
+
+#: of telebot.TeleBot.send_poll:41
+msgid ""
+"Pass True, if the poll needs to be immediately closed. This can be useful"
+" for poll preview."
+msgstr ""
+"Передайте True, если опрос должен быть завершен немедленно. Может быть "
+"полезно для предпросмотра опроса."
+
+#: of telebot.TeleBot.send_poll:57
+msgid "Timeout in seconds for waiting for a response from the user."
+msgstr "Тайм-аут в секундах, ожидание ответа от пользователя."
+
+#: of telebot.TeleBot.send_poll:60
+msgid ""
+"A JSON-serialized list of special entities that appear in the "
+"explanation, which can be specified instead of parse_mode"
+msgstr ""
+"JSON-сериализованный список отформатированных частей explanation, можно "
+"использовать вместо parse_mode"
+
+#: of telebot.TeleBot.send_poll:67
+msgid "The identifier of a message thread, in which the poll will be sent"
+msgstr "id топика, в который будет отправлен опрос"
+
+#: of telebot.TeleBot.send_poll:70
+msgid "reply parameters."
+msgstr ""
+
+#: of telebot.TeleBot.send_sticker:1
+msgid ""
+"Use this method to send static .WEBP, animated .TGS, or video .WEBM "
+"stickers. On success, the sent Message is returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить статичный .WEBP, анимированный "
+".TGS, или видео .WEBM стикер. В случае успеха возвращает отправленное "
+"сообщение (Message)."
+
+#: of telebot.TeleBot.send_sticker:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendsticker"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendsticker"
+
+#: of telebot.TeleBot.send_sticker:9
+msgid ""
+"Sticker to send. Pass a file_id as String to send a file that exists on "
+"the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a .webp file from the Internet, or upload a new one using"
+" multipart/form-data."
+msgstr ""
+"Стикер для отправки. Передайте file_id (String), чтобы отправить файл, "
+"который уже загружен на сервера Telegram (рекомендуется), передайте HTTP "
+"URL (String), чтобы отправить .webp файл из интернета или загрузите новый"
+" с помощью multipart/form-data."
+
+#: of telebot.TeleBot.send_sticker:18
+msgid "to disable the notification"
+msgstr "отключить уведомление"
+
+#: of telebot.TeleBot.send_sticker:39
+msgid "Emoji associated with the sticker; only for just uploaded stickers"
+msgstr ""
+
+#: of telebot.TeleBot.send_venue:1
+msgid ""
+"Use this method to send information about a venue. On success, the sent "
+"Message is returned."
+msgstr ""
+"Используйте этот метод, чтобы отправить информацию о месте. В случае "
+"успеха возвращается отправленное сообщение (Message)."
+
+#: of telebot.TeleBot.send_venue:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvenue"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendvenue"
+
+#: of telebot.TeleBot.send_venue:8
+msgid "Latitude of the venue"
+msgstr "Широта"
+
+#: of telebot.TeleBot.send_venue:11
+msgid "Longitude of the venue"
+msgstr "Долгота"
+
+#: of telebot.TeleBot.send_venue:14
+msgid "Name of the venue"
+msgstr "Название места"
+
+#: of telebot.TeleBot.send_venue:17
+msgid "Address of the venue"
+msgstr "Адрес места"
+
+#: of telebot.TeleBot.send_venue:20
+msgid "Foursquare identifier of the venue"
+msgstr "id места на Foursquare"
+
+#: of telebot.TeleBot.send_venue:23
+msgid ""
+"Foursquare type of the venue, if known. (For example, "
+"“arts_entertainment/default”, “arts_entertainment/aquarium” or "
+"“food/icecream”.)"
+msgstr ""
+"Тип места на Foursquare, если известен. (Например, "
+"“arts_entertainment/default”, “arts_entertainment/aquarium” или "
+"“food/icecream”.)"
+
+#: of telebot.TeleBot.send_venue:44
+msgid "Google Places identifier of the venue"
+msgstr "id места на Google Places"
+
+#: of telebot.TeleBot.send_venue:47
+msgid "Google Places type of the venue."
+msgstr "Тип места на Google Places."
+
+#: of telebot.TeleBot.send_video:1
+msgid ""
+"Use this method to send video files, Telegram clients support mp4 videos "
+"(other formats may be sent as Document)."
+msgstr ""
+"Используйте этот метод, чтобы отправить видео, клиенты (приложения) "
+"Telegram поддерживают mp4 видео (другие форматы могут быть отправлены как"
+" Document)."
+
+#: of telebot.TeleBot.send_video:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvideo"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendvideo"
+
+#: of telebot.TeleBot.send_video:8
+msgid ""
+"Video to send. You can either pass a file_id as String to resend a video "
+"that is already on the Telegram servers, or upload a new video file using"
+" multipart/form-data."
+msgstr ""
+"Видео для отправки. Передайте file_id (String), чтобы отправить видео, "
+"которое уже загружено на сервера Telegram или загрузите новое с помощью "
+"multipart/form-data."
+
+#: of telebot.TeleBot.send_video:11 telebot.TeleBot.send_video_note:13
+msgid "Duration of sent video in seconds"
+msgstr "Длительность отправленного видео в секундах"
+
+#: of telebot.TeleBot.send_video:14
+msgid "Video width"
+msgstr "Ширина видео"
+
+#: of telebot.TeleBot.send_video:17
+msgid "Video height"
+msgstr "Высота видео"
+
+#: of telebot.TeleBot.send_video:23
+msgid ""
+"Video caption (may also be used when resending videos by file_id), 0-1024"
+" characters after entities parsing"
+msgstr ""
+"Подпись к видео (может быть использована при повторной отправке файла по "
+"file_id), 0-1024 символа после форматирования"
+
+#: of telebot.TeleBot.send_video:26
+msgid "Mode for parsing entities in the video caption"
+msgstr "Режим форматирования подписи к видео"
+
+#: of telebot.TeleBot.send_video:32
+msgid "Pass True, if the uploaded video is suitable for streaming"
+msgstr "Передайте True, если загруженное видео подходит для стриминга"
+
+#: of telebot.TeleBot.send_video:61
+msgid "Pass True, if the video should be sent as a spoiler"
+msgstr "Передайте True, если видео должно быть отправлено как спойлер"
+
+#: of telebot.TeleBot.send_video_note:1
+msgid ""
+"As of v.4.0, Telegram clients support rounded square MPEG4 videos of up "
+"to 1 minute long. Use this method to send video messages. On success, the"
+" sent Message is returned."
+msgstr ""
+"Начиная с версии v.4.0, клиенты(приложения) Telegram поддерживают "
+"скругленные квадратные MPEG4 видео длительностью до минуты. Используйте "
+"этот метод, чтобы отправить видео заметку (кружочек). В случае успеха "
+"возвращается отправленное сообщение (Message)."
+
+#: of telebot.TeleBot.send_video_note:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvideonote"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendvideonote"
+
+#: of telebot.TeleBot.send_video_note:9
+msgid ""
+"Video note to send. Pass a file_id as String to send a video note that "
+"exists on the Telegram servers (recommended) or upload a new video using "
+"multipart/form-data. Sending video notes by a URL is currently "
+"unsupported"
+msgstr ""
+"Видео заметка для отправки. Передайте file_id (String), чтобы отправить "
+"видео заметку, которая уже загружена на сервера Telegram или загрузите "
+"новую с помощью multipart/form-data. На текущий момент, отправка видео "
+"заметок по URL не поддерживается"
+
+#: of telebot.TeleBot.send_video_note:16
+msgid "Video width and height, i.e. diameter of the video message"
+msgstr "Ширина и высота видео (диаметр видео сообщения)"
+
+#: of telebot.TeleBot.send_video_note:45
+msgid "Identifier of a message thread, in which the video note will be sent"
+msgstr "id топика, в который будет отправлена видео заметка"
+
+#: of telebot.TeleBot.send_voice:1
+msgid ""
+"Use this method to send audio files, if you want Telegram clients to "
+"display the file as a playable voice message. For this to work, your "
+"audio must be in an .OGG file encoded with OPUS (other formats may be "
+"sent as Audio or Document). On success, the sent Message is returned. "
+"Bots can currently send voice messages of up to 50 MB in size, this limit"
+" may be changed in the future."
+msgstr ""
+"Используйте этот метод, чтобы отправить голосовое сообщение. Ваше аудио "
+"должно быть в формате .OGG и закодировано с помощью OPUS (другие форматы "
+"можно отправить как Audio или Document). В случае успеха возвращается "
+"отправленное сообщение (Message). На текущий момент, боты могут "
+"отправлять голосовые сообщения весом до 50 MB, это ограничение может быть"
+" изменено в будущем."
+
+#: of telebot.TeleBot.send_voice:5
+msgid "Telegram documentation: https://core.telegram.org/bots/api#sendvoice"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendvoice"
+
+#: of telebot.TeleBot.send_voice:10
+msgid ""
+"Audio file to send. Pass a file_id as String to send a file that exists "
+"on the Telegram servers (recommended), pass an HTTP URL as a String for "
+"Telegram to get a file from the Internet, or upload a new one using "
+"multipart/form-data."
+msgstr ""
+"Аудио для отправки. Передайте file_id (String), чтобы отправить аудио, "
+"которое уже загружено на сервера Telegram (рекомендуется), передайте HTTP"
+" URL (String), чтобы отправить аудио из интернета или загрузите новое с "
+"помощью multipart/form-data."
+
+#: of telebot.TeleBot.send_voice:14
+msgid "Voice message caption, 0-1024 characters after entities parsing"
+msgstr "Подпись к голосовому сообщению, 0-1024 символа после форматирования"
+
+#: of telebot.TeleBot.send_voice:17
+msgid "Duration of the voice message in seconds"
+msgstr "Длительность голосового сообщения в секундах"
+
+#: of telebot.TeleBot.send_voice:25
+msgid ""
+"Mode for parsing entities in the voice message caption. See formatting "
+"options for more details."
+msgstr ""
+"Режим форматирования подписи к голосовому сообщению. См. formatting "
+"options для получения подробностей."
+
+#: of telebot.TeleBot.set_chat_administrator_custom_title:1
+msgid ""
+"Use this method to set a custom title for an administrator in a "
+"supergroup promoted by the bot. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы задать кастомное звание администратора "
+"супергруппы, повышенного ботом. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.set_chat_administrator_custom_title:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatadministratorcustomtitle"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatadministratorcustomtitle"
+
+#: of telebot.TeleBot.set_chat_administrator_custom_title:13
+msgid ""
+"New custom title for the administrator; 0-16 characters, emoji are not "
+"allowed"
+msgstr "Новое кастомное звание администратора; 0-16 символов, эмодзи не разрешены"
+
+#: of telebot.TeleBot.set_chat_description:1
+msgid ""
+"Use this method to change the description of a supergroup or a channel. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights."
+msgstr ""
+"Используйте этот метод, чтобы изменить описание супергруппы или канала. "
+"Бот должен быть администратором чата и иметь соответствующие права "
+"администратора."
+
+#: of telebot.TeleBot.set_chat_description:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatdescription"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatdescription"
+
+#: of telebot.TeleBot.set_chat_description:10
+msgid "Str: New chat description, 0-255 characters"
+msgstr "Str: Новое описание чата, 0-255 символов"
+
+#: of telebot.TeleBot.set_chat_menu_button:1
+msgid ""
+"Use this method to change the bot's menu button in a private chat, or the"
+" default menu button. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы изменить кнопку меню в приватном чате или "
+"кнопку меню по умолчанию. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.set_chat_menu_button:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatmenubutton"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatmenubutton"
+
+#: of telebot.TeleBot.set_chat_menu_button:7
+msgid ""
+"Unique identifier for the target private chat. If not specified, default "
+"bot's menu button will be changed."
+msgstr ""
+"Уникальный id приватного чата. Если не указан, будет изменена кнопка меню"
+" по умолчанию."
+
+#: of telebot.TeleBot.set_chat_menu_button:11
+msgid ""
+"A JSON-serialized object for the new bot's menu button. Defaults to "
+"MenuButtonDefault"
+msgstr ""
+"JSON-сериализованный объект новой кнопки меню. По умолчанию "
+"MenuButtonDefault"
+
+#: of telebot.TeleBot.set_chat_permissions:1
+msgid ""
+"Use this method to set default chat permissions for all members. The bot "
+"must be an administrator in the group or a supergroup for this to work "
+"and must have the can_restrict_members admin rights."
+msgstr ""
+"Используйте этот метод, чтобы задать права по умолчанию для всех "
+"участников чата. Бот должен быть администратором группы или супергруппы и"
+" иметь права администратора can_restrict_members."
+
+#: of telebot.TeleBot.set_chat_permissions:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatpermissions"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatpermissions"
+
+#: of telebot.TeleBot.set_chat_permissions:11
+msgid "New default chat permissions"
+msgstr "Новые права по умолчанию"
+
+#: of telebot.TeleBot.set_chat_photo:1
+msgid ""
+"Use this method to set a new profile photo for the chat. Photos can't be "
+"changed for private chats. The bot must be an administrator in the chat "
+"for this to work and must have the appropriate admin rights. Returns True"
+" on success. Note: In regular groups (non-supergroups), this method will "
+"only work if the ‘All Members Are Admins’ setting is off in the target "
+"group."
+msgstr ""
+"Используйте этот метод, чтобы задать новую аватарку чата. В приватных "
+"чатах аватарки менять нельзя. Бот должен быть администратором чата и "
+"иметь соответствующие права администратора. Возвращает True в случае "
+"успеха. Примечание: В обычных группах (не супергруппы), этот метод будет "
+"работать только если настройка ‘All Members Are Admins’ отключена."
+
+#: of telebot.TeleBot.set_chat_photo:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setchatphoto"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#setchatphoto"
+
+#: of telebot.TeleBot.set_chat_photo:13
+msgid "InputFile: New chat photo, uploaded using multipart/form-data"
+msgstr "InputFile: Новая аватарка чата, загруженная с помощью multipart/form-data"
+
+#: of telebot.TeleBot.set_chat_sticker_set:1
+msgid ""
+"Use this method to set a new group sticker set for a supergroup. The bot "
+"must be an administrator in the chat for this to work and must have the "
+"appropriate administrator rights. Use the field can_set_sticker_set "
+"optionally returned in getChat requests to check if the bot can use this "
+"method. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы задать стикерпак супергруппы. Бот должен "
+"быть администратором чата и иметь соответствующие права администратора. "
+"Используйте атрибут can_set_sticker_set, возвращаемые методом getChat, "
+"чтобы проверить, что бот может использовать этот метод. Возвращает True в"
+" случае успеха."
+
+#: of telebot.TeleBot.set_chat_sticker_set:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setchatstickerset"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatstickerset"
+
+#: of telebot.TeleBot.set_chat_sticker_set:10
+msgid "Name of the sticker set to be set as the group sticker set"
+msgstr "Имя стикерпака для установки в качестве стикерпака группы"
+
+#: of telebot.TeleBot.set_chat_sticker_set:13
+msgid "StickerSet object"
+msgstr "Объект StickerSet"
+
+#: of telebot.TeleBot.set_chat_title:1
+msgid ""
+"Use this method to change the title of a chat. Titles can't be changed "
+"for private chats. The bot must be an administrator in the chat for this "
+"to work and must have the appropriate admin rights. Returns True on "
+"success. Note: In regular groups (non-supergroups), this method will only"
+" work if the ‘All Members Are Admins’ setting is off in the target group."
+msgstr ""
+"Используйте этот метод, чтобы изменить название чата. В приватных чатах "
+"изменить название нельзя. Бот должен быть администратором чата и иметь "
+"соответствующие права админа. Возвращает True в случае успеха. "
+"Примечание: В обычных группах (не супергруппы), этот метод будет работать"
+" только если настройка ‘All Members Are Admins’ отключена."
+
+#: of telebot.TeleBot.set_chat_title:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setchattitle"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#setchattitle"
+
+#: of telebot.TeleBot.set_chat_title:13
+msgid "New chat title, 1-255 characters"
+msgstr "Новое название чата, 1-255 символов"
+
+#: of telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail:1
+#, fuzzy
+msgid ""
+"Use this method to set the thumbnail of a custom emoji sticker set. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы задать обложку стикерпака. Анимированные "
+"обложки могут быть заданы только для анимированных стикерпаков. "
+"Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.set_custom_emoji_sticker_set_thumbnail:7
+msgid ""
+"Custom emoji identifier of a sticker from the sticker set; pass an empty "
+"string to drop the thumbnail and use the first sticker as the thumbnail."
+msgstr ""
+
+#: of telebot.TeleBot.set_game_score:1
+msgid "Sets the value of points in the game to a specific user."
+msgstr "Задаёт количество очков пользователя в игре."
+
+#: of telebot.TeleBot.set_game_score:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setgamescore"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#setgamescore"
+
+#: of telebot.TeleBot.set_game_score:8
+msgid "New score, must be non-negative"
+msgstr "Количество очков, должно быть неотрицательным"
+
+#: of telebot.TeleBot.set_game_score:11
+msgid ""
+"Pass True, if the high score is allowed to decrease. This can be useful "
+"when fixing mistakes or banning cheaters"
+msgstr ""
+"Передайте True, если количество очков могут быть уменьшено. Может быть "
+"полезно при исправлении ошибок или бане читеров"
+
+#: of telebot.TeleBot.set_game_score:23
+msgid ""
+"Pass True, if the game message should not be automatically edited to "
+"include the current scoreboard"
+msgstr ""
+"Передайте True, если сообщение с игрой должно быть автоматически "
+"отредактировано, чтобы отобразить новый результат"
+
+#: of telebot.TeleBot.set_game_score:26
+msgid ""
+"On success, if the message was sent by the bot, returns the edited "
+"Message, otherwise returns True."
+msgstr ""
+"В случае успеха, если сообщение было отправлено ботом, возвращает "
+"измененное сообщение (Message), иначе возвращает True."
+
+#: of telebot.TeleBot.set_message_reaction:1
+#, fuzzy
+msgid ""
+"Use this method to set a reaction to a message in a chat. The bot must be"
+" an administrator in the chat for this to work and must have the "
+"appropriate admin rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы закрепить сообщение в супергруппе. Бот "
+"должен быть администратором чата и иметь соответствующие права "
+"администратора. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.set_message_reaction:3
+#, fuzzy
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmessagereaction"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#editmessagecaption"
+
+#: of telebot.TeleBot.set_message_reaction:8
+#, fuzzy
+msgid "Identifier of the message to set reaction to"
+msgstr "id сообщения, которое нужно удалить"
+
+#: of telebot.TeleBot.set_message_reaction:11
+msgid ""
+"New list of reaction types to set on the message. Currently, as non-"
+"premium users, bots can set up to one reaction per message. A custom "
+"emoji reaction can be used if it is either already present on the message"
+" or explicitly allowed by chat administrators."
+msgstr ""
+
+#: of telebot.TeleBot.set_message_reaction:15
+msgid "Pass True to set the reaction with a big animation"
+msgstr ""
+
+#: of telebot.TeleBot.set_my_commands:1
+msgid "Use this method to change the list of the bot's commands."
+msgstr "Используйте этот метод, чтобы изменить список команд бота."
+
+#: of telebot.TeleBot.set_my_commands:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setmycommands"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#setmycommands"
+
+#: of telebot.TeleBot.set_my_commands:5
+msgid "List of BotCommand. At most 100 commands can be specified."
+msgstr "Список объектов BotCommand. Можно задать не более 100 команд."
+
+#: of telebot.TeleBot.set_my_default_administrator_rights:1
+msgid ""
+"Use this method to change the default administrator rights requested by "
+"the bot when it's added as an administrator to groups or channels. These "
+"rights will be suggested to users, but they are are free to modify the "
+"list before adding the bot. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы изменить права администратора по умолчанию,"
+" запрашиваемые при добавлении бота в группу или канал в качестве "
+"администратора. Эти права будут предложены пользователям, но пользователи"
+" могут изменить список перед добавлением бота. Возвращает True в случае "
+"успеха."
+
+#: of telebot.TeleBot.set_my_default_administrator_rights:7
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmydefaultadministratorrights"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setmydefaultadministratorrights"
+
+#: of telebot.TeleBot.set_my_default_administrator_rights:9
+msgid ""
+"A JSON-serialized object describing new default administrator rights. If "
+"not specified, the default administrator rights will be cleared."
+msgstr ""
+"JSON-сериалиованный объект, описывающий новые права администратора по "
+"умолчанию. Если не указан, права администратора по умолчанию будут "
+"сброшены."
+
+#: of telebot.TeleBot.set_my_default_administrator_rights:13
+msgid ""
+"Pass True to change the default administrator rights of the bot in "
+"channels. Otherwise, the default administrator rights of the bot for "
+"groups and supergroups will be changed."
+msgstr ""
+"Передайте True, чтобы изменить права администратора по умолчанию в "
+"каналах. Иначе, будут изменены права администратора по умолчанию для "
+"групп и супергрупп."
+
+#: of telebot.TeleBot.set_my_description:1
+#, fuzzy
+msgid ""
+"Use this method to change the bot's description, which is shown in the "
+"chat with the bot if the chat is empty. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы изменить кнопку меню в приватном чате или "
+"кнопку меню по умолчанию. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.set_my_description:5
+#, fuzzy
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmydescription"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatdescription"
+
+#: of telebot.TeleBot.set_my_description:7
+msgid ""
+"New bot description; 0-512 characters. Pass an empty string to remove the"
+" dedicated description for the given language."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_description:10
+#, fuzzy
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, the description will be "
+"applied to all users for whose language there is no dedicated "
+"description."
+msgstr ""
+"Двухбуквенный языковой код в формате ISO 639-1. Если не задан, изменения "
+"коснутся команд для всех пользователей в заданном поле видимости, не "
+"имеющих команд на их языке"
+
+#: of telebot.TeleBot.set_my_name:1
+#, fuzzy
+msgid "Use this method to change the bot's name. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы изменить кнопку меню в приватном чате или "
+"кнопку меню по умолчанию. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.set_my_name:3
+#, fuzzy
+msgid "Telegram documentation: https://core.telegram.org/bots/api#setmyname"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#sendgame"
+
+#: of telebot.TeleBot.set_my_name:5
+msgid ""
+"Optional. New bot name; 0-64 characters. Pass an empty string to remove "
+"the dedicated name for the given language."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_name:8
+#, fuzzy
+msgid ""
+"Optional. A two-letter ISO 639-1 language code. If empty, the name will "
+"be shown to all users for whose language there is no dedicated name."
+msgstr ""
+"Двухбуквенный языковой код в формате ISO 639-1. Если не задан, изменения "
+"коснутся команд для всех пользователей в заданном поле видимости, не "
+"имеющих команд на их языке"
+
+#: of telebot.TeleBot.set_my_short_description:1
+msgid ""
+"Use this method to change the bot's short description, which is shown on "
+"the bot's profile page and is sent together with the link when users "
+"share the bot. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_short_description:5
+#, fuzzy
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setmyshortdescription"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setchatdescription"
+
+#: of telebot.TeleBot.set_my_short_description:7
+msgid ""
+"New short description for the bot; 0-120 characters. Pass an empty string"
+" to remove the dedicated short description for the given language."
+msgstr ""
+
+#: of telebot.TeleBot.set_my_short_description:10
+#, fuzzy
+msgid ""
+"A two-letter ISO 639-1 language code. If empty, the short description "
+"will be applied to all users for whose language there is no dedicated "
+"short description."
+msgstr ""
+"Двухбуквенный языковой код в формате ISO 639-1. Если не задан, изменения "
+"коснутся команд для всех пользователей в заданном поле видимости, не "
+"имеющих команд на их языке"
+
+#: of telebot.TeleBot.set_state:1
+msgid "Sets a new state of a user."
+msgstr "Задаёт новое состояние (стейт) пользователя."
+
+#: of telebot.TeleBot.set_state:5
+msgid ""
+"You should set both user id and chat id in order to set state for a user "
+"in a chat. Otherwise, if you only set user_id, chat_id will equal to "
+"user_id, this means that state will be set for the user in his private "
+"chat with a bot."
+msgstr ""
+"Вы должны указать и user id и chat id, чтобы задать состояние (стейт) "
+"пользователя в чате. Иначе, если вы укажете только user_id, chat_id будет"
+" равен user_id, что означает смену состояния (стейта) пользователя в его "
+"приватном чате с ботом."
+
+#: of telebot.TeleBot.set_state:12
+msgid "new state. can be string, integer, or :class:`telebot.types.State`"
+msgstr ""
+"новое состояние (стейт). может быть строкой, числом или "
+":class:`telebot.types.State`"
+
+#: of telebot.TeleBot.set_sticker_emoji_list:1
+#, fuzzy
+msgid ""
+"Use this method to set the emoji list of a custom emoji sticker set. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы получить текущий список команд бота. "
+"Возвращает список объектов BotCommand в случае успеха."
+
+#: of telebot.TeleBot.set_sticker_emoji_list:4
+#, fuzzy
+msgid "Sticker identifier"
+msgstr "id пользователя"
+
+#: of telebot.TeleBot.set_sticker_emoji_list:7
+#, fuzzy
+msgid "List of emoji"
+msgstr "список команд"
+
+#: of telebot.TeleBot.set_sticker_keywords:1
+msgid ""
+"Use this method to change search keywords assigned to a regular or custom"
+" emoji sticker. The sticker must belong to a sticker set created by the "
+"bot. Returns True on success."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_keywords:5
+#: telebot.TeleBot.set_sticker_mask_position:5
+#, fuzzy
+msgid "File identifier of the sticker."
+msgstr "id файла стикера"
+
+#: of telebot.TeleBot.set_sticker_keywords:8
+msgid ""
+"A JSON-serialized list of 0-20 search keywords for the sticker with total"
+" length of up to 64 characters"
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_mask_position:1
+#, fuzzy
+msgid ""
+"Use this method to change the mask position of a mask sticker. The "
+"sticker must belong to a sticker set that was created by the bot. Returns"
+" True on success."
+msgstr ""
+"Используйте этот метод, чтобы удалить стикер из стикерпака, созданного "
+"ботом. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.set_sticker_mask_position:8
+#, fuzzy
+msgid ""
+"A JSON-serialized object for position where the mask should be placed on "
+"faces."
+msgstr "Позиция для размещения маски на лицах в формате JSON"
+
+#: of telebot.TeleBot.set_sticker_position_in_set:1
+msgid ""
+"Use this method to move a sticker in a set created by the bot to a "
+"specific position . Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы передвинуть стикер в стикерпаке, созданном "
+"ботом, на заданную позицию. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.set_sticker_position_in_set:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setstickerpositioninset"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setstickerpositioninset"
+
+#: of telebot.TeleBot.set_sticker_position_in_set:8
+msgid "New sticker position in the set, zero-based"
+msgstr "Новая позиция стикера в стикерпаке, начиная с нуля"
+
+#: of telebot.TeleBot.set_sticker_set_thumbnail:1
+msgid ""
+"Use this method to set the thumbnail of a sticker set. Animated "
+"thumbnails can be set for animated sticker sets only. Returns True on "
+"success."
+msgstr ""
+"Используйте этот метод, чтобы задать обложку стикерпака. Анимированные "
+"обложки могут быть заданы только для анимированных стикерпаков. "
+"Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.set_sticker_set_thumbnail:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#setstickersetthumb"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#setstickersetthumb"
+
+#: of telebot.TeleBot.set_sticker_set_thumbnail:12
+msgid ""
+"A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in "
+"size and have a width and height of exactly 100px, or a .TGS animation "
+"with a thumbnail up to 32 kilobytes in size (see "
+"https://core.telegram.org/stickers#animated-sticker-requirements for "
+"animated sticker technical requirements), or a WEBM video with the "
+"thumbnail up to 32 kilobytes in size; see "
+"https://core.telegram.org/stickers#video-sticker-requirements for video "
+"sticker technical requirements. Pass a file_id as a String to send a file"
+" that already exists on the Telegram servers, pass an HTTP URL as a "
+"String for Telegram to get a file from the Internet, or upload a new one "
+"using multipart/form-data. More information on Sending Files ». Animated "
+"and video sticker set thumbnails can't be uploaded via HTTP URL. If "
+"omitted, then the thumbnail is dropped and the first sticker is used as "
+"the thumbnail."
+msgstr ""
+
+#: of telebot.TeleBot.set_sticker_set_title:1
+#, fuzzy
+msgid ""
+"Use this method to set the title of a created sticker set. Returns True "
+"on success."
+msgstr ""
+"Используйте этот метод, чтобы задать обложку стикерпака. Анимированные "
+"обложки могут быть заданы только для анимированных стикерпаков. "
+"Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.set_sticker_set_title:7
+#, fuzzy
+msgid "New sticker set title"
+msgstr "Имя стикерпака"
+
+#: of telebot.TeleBot.set_update_listener:1
+msgid "Sets a listener function to be called when a new update is received."
+msgstr ""
+"Задаёт функцию-листенер, которая будет вызвана при получении нового "
+"апдейта."
+
+#: of telebot.TeleBot.set_update_listener:3
+msgid "Listener function."
+msgstr "Функция-листенер."
+
+#: of telebot.TeleBot.set_webhook:1
+msgid ""
+"Use this method to specify a URL and receive incoming updates via an "
+"outgoing webhook. Whenever there is an update for the bot, we will send "
+"an HTTPS POST request to the specified URL, containing a JSON-serialized "
+"Update. In case of an unsuccessful request, we will give up after a "
+"reasonable amount of attempts. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы задать URL и получать входящие апдейты с "
+"помощью вебхука. Как только у бота появляется апдейт, он будет отправлен "
+"с помощью HTTPS POST запроса на заданный URL, содержащего "
+"JSON-сериализованный Update. В случае неудачного запроса, отправка "
+"апдейта будет отменена после разумного числа попыток. Возвращает True в "
+"случае успеха."
+
+#: of telebot.TeleBot.set_webhook:6
+msgid ""
+"If you'd like to make sure that the webhook was set by you, you can "
+"specify secret data in the parameter secret_token. If specified, the "
+"request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the "
+"secret token as content."
+msgstr ""
+"Если вы хотите удостовериться, что вебхук был задан вами, вы можете "
+"задать секретный токен в параметре secret_token. Если указан, запрос с "
+"апдейтом будет содержать хедер “X-Telegram-Bot-Api-Secret-Token” с "
+"секретным токеном в качестве значения."
+
+#: of telebot.TeleBot.set_webhook:9
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#setwebhook"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#setwebhook"
+
+#: of telebot.TeleBot.set_webhook:11
+msgid ""
+"HTTPS URL to send updates to. Use an empty string to remove webhook "
+"integration, defaults to None"
+msgstr ""
+"HTTPS URL для отправки апдейтов. Используйте пустую строку, чтобы удалить"
+" вебхук, по умолчанию None"
+
+#: of telebot.TeleBot.set_webhook:14
+msgid ""
+"Upload your public key certificate so that the root certificate in use "
+"can be checked, defaults to None"
+msgstr ""
+"Загрузите публичный ключ вашего SSL сертификата, чтобы корневой "
+"сертификат мог быть проверен, по умолчанию None"
+
+#: of telebot.TeleBot.set_webhook:17
+msgid ""
+"The maximum allowed number of simultaneous HTTPS connections to the "
+"webhook for update delivery, 1-100. Defaults to 40. Use lower values to "
+"limit the load on your bot's server, and higher values to increase your "
+"bot's throughput, defaults to None"
+msgstr ""
+"Максимально-допустимое количество одновременных HTTPS соединений для "
+"доставки апдейтов, 1-100. По умолчанию 40. Используйте меньшие значения "
+"для уменьшения нагрузки на ваш сервер и большие значения, чтобы увеличить"
+" пропускную способность вашего бота, по умолчанию None"
+
+#: of telebot.TeleBot.set_webhook:22
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used. Please note that this parameter doesn't affect "
+"updates created before the call to the setWebhook, so unwanted updates "
+"may be received for a short period of time. Defaults to None"
+msgstr ""
+"Список видов апдейтов, которые вы хотите получать, в формате JSON. "
+"Например, укажите [“message”, “edited_channel_post”, “callback_query”], "
+"чтобы получать апдейты только этих видов. Полный список доступных видов "
+"апдейтов - util.update_types. Укажите пустой список, чтобы получать все "
+"апдейты, кроме chat_member (по умолчанию). Если не задан, будет "
+"использована последняя настройка. Пожалуйста учтите, чтобы этот параметр "
+"не влияет на апдейты, отправленные до вызова setWebhooks, поэтому "
+"нежелательные апдейты могут быть получены в течение короткого периода "
+"времени. По умолчанию None"
+
+#: of telebot.TeleBot.set_webhook:22
+msgid ""
+"A JSON-serialized list of the update types you want your bot to receive. "
+"For example, specify [“message”, “edited_channel_post”, “callback_query”]"
+" to only receive updates of these types. See Update for a complete list "
+"of available update types. Specify an empty list to receive all update "
+"types except chat_member (default). If not specified, the previous "
+"setting will be used."
+msgstr ""
+"Список видов апдейтов, которые вы хотите получать, в формате JSON. "
+"Например, укажите [“message”, “edited_channel_post”, “callback_query”], "
+"чтобы получать апдейты только этих видов. Полный список доступных видов "
+"апдейтов - util.update_types. Укажите пустой список, чтобы получать все "
+"апдейты, кроме chat_member (по умолчанию). Если не задан, будет "
+"использована последняя настройка."
+
+#: of telebot.TeleBot.set_webhook:27
+msgid ""
+"Please note that this parameter doesn't affect updates created before the"
+" call to the setWebhook, so unwanted updates may be received for a short "
+"period of time. Defaults to None"
+msgstr ""
+"Пожалуйста учтите, чтобы этот параметр не влияет на апдейты, отправленные"
+" до вызова setWebhooks, поэтому нежелательные апдейты могут быть получены"
+" в течение короткого периода времени. По умолчанию None"
+
+#: of telebot.TeleBot.set_webhook:42
+msgid ""
+"A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” "
+"in every webhook request, 1-256 characters. Only characters A-Z, a-z, "
+"0-9, _ and - are allowed. The header is useful to ensure that the request"
+" comes from a webhook set by you. Defaults to None"
+msgstr ""
+"Секретный токен для отправки в хедере “X-Telegram-Bot-Api-Secret-Token” в"
+" каждом запросе с апдейтом, 1-256 символов. Разрешены только символы A-Z,"
+" a-z, 0-9, _ и -. Хедер полезен для, того чтобы удостовериться, что "
+"запрос приходитс вебхука, установленного вами. По умолчанию None"
+
+#: of telebot.TeleBot.set_webhook:47
+msgid ":obj:`bool` if the request was successful."
+msgstr ":obj:`bool` если запрос был успешным."
+
+#: of telebot.TeleBot.setup_middleware:1
+msgid "Registers class-based middleware."
+msgstr "Регистрирует класс-middleware"
+
+#: of telebot.TeleBot.setup_middleware:3
+msgid "Subclass of :class:`telebot.handler_backends.BaseMiddleware`"
+msgstr "Наследник класса :class:`telebot.handler_backends.BaseMiddleware`"
+
+#: of telebot.TeleBot.shipping_query_handler:1
+msgid ""
+"Handles new incoming shipping query. Only for invoices with flexible "
+"price. As a parameter to the decorator function, it passes "
+":class:`telebot.types.ShippingQuery` object."
+msgstr ""
+"Обрабатывает shipping query. Только для инвойсов с гибкой ценой. В "
+"качестве параметра передаёт в декорируемую функцию объект "
+":class:`telebot.types.ShippingQuery`."
+
+#: of telebot.TeleBot.stop_bot:1
+msgid "Stops bot by stopping polling and closing the worker pool."
+msgstr "Останавливает работу бота и закрывает рабочий пул."
+
+#: of telebot.TeleBot.stop_message_live_location:1
+msgid ""
+"Use this method to stop updating a live location message before "
+"live_period expires. On success, if the message is not an inline message,"
+" the edited Message is returned, otherwise True is returned."
+msgstr ""
+"Используйте этот метод, чтобы остановить обновление live местоположения "
+"до истечения live_period. В случае успеха, если сообщение не является "
+"inline сообщением,возвращается измененное сообщение (Message), иначе "
+"возвращается True."
+
+#: of telebot.TeleBot.stop_message_live_location:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#stopmessagelivelocation"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#stopmessagelivelocation"
+
+#: of telebot.TeleBot.stop_message_live_location:9
+msgid ""
+"Required if inline_message_id is not specified. Identifier of the message"
+" with live location to stop"
+msgstr ""
+"Обязательный, если не указан inline_message_id. id сообщения live "
+"местоположением, которое нужно остановить"
+
+#: of telebot.TeleBot.stop_message_live_location:12
+msgid ""
+"Required if chat_id and message_id are not specified. Identifier of the "
+"inline message with live location to stop"
+msgstr ""
+"Обязательный, если не указаны chat_id и message_id. id inline сообщения с"
+" live местоположением, которое нужно остановить"
+
+#: of telebot.TeleBot.stop_message_live_location:22
+msgid ""
+"On success, if the message is not an inline message, the edited Message "
+"is returned, otherwise True is returned."
+msgstr ""
+"В случае успеха, если сообщение не является inline сообщением, "
+"возвращается измененное сообщение (Message), иначе возвращается True."
+
+#: of telebot.TeleBot.stop_poll:1
+msgid ""
+"Use this method to stop a poll which was sent by the bot. On success, the"
+" stopped Poll is returned."
+msgstr ""
+"Используйте этот метод, чтобы завершить опрос, отправленный ботом. В "
+"случае успеха возвращается завершенный опрос (Poll)."
+
+#: of telebot.TeleBot.stop_poll:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#stoppoll"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#stoppoll"
+
+#: of telebot.TeleBot.stop_poll:8
+msgid "Identifier of the original message with the poll"
+msgstr "id сообщения с опросом"
+
+#: of telebot.TeleBot.stop_poll:11
+msgid "A JSON-serialized object for a new message markup."
+msgstr "JSON-сериализованный объект новой inline клавиатуры."
+
+#: of telebot.TeleBot.stop_poll:14
+msgid "On success, the stopped Poll is returned."
+msgstr "В случае успеха возвращается завершенный опрос (Poll)."
+
+#: of telebot.TeleBot.stop_poll:15
+msgid ":obj:`types.Poll`"
+msgstr ""
+
+#: of telebot.TeleBot.stop_polling:1
+msgid "Stops polling."
+msgstr "Останавливает поллинг."
+
+#: of telebot.TeleBot.stop_polling:3
+msgid "Does not accept any arguments."
+msgstr "Не принимает никаких аргументов."
+
+#: of telebot.TeleBot.unban_chat_member:1
+msgid ""
+"Use this method to unban a previously kicked user in a supergroup or "
+"channel. The user will not return to the group or channel automatically, "
+"but will be able to join via link, etc. The bot must be an administrator "
+"for this to work. By default, this method guarantees that after the call "
+"the user is not a member of the chat, but will be able to join it. So if "
+"the user is a member of the chat they will also be removed from the chat."
+" If you don't want this, use the parameter only_if_banned."
+msgstr ""
+"Используйте этот метод, чтобы разбанить ранее кикнутого пользователя в "
+"супергруппе или канале. Пользовать не вернется в группу или канал "
+"автоматически, но сможет присоединиться с помощью ссылки и т.д. Бот "
+"должен быть администратором. По умолчанию, этот метод гарантирует, что "
+"после вызова, пользователь не является участником чата, но может "
+"присоединиться. Поэтому если пользовать является участником чата, он "
+"будет кикнут, но не забанен. Если вы хотите изменить это поведение, "
+"используйте параметр only_if_banned."
+
+#: of telebot.TeleBot.unban_chat_member:7
+msgid "Telegram documentation: https://core.telegram.org/bots/api#unbanchatmember"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#unbanchatmember"
+
+#: of telebot.TeleBot.unban_chat_member:9
+msgid ""
+"Unique identifier for the target group or username of the target "
+"supergroup or channel (in the format @username)"
+msgstr ""
+"Уникальный id группы или username супергруппы или канала (в формате "
+"@username)"
+
+#: of telebot.TeleBot.unban_chat_member:16
+msgid "Do nothing if the user is not banned"
+msgstr "Ничего не делать, если пользователь не забанен"
+
+#: of telebot.TeleBot.unban_chat_sender_chat:1
+msgid ""
+"Use this method to unban a previously banned channel chat in a supergroup"
+" or channel. The bot must be an administrator for this to work and must "
+"have the appropriate administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы разбанить ране забаненный канал в "
+"супергруппе или канала. Бот должен быть администратором и иметь "
+"соответствующие права администратора. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.unban_chat_sender_chat:6
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unbanchatsenderchat"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#unbanchatsenderchat"
+
+#: of telebot.TeleBot.unban_chat_sender_chat:11
+msgid "Unique identifier of the target sender chat."
+msgstr "Уникальный id чата."
+
+#: of telebot.TeleBot.unhide_general_forum_topic:1
+msgid ""
+"Use this method to unhide the 'General' topic in a forum supergroup chat."
+" The bot must be an administrator in the chat for this to work and must "
+"have can_manage_topics administrator rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, чтобы сделать топик 'General' видимым в "
+"супергруппе с топиками. Бот должен быть администратором чата и иметь "
+"права администратора can_manage_topics. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.unhide_general_forum_topic:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unhidegeneralforumtopic"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#unhidegeneralforumtopic"
+
+#: of telebot.TeleBot.unpin_all_chat_messages:1
+msgid ""
+"Use this method to unpin a all pinned messages in a supergroup chat. The "
+"bot must be an administrator in the chat for this to work and must have "
+"the appropriate admin rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, что открепить все закрепленные сообщения в "
+"супергруппе. Бот должен быть администратором чата и иметь соответствующие"
+" права администратора. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.unpin_all_chat_messages:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinallchatmessages"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#unpinallchatmessages"
+
+#: of telebot.TeleBot.unpin_all_forum_topic_messages:1
+msgid ""
+"Use this method to clear the list of pinned messages in a forum topic. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the can_pin_messages administrator right in the supergroup. Returns "
+"True on success."
+msgstr ""
+"Используйте этот метод, что открепить все закрепленные сообщения в "
+"топике. Бот должен быть администратором чата и иметь права администратора"
+" can_pin_messages в супергруппе. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.unpin_all_forum_topic_messages:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinallforumtopicmessages"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#unpinallforumtopicmessages"
+
+#: of telebot.TeleBot.unpin_all_forum_topic_messages:10
+msgid "Identifier of the topic"
+msgstr "id топика"
+
+#: of telebot.TeleBot.unpin_all_general_forum_topic_messages:1
+#, fuzzy
+msgid ""
+"Use this method to clear the list of pinned messages in a General forum "
+"topic. The bot must be an administrator in the chat for this to work and "
+"must have the can_pin_messages administrator right in the supergroup. "
+"Returns True on success."
+msgstr ""
+"Используйте этот метод, что открепить все закрепленные сообщения в "
+"топике. Бот должен быть администратором чата и иметь права администратора"
+" can_pin_messages в супергруппе. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.unpin_all_general_forum_topic_messages:6
+#, fuzzy
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinAllGeneralForumTopicMessages"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#unpinallforumtopicmessages"
+
+#: of telebot.TeleBot.unpin_all_general_forum_topic_messages:8
+#, fuzzy
+msgid "Unique identifier for the target chat or username of chat"
+msgstr "Уникальный id чата или username канала"
+
+#: of telebot.TeleBot.unpin_chat_message:1
+msgid ""
+"Use this method to unpin specific pinned message in a supergroup chat. "
+"The bot must be an administrator in the chat for this to work and must "
+"have the appropriate admin rights. Returns True on success."
+msgstr ""
+"Используйте этот метод, что открепить закрепленное сообщение в "
+"супергруппе. Бот должен быть администратором чата и иметь соответствующие"
+" права администратора. Возвращает True в случае успеха."
+
+#: of telebot.TeleBot.unpin_chat_message:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#unpinchatmessage"
+msgstr "Документация Telegram: https://core.telegram.org/bots/api#unpinchatmessage"
+
+#: of telebot.TeleBot.unpin_chat_message:11
+msgid "Int: Identifier of a message to unpin"
+msgstr "Int: id сообщения, которое нужно открепить"
+
+#: of telebot.TeleBot.upload_sticker_file:1
+msgid ""
+"Use this method to upload a .png file with a sticker for later use in "
+"createNewStickerSet and addStickerToSet methods (can be used multiple "
+"times). Returns the uploaded File on success."
+msgstr ""
+"Используйте этот метод, чтобы загрузить .png стикер, чтобы позже "
+"использовать в методах createNewStickerSet и addStickerToSet (может быть "
+"использован несколько раз). Возвращает загруженный файл (File) в случае "
+"успеха."
+
+#: of telebot.TeleBot.upload_sticker_file:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#uploadstickerfile"
+msgstr ""
+"Документация Telegram: "
+"https://core.telegram.org/bots/api#uploadstickerfile"
+
+#: of telebot.TeleBot.upload_sticker_file:6
+msgid "User identifier of sticker set owner"
+msgstr "id пользователя, создавшего стикерпак"
+
+#: of telebot.TeleBot.upload_sticker_file:9
+#, fuzzy
+msgid ""
+"DEPRECATED: PNG image with the sticker, must be up to 512 kilobytes in "
+"size, dimensions must not exceed 512px, and either width or height must "
+"be exactly 512px."
+msgstr ""
+"PNG изображение стикера, должно весить не более 512 kB, измерения не "
+"должны превышать 512px и либо ширина, либо высота должна быть ровно "
+"512px."
+
+#: of telebot.TeleBot.upload_sticker_file:13
+msgid ""
+"A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See "
+"https://core.telegram.org/stickers for technical requirements. More "
+"information on Sending Files »"
+msgstr ""
+
+#: of telebot.TeleBot.upload_sticker_file:17
+msgid "One of \"static\", \"animated\", \"video\"."
+msgstr ""
+
+#: of telebot.TeleBot.upload_sticker_file:20
+msgid "On success, the sent file is returned."
+msgstr "В случае успеха возвращается отправленный файл."
+
+#: of telebot.TeleBot.user:1
+msgid ""
+"The User object representing this bot. Equivalent to bot.get_me() but the"
+" result is cached so only one API call is needed."
+msgstr ""
+"Объект User, описывающий бота. Эквивалент bot.get_me(), но результат "
+"кэшируется, поэтому нужен всего один запрос к API."
+
+#: of telebot.TeleBot.user:4
+msgid "Bot's info."
+msgstr "Информация о боте"
+
+#: of telebot.TeleBot.user:5
+msgid ":class:`telebot.types.User`"
+msgstr ""
+
+#: ../../source/sync_version/index.rst:17
+msgid "custom_filters file"
+msgstr "Файл custom_filters"
+
+#: of telebot.custom_filters.AdvancedCustomFilter:1
+#: telebot.custom_filters.SimpleCustomFilter:1
+msgid "Bases: :py:class:`abc.ABC`"
+msgstr "Базовые классы: :py:class:`abc.ABC`"
+
+#: of telebot.custom_filters.AdvancedCustomFilter:1
+msgid ""
+"Advanced Custom Filter base class. Create child class with check() "
+"method. Accepts two parameters, returns bool: True - filter passed, False"
+" - filter failed. message: Message class text: Filter value given in "
+"handler"
+msgstr ""
+"Базовый класс Advanced Custom Filter. Создайте класс наследник с методом "
+"check(). Принимает два параметра, возвращает bool: True - фильтр пройден,"
+" False - фильтр не пройден. message: класс Message text: значение "
+"фильтра, полученное в хендлере"
+
+#: of telebot.custom_filters.AdvancedCustomFilter:7
+#: telebot.custom_filters.SimpleCustomFilter:5
+msgid "Child classes should have .key property."
+msgstr "Классы наследники должны иметь статический атрибут (property) .key"
+
+#: of telebot.custom_filters.AdvancedCustomFilter:9
+msgid "Example on creating an advanced custom filter."
+msgstr "Пример создания advanced custom filter."
+
+#: of telebot.custom_filters.AdvancedCustomFilter.check:1
+#: telebot.custom_filters.SimpleCustomFilter.check:1
+msgid "Perform a check."
+msgstr "Выполнить проверку."
+
+#: of telebot.custom_filters.ChatFilter:1
+#: telebot.custom_filters.LanguageFilter:1 telebot.custom_filters.StateFilter:1
+#: telebot.custom_filters.TextContainsFilter:1
+#: telebot.custom_filters.TextMatchFilter:1
+#: telebot.custom_filters.TextStartsFilter:1
+msgid "Bases: :py:class:`telebot.custom_filters.AdvancedCustomFilter`"
+msgstr "Базовые классы: :py:class:`telebot.custom_filters.AdvancedCustomFilter`"
+
+#: of telebot.custom_filters.ChatFilter:1
+msgid "Check whether chat_id corresponds to given chat_id."
+msgstr "Проверяет, является ли chat_id заданным."
+
+#: of telebot.custom_filters.ChatFilter:3
+#: telebot.custom_filters.ForwardFilter:3
+#: telebot.custom_filters.IsAdminFilter:3
+#: telebot.custom_filters.IsDigitFilter:3
+#: telebot.custom_filters.IsReplyFilter:3
+#: telebot.custom_filters.LanguageFilter:3 telebot.custom_filters.StateFilter:3
+#: telebot.custom_filters.TextContainsFilter:5
+#: telebot.custom_filters.TextMatchFilter:3
+#: telebot.custom_filters.TextStartsFilter:3
+msgid "Example on using this filter:"
+msgstr "Пример использования этого фильтра:"
+
+#: of telebot.custom_filters.ForwardFilter:1
+#: telebot.custom_filters.IsAdminFilter:1
+#: telebot.custom_filters.IsDigitFilter:1
+#: telebot.custom_filters.IsReplyFilter:1
+msgid "Bases: :py:class:`telebot.custom_filters.SimpleCustomFilter`"
+msgstr "Базовые классы: :py:class:`telebot.custom_filters.SimpleCustomFilter`"
+
+#: of telebot.custom_filters.ForwardFilter:1
+msgid "Check whether message was forwarded from channel or group."
+msgstr "Проверяет, является ли сообщение пересланным из канала или группы."
+
+#: of telebot.custom_filters.IsAdminFilter:1
+msgid "Check whether the user is administrator / owner of the chat."
+msgstr "Проверяет, является ли пользователь администратором / владельцем чата."
+
+#: of telebot.custom_filters.IsDigitFilter:1
+msgid "Filter to check whether the string is made up of only digits."
+msgstr "Фильтр для проверки, состоит ли строка только из цифр."
+
+#: of telebot.custom_filters.IsReplyFilter:1
+msgid "Check whether message is a reply."
+msgstr "Проверяет, является ли сообщение ответом (reply)."
+
+#: of telebot.custom_filters.LanguageFilter:1
+msgid "Check users language_code."
+msgstr "Проверяет language_code пользователя."
+
+#: of telebot.custom_filters.SimpleCustomFilter:1
+msgid ""
+"Simple Custom Filter base class. Create child class with check() method. "
+"Accepts only message, returns bool value, that is compared with given in "
+"handler."
+msgstr ""
+"Базовый класс Simple Custom Filter. Создайте класс наследник с методом "
+"check(). Принимает только сообщение, возвращает bool, который "
+"сравнивается с заданным в хендлере."
+
+#: of telebot.custom_filters.SimpleCustomFilter:7
+msgid "Example on creating a simple custom filter."
+msgstr "Пример создания simple custom filter."
+
+#: of telebot.custom_filters.StateFilter:1
+msgid "Filter to check state."
+msgstr "Фильтр для проверки состояния (стейта)."
+
+#: of telebot.custom_filters.TextContainsFilter:1
+msgid "Filter to check Text message. key: text"
+msgstr "Фильтр для проверки текста сообщения. key: text"
+
+#: of telebot.custom_filters.TextFilter:1
+msgid ""
+"Advanced text filter to check (types.Message, types.CallbackQuery, "
+"types.InlineQuery, types.Poll)"
+msgstr ""
+"Advanced текстовый фильтр для проверки (types.Message, "
+"types.CallbackQuery, types.InlineQuery, types.Poll)"
+
+#: of telebot.custom_filters.TextFilter:3
+msgid "example of usage is in examples/custom_filters/advanced_text_filter.py"
+msgstr "пример использования в examples/custom_filters/advanced_text_filter.py"
+
+#: of telebot.custom_filters.TextFilter:5
+msgid "string, True if object's text is equal to passed string"
+msgstr "строка, True если текст объекта идентичен заданной строке"
+
+#: of telebot.custom_filters.TextFilter:8
+msgid "list[str] or tuple[str], True if any string element of iterable is in text"
+msgstr ""
+"list[str] или tuple[str], True если хотя бы один из элементов есть в "
+"тексте"
+
+#: of telebot.custom_filters.TextFilter:11 telebot.custom_filters.TextFilter:14
+msgid "string, True if object's text starts with passed string"
+msgstr "string, True если текст объекта начинается с заданной строки"
+
+#: of telebot.custom_filters.TextFilter:17
+msgid "bool (default False), case insensitive"
+msgstr "bool (по умолчанию False), независимый от регистра"
+
+#: of telebot.custom_filters.TextFilter:20
+msgid "if incorrect value for a parameter was supplied"
+msgstr "если было задано некорректное значение параметра"
+
+#: of telebot.custom_filters.TextMatchFilter:1
+msgid "Filter to check Text message."
+msgstr "Фильтр для проверки текста сообщения."
+
+#: of telebot.custom_filters.TextStartsFilter:1
+msgid "Filter to check whether message starts with some text."
+msgstr "Фильтр для проверки, начинается ли сообщение с заданного текста."
+
+#: ../../source/sync_version/index.rst:25
+msgid "handler_backends file"
+msgstr "Файл handler_backends"
+
+#: of telebot.handler_backends.BaseMiddleware:1
+msgid ""
+"Base class for middleware. Your middlewares should be inherited from this"
+" class."
+msgstr ""
+"Базовый класс для middleware. Ваши middleware должны быть унаследованы от"
+" этого класса."
+
+#: of telebot.handler_backends.BaseMiddleware:4
+msgid ""
+"Set update_sensitive=True if you want to get different updates on "
+"different functions. For example, if you want to handle pre_process for "
+"message update, then you will have to create pre_process_message "
+"function, and so on. Same applies to post_process."
+msgstr ""
+"Задайте update_sensitive=True если хотите получать разные апдейты в "
+"разных функциях. Например, если вы хотите обрабатывать pre_process для "
+"апдейтов вида message, вам нужно будет создать функцию "
+"pre_process_message и т.д. Аналогично для post_process."
+
+#: of telebot.handler_backends.BaseMiddleware:10
+msgid ""
+"If you want to use middleware, you have to set use_class_middlewares=True"
+" in your TeleBot instance."
+msgstr ""
+"Если вы хотите использовать middleware, вам нужно задать "
+"use_class_middlewares=True в экземпляре класса TeleBot."
+
+#: of telebot.handler_backends.BaseMiddleware:13
+msgid "Example of class-based middlewares."
+msgstr "Пример класса middleware."
+
+#: of telebot.handler_backends.CancelUpdate:1
+msgid ""
+"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."
+msgstr ""
+"Класс для отмены апдейтов. Просто верните экземпляр этого класса в "
+"middleware, чтобы пропустить апдейт. Апдейт пропустит хендлер и "
+"исполнение post_process в middleware."
+
+#: of telebot.handler_backends.ContinueHandling:1
+msgid ""
+"Class for continue updates in handlers. Just return instance of this "
+"class in handlers to continue process."
+msgstr ""
+"Класс для продолжения обработки апдейта в хендлерах. Просто верните "
+"экземпляр этого класса в хендлерах, чтобы продолжить обработку."
+
+#: of telebot.handler_backends.ContinueHandling:5
+msgid "Example of using ContinueHandling"
+msgstr "Пример использования ContinueHandling"
+
+#: of telebot.handler_backends.SkipHandler:1
+msgid ""
+"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."
+msgstr ""
+"Класс для пропуска хендлеров. Просто верните экземпляр этого класса в "
+"middleware, чтобы пропустить хендлер. Апдейт попадёт в post_process, но "
+"пропустит исполнение хендлера."
+
+#: of telebot.handler_backends.State:1
+msgid "Class representing a state."
+msgstr "Класс, представляющий состояние (стейт)."
+
+#: of telebot.handler_backends.StatesGroup:1
+msgid "Class representing common states."
+msgstr "Класс, представляющий похожие состояния (стейты)."
+
+#: ../../source/sync_version/index.rst:34
+msgid "Extensions"
+msgstr "Расширения"
+
+#: of telebot.ext.sync.webhooks:1
+msgid ""
+"This file is used by TeleBot.run_webhooks() function. Fastapi is required"
+" to run this script."
+msgstr ""
+"Этот файл используется функцией TeleBot.run_webhooks(). Для запуска этого"
+" скрипта требуется Fastapi."
+
+#: of telebot.ext.sync.webhooks.SyncWebhookListener.run_app:1
+msgid ""
+"Run app with the given parameters to init. Not supposed to be used "
+"manually by user."
+msgstr ""
+"Запустить приложение с заданными параметрами инициализации. Не "
+"предназначено для использования пользователем."
+
+#~ msgid "New name of the topic, 1-128 characters"
+#~ msgstr "Новое название топика, 1-128 символов"
+
+#~ msgid ""
+#~ "New custom emoji for the topic "
+#~ "icon. Must be an emoji of type "
+#~ "“tgs” and must be exactly 1 "
+#~ "character long"
+#~ msgstr ""
+#~ "Новый кастомный эмодзи для иконки "
+#~ "топика. Должно быть “tgs” эмодзи, длиной"
+#~ " ровно в 1 символ"
+
+#~ msgid "The chat for which we want to handle new message."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Use this method to add a new "
+#~ "sticker to a set created by the"
+#~ " bot. It's required to pass "
+#~ "`png_sticker` or `tgs_sticker`. Returns True"
+#~ " on success."
+#~ msgstr ""
+#~ "Используйте этот метод, чтобы добавить "
+#~ "новый стикер в стикерпак, созданный "
+#~ "ботом. Необходимо передать либо `png_sticker`,"
+#~ " либо `tgs_sticker`, либо `webm_sticker`. "
+#~ "Возвращает True в случае успешного "
+#~ "добавления."
+
+#~ msgid "Disables link previews for links in this message"
+#~ msgstr "Отключает превью ссылок в сообщении"
+
+#~ msgid "Deprecated, use non_stop. Old typo, kept for backward compatibility."
+#~ msgstr ""
+#~ "Устарело, используйте non_stop. Старая "
+#~ "опечатка, оставлено для обратной совместимости"
+
+#~ msgid "Deprecated. Use thumbnail instead"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Pass True, if the message should "
+#~ "be sent even if one of the "
+#~ "specified replied-to messages is not "
+#~ "found."
+#~ msgstr ""
+#~ "Передайте True, если сообщение должно "
+#~ "быть отправлено даже если одно из "
+#~ "сообщений, на которые нужно ответить, не"
+#~ " найдено."
+
+#~ msgid "Protects the contents of the sent message from forwarding"
+#~ msgstr "Защищает содержимое отправленного сообщения от пересылки"
+
+#~ msgid ""
+#~ "Pass True, if content of the "
+#~ "message needs to be protected from "
+#~ "being viewed by the bot."
+#~ msgstr ""
+#~ "Передайте True, если содержимое сообщение "
+#~ "должно быть защищено от просмотра ботом."
+
+#~ msgid ""
+#~ "If True, the message content will "
+#~ "be hidden for all users except for"
+#~ " the target user"
+#~ msgstr ""
+#~ "Если True, содержимое сообщения будет "
+#~ "скрыто от всех пользователей, кроме "
+#~ "заданного"
+
+#~ msgid ""
+#~ "Pass True, if the poll allows "
+#~ "multiple options to be voted "
+#~ "simultaneously."
+#~ msgstr ""
+#~ "Передайте True, если опрос позволяет "
+#~ "выбрать несколько вариантов одновременно."
+
+#~ msgid "param chat_id"
+#~ msgstr ""
+
+#~ msgid "type chat_id"
+#~ msgstr ""
+
+#~ msgid ":obj:`int` or :obj:`str`"
+#~ msgstr ""
+
+#~ msgid "param data"
+#~ msgstr ""
+
+#~ msgid "type data"
+#~ msgstr "тип"
+
+#~ msgid ":obj:`str` or :class:`telebot.types.InputFile`"
+#~ msgstr "Список объектов :class:`telebot.types.Update`."
+
+#~ msgid "param duration"
+#~ msgstr ""
+
+#~ msgid "type duration"
+#~ msgstr ""
+
+#~ msgid "param length"
+#~ msgstr ""
+
+#~ msgid "type length"
+#~ msgstr ""
+
+#~ msgid "param reply_to_message_id"
+#~ msgstr ""
+
+#~ msgid "type reply_to_message_id"
+#~ msgstr ""
+
+#~ msgid "param reply_markup"
+#~ msgstr ""
+
+#~ msgid "type reply_markup"
+#~ msgstr ""
+
+#~ msgid ""
+#~ ":class:`telebot.types.InlineKeyboardMarkup` or "
+#~ ":class:`telebot.types.ReplyKeyboardMarkup` or "
+#~ ":class:`telebot.types.ReplyKeyboardRemove` or "
+#~ ":class:`telebot.types.ForceReply`"
+#~ msgstr ""
+
+#~ msgid "param disable_notification"
+#~ msgstr "отключить уведомление"
+
+#~ msgid "type disable_notification"
+#~ msgstr "отключить уведомление"
+
+#~ msgid "param timeout"
+#~ msgstr ""
+
+#~ msgid "type timeout"
+#~ msgstr ""
+
+#~ msgid "param thumbnail"
+#~ msgstr ""
+
+#~ msgid "type thumbnail"
+#~ msgstr ""
+
+#~ msgid "param allow_sending_without_reply"
+#~ msgstr "Глобальное значение allow_sending_without_reply, по умолчанию None"
+
+#~ msgid "type allow_sending_without_reply"
+#~ msgstr "Глобальное значение allow_sending_without_reply, по умолчанию None"
+
+#~ msgid "param protect_content"
+#~ msgstr ""
+
+#~ msgid "type protect_content"
+#~ msgstr ""
+
+#~ msgid "param message_thread_id"
+#~ msgstr ""
+
+#~ msgid "type message_thread_id"
+#~ msgstr ""
+
+#~ msgid "param thumb"
+#~ msgstr ""
+
diff --git a/docs/source/locales/ru/LC_MESSAGES/types.po b/docs/source/locales/ru/LC_MESSAGES/types.po
new file mode 100644
index 000000000..1dfef7706
--- /dev/null
+++ b/docs/source/locales/ru/LC_MESSAGES/types.po
@@ -0,0 +1,7240 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-01-05 22:16+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../source/types.rst:3
+msgid "Types of API"
+msgstr ""
+
+#: of telebot.types.Animation:1 telebot.types.Audio:1
+#: telebot.types.BotDescription:1 telebot.types.BotName:1
+#: telebot.types.BotShortDescription:1 telebot.types.CallbackQuery:1
+#: telebot.types.Chat:1 telebot.types.ChatBoost:1
+#: telebot.types.ChatBoostRemoved:1 telebot.types.ChatBoostSource:1
+#: telebot.types.ChatBoostUpdated:1 telebot.types.ChatJoinRequest:1
+#: telebot.types.ChatMember:1 telebot.types.ChatMemberUpdated:1
+#: telebot.types.ChatPhoto:1 telebot.types.ChatShared:1
+#: telebot.types.ChosenInlineResult:1 telebot.types.Contact:1
+#: telebot.types.Document:1 telebot.types.ExternalReplyInfo:1
+#: telebot.types.File:1 telebot.types.ForumTopic:1
+#: telebot.types.ForumTopicClosed:1 telebot.types.ForumTopicCreated:1
+#: telebot.types.ForumTopicEdited:1 telebot.types.ForumTopicReopened:1
+#: telebot.types.Game:1 telebot.types.GameHighScore:1
+#: telebot.types.GeneralForumTopicHidden:1
+#: telebot.types.GeneralForumTopicUnhidden:1 telebot.types.Giveaway:1
+#: telebot.types.GiveawayCompleted:1 telebot.types.GiveawayCreated:1
+#: telebot.types.GiveawayWinners:1 telebot.types.InaccessibleMessage:1
+#: telebot.types.InlineQuery:1 telebot.types.Invoice:1 telebot.types.Message:1
+#: telebot.types.MessageAutoDeleteTimerChanged:1 telebot.types.MessageID:1
+#: telebot.types.MessageOrigin:1 telebot.types.MessageReactionCountUpdated:1
+#: telebot.types.MessageReactionUpdated:1 telebot.types.OrderInfo:1
+#: telebot.types.PhotoSize:1 telebot.types.Poll:1 telebot.types.PollOption:1
+#: telebot.types.PreCheckoutQuery:1 telebot.types.ProximityAlertTriggered:1
+#: telebot.types.ReactionCount:1 telebot.types.ShippingAddress:1
+#: telebot.types.ShippingQuery:1 telebot.types.Sticker:1
+#: telebot.types.StickerSet:1 telebot.types.Story:1
+#: telebot.types.SuccessfulPayment:1 telebot.types.TextQuote:1
+#: telebot.types.Update:1 telebot.types.UserChatBoosts:1
+#: telebot.types.UserProfilePhotos:1 telebot.types.UsersShared:1
+#: telebot.types.Venue:1 telebot.types.Video:1 telebot.types.VideoChatEnded:1
+#: telebot.types.VideoChatParticipantsInvited:1
+#: telebot.types.VideoChatScheduled:1 telebot.types.VideoChatStarted:1
+#: telebot.types.VideoNote:1 telebot.types.Voice:1 telebot.types.WebhookInfo:1
+#: telebot.types.WriteAccessAllowed:1
+msgid "Bases: :py:class:`telebot.types.JsonDeserializable`"
+msgstr ""
+
+#: of telebot.types.Animation:1
+msgid ""
+"This object represents an animation file (GIF or H.264/MPEG-4 AVC video "
+"without sound)."
+msgstr ""
+
+#: of telebot.types.Animation:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#animation"
+msgstr ""
+
+#: of telebot.types.Animation telebot.types.Audio telebot.types.BotCommand
+#: telebot.types.BotCommandScopeAllChatAdministrators
+#: telebot.types.BotCommandScopeAllGroupChats
+#: telebot.types.BotCommandScopeAllPrivateChats
+#: telebot.types.BotCommandScopeChat
+#: telebot.types.BotCommandScopeChatAdministrators
+#: telebot.types.BotCommandScopeChatMember telebot.types.BotCommandScopeDefault
+#: telebot.types.BotDescription telebot.types.BotName
+#: telebot.types.BotShortDescription telebot.types.CallbackQuery
+#: telebot.types.Chat telebot.types.ChatAdministratorRights
+#: telebot.types.ChatBoost telebot.types.ChatBoostRemoved
+#: telebot.types.ChatBoostSource telebot.types.ChatBoostSourceGiftCode
+#: telebot.types.ChatBoostSourceGiveaway telebot.types.ChatBoostSourcePremium
+#: telebot.types.ChatBoostUpdated telebot.types.ChatInviteLink
+#: telebot.types.ChatJoinRequest telebot.types.ChatLocation
+#: telebot.types.ChatMemberAdministrator telebot.types.ChatMemberBanned
+#: telebot.types.ChatMemberLeft telebot.types.ChatMemberMember
+#: telebot.types.ChatMemberOwner telebot.types.ChatMemberRestricted
+#: telebot.types.ChatMemberUpdated telebot.types.ChatPermissions
+#: telebot.types.ChatPhoto telebot.types.ChatShared
+#: telebot.types.ChosenInlineResult telebot.types.Contact telebot.types.Dice
+#: telebot.types.Document telebot.types.ExternalReplyInfo telebot.types.File
+#: telebot.types.ForceReply telebot.types.ForumTopic
+#: telebot.types.ForumTopicCreated telebot.types.ForumTopicEdited
+#: telebot.types.Game telebot.types.GameHighScore telebot.types.Giveaway
+#: telebot.types.GiveawayCompleted telebot.types.GiveawayWinners
+#: telebot.types.InaccessibleMessage telebot.types.InlineKeyboardButton
+#: telebot.types.InlineKeyboardMarkup telebot.types.InlineKeyboardMarkup.add
+#: telebot.types.InlineKeyboardMarkup.row telebot.types.InlineQuery
+#: telebot.types.InlineQueryResultArticle telebot.types.InlineQueryResultAudio
+#: telebot.types.InlineQueryResultCachedAudio
+#: telebot.types.InlineQueryResultCachedDocument
+#: telebot.types.InlineQueryResultCachedGif
+#: telebot.types.InlineQueryResultCachedMpeg4Gif
+#: telebot.types.InlineQueryResultCachedPhoto
+#: telebot.types.InlineQueryResultCachedSticker
+#: telebot.types.InlineQueryResultCachedVideo
+#: telebot.types.InlineQueryResultCachedVoice
+#: telebot.types.InlineQueryResultContact
+#: telebot.types.InlineQueryResultDocument telebot.types.InlineQueryResultGame
+#: telebot.types.InlineQueryResultGif telebot.types.InlineQueryResultLocation
+#: telebot.types.InlineQueryResultMpeg4Gif telebot.types.InlineQueryResultPhoto
+#: telebot.types.InlineQueryResultVenue telebot.types.InlineQueryResultVideo
+#: telebot.types.InlineQueryResultVoice telebot.types.InlineQueryResultsButton
+#: telebot.types.InputContactMessageContent telebot.types.InputFile
+#: telebot.types.InputInvoiceMessageContent
+#: telebot.types.InputLocationMessageContent telebot.types.InputMediaAnimation
+#: telebot.types.InputMediaAudio telebot.types.InputMediaDocument
+#: telebot.types.InputMediaPhoto telebot.types.InputMediaVideo
+#: telebot.types.InputSticker telebot.types.InputTextMessageContent
+#: telebot.types.InputVenueMessageContent telebot.types.Invoice
+#: telebot.types.KeyboardButton telebot.types.KeyboardButtonPollType
+#: telebot.types.KeyboardButtonRequestChat
+#: telebot.types.KeyboardButtonRequestUsers telebot.types.LabeledPrice
+#: telebot.types.LinkPreviewOptions telebot.types.Location
+#: telebot.types.LoginUrl telebot.types.MaskPosition
+#: telebot.types.MenuButtonCommands telebot.types.MenuButtonDefault
+#: telebot.types.MenuButtonWebApp telebot.types.Message
+#: telebot.types.MessageAutoDeleteTimerChanged telebot.types.MessageEntity
+#: telebot.types.MessageID telebot.types.MessageOrigin
+#: telebot.types.MessageOriginChannel telebot.types.MessageOriginChat
+#: telebot.types.MessageOriginHiddenUser telebot.types.MessageOriginUser
+#: telebot.types.MessageReactionCountUpdated
+#: telebot.types.MessageReactionUpdated telebot.types.OrderInfo
+#: telebot.types.PhotoSize telebot.types.Poll telebot.types.Poll.add
+#: telebot.types.PollAnswer telebot.types.PollOption
+#: telebot.types.PreCheckoutQuery telebot.types.ProximityAlertTriggered
+#: telebot.types.ReactionCount telebot.types.ReactionType
+#: telebot.types.ReactionTypeCustomEmoji telebot.types.ReactionTypeEmoji
+#: telebot.types.ReplyKeyboardMarkup telebot.types.ReplyKeyboardMarkup.add
+#: telebot.types.ReplyKeyboardMarkup.row telebot.types.ReplyKeyboardRemove
+#: telebot.types.ReplyParameters telebot.types.SentWebAppMessage
+#: telebot.types.ShippingAddress telebot.types.ShippingOption
+#: telebot.types.ShippingOption.add_price telebot.types.ShippingQuery
+#: telebot.types.Sticker telebot.types.StickerSet
+#: telebot.types.SuccessfulPayment telebot.types.SwitchInlineQueryChosenChat
+#: telebot.types.TextQuote telebot.types.Update telebot.types.User
+#: telebot.types.UserChatBoosts telebot.types.UserProfilePhotos
+#: telebot.types.UsersShared telebot.types.Venue telebot.types.Video
+#: telebot.types.VideoChatEnded telebot.types.VideoChatParticipantsInvited
+#: telebot.types.VideoChatScheduled telebot.types.VideoNote telebot.types.Voice
+#: telebot.types.WebAppData telebot.types.WebAppInfo telebot.types.WebhookInfo
+#: telebot.types.WriteAccessAllowed
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.types.Animation:5 telebot.types.Audio:5 telebot.types.Document:5
+#: telebot.types.File:5 telebot.types.PhotoSize:5 telebot.types.Sticker:5
+#: telebot.types.Video:5 telebot.types.VideoNote:5 telebot.types.Voice:5
+msgid "Identifier for this file, which can be used to download or reuse the file"
+msgstr ""
+
+#: of telebot.types.Animation:8 telebot.types.Audio:8 telebot.types.Document:8
+#: telebot.types.File:8 telebot.types.PhotoSize:8 telebot.types.Sticker:8
+#: telebot.types.Video:8 telebot.types.VideoNote:8 telebot.types.Voice:8
+msgid ""
+"Unique identifier for this file, which is supposed to be the same over "
+"time and for different bots. Can't be used to download or reuse the file."
+msgstr ""
+
+#: of telebot.types.Animation:12 telebot.types.Video:12
+msgid "Video width as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:15 telebot.types.Video:15
+msgid "Video height as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:18 telebot.types.Video:18
+#: telebot.types.VideoNote:15
+msgid "Duration of the video in seconds as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:21
+msgid "Optional. Animation thumbnail as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:24
+msgid "Optional. Original animation filename as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:27 telebot.types.Audio:24
+#: telebot.types.Document:18 telebot.types.Video:27 telebot.types.Voice:15
+msgid "Optional. MIME type of the file as defined by sender"
+msgstr ""
+
+#: of telebot.types.Animation:30 telebot.types.Audio:27
+#: telebot.types.Document:21 telebot.types.File:12 telebot.types.Video:30
+#: telebot.types.Voice:18
+msgid ""
+"Optional. File size in bytes. It can be bigger than 2^31 and some "
+"programming languages may have difficulty/silent defects in interpreting "
+"it. But it has at most 52 significant bits, so a signed 64-bit integer or"
+" double-precision float type are safe for storing this value."
+msgstr ""
+
+#: of telebot.types.Animation telebot.types.Audio telebot.types.BotCommand
+#: telebot.types.BotCommandScope
+#: telebot.types.BotCommandScopeAllChatAdministrators
+#: telebot.types.BotCommandScopeAllGroupChats
+#: telebot.types.BotCommandScopeAllPrivateChats
+#: telebot.types.BotCommandScopeChat
+#: telebot.types.BotCommandScopeChatAdministrators
+#: telebot.types.BotCommandScopeChatMember telebot.types.BotCommandScopeDefault
+#: telebot.types.BotDescription telebot.types.BotName
+#: telebot.types.BotShortDescription telebot.types.CallbackQuery
+#: telebot.types.Chat telebot.types.ChatAdministratorRights
+#: telebot.types.ChatBoost telebot.types.ChatBoostRemoved
+#: telebot.types.ChatBoostSource telebot.types.ChatBoostSourceGiftCode
+#: telebot.types.ChatBoostSourceGiveaway telebot.types.ChatBoostSourcePremium
+#: telebot.types.ChatBoostUpdated telebot.types.ChatInviteLink
+#: telebot.types.ChatJoinRequest telebot.types.ChatLocation
+#: telebot.types.ChatMemberAdministrator telebot.types.ChatMemberBanned
+#: telebot.types.ChatMemberLeft telebot.types.ChatMemberMember
+#: telebot.types.ChatMemberOwner telebot.types.ChatMemberRestricted
+#: telebot.types.ChatMemberUpdated telebot.types.ChatMemberUpdated.difference
+#: telebot.types.ChatPermissions telebot.types.ChatPhoto
+#: telebot.types.ChatShared telebot.types.ChosenInlineResult
+#: telebot.types.Contact telebot.types.Dice telebot.types.Document
+#: telebot.types.ExternalReplyInfo telebot.types.File telebot.types.ForceReply
+#: telebot.types.ForumTopic telebot.types.ForumTopicCreated telebot.types.Game
+#: telebot.types.GameHighScore telebot.types.Giveaway
+#: telebot.types.GiveawayCompleted telebot.types.GiveawayWinners
+#: telebot.types.InaccessibleMessage telebot.types.InlineKeyboardButton
+#: telebot.types.InlineKeyboardMarkup telebot.types.InlineKeyboardMarkup.add
+#: telebot.types.InlineKeyboardMarkup.row telebot.types.InlineQuery
+#: telebot.types.InlineQueryResultArticle telebot.types.InlineQueryResultAudio
+#: telebot.types.InlineQueryResultCachedAudio
+#: telebot.types.InlineQueryResultCachedDocument
+#: telebot.types.InlineQueryResultCachedGif
+#: telebot.types.InlineQueryResultCachedMpeg4Gif
+#: telebot.types.InlineQueryResultCachedPhoto
+#: telebot.types.InlineQueryResultCachedSticker
+#: telebot.types.InlineQueryResultCachedVideo
+#: telebot.types.InlineQueryResultCachedVoice
+#: telebot.types.InlineQueryResultContact
+#: telebot.types.InlineQueryResultDocument telebot.types.InlineQueryResultGame
+#: telebot.types.InlineQueryResultGif telebot.types.InlineQueryResultLocation
+#: telebot.types.InlineQueryResultMpeg4Gif telebot.types.InlineQueryResultPhoto
+#: telebot.types.InlineQueryResultVenue telebot.types.InlineQueryResultVideo
+#: telebot.types.InlineQueryResultVoice telebot.types.InlineQueryResultsButton
+#: telebot.types.InputContactMessageContent
+#: telebot.types.InputInvoiceMessageContent
+#: telebot.types.InputLocationMessageContent telebot.types.InputMediaAnimation
+#: telebot.types.InputMediaAudio telebot.types.InputMediaDocument
+#: telebot.types.InputMediaPhoto telebot.types.InputMediaVideo
+#: telebot.types.InputSticker telebot.types.InputTextMessageContent
+#: telebot.types.InputVenueMessageContent telebot.types.Invoice
+#: telebot.types.KeyboardButton telebot.types.KeyboardButtonPollType
+#: telebot.types.KeyboardButtonRequestChat
+#: telebot.types.KeyboardButtonRequestUsers telebot.types.LabeledPrice
+#: telebot.types.LinkPreviewOptions telebot.types.Location
+#: telebot.types.LoginUrl telebot.types.MaskPosition
+#: telebot.types.MenuButtonCommands telebot.types.MenuButtonDefault
+#: telebot.types.MenuButtonWebApp telebot.types.Message
+#: telebot.types.MessageAutoDeleteTimerChanged telebot.types.MessageEntity
+#: telebot.types.MessageID telebot.types.MessageOrigin
+#: telebot.types.MessageReactionCountUpdated
+#: telebot.types.MessageReactionUpdated telebot.types.OrderInfo
+#: telebot.types.PhotoSize telebot.types.Poll telebot.types.PollAnswer
+#: telebot.types.PollOption telebot.types.PreCheckoutQuery
+#: telebot.types.ProximityAlertTriggered telebot.types.ReactionCount
+#: telebot.types.ReactionType telebot.types.ReactionTypeCustomEmoji
+#: telebot.types.ReactionTypeEmoji telebot.types.ReplyKeyboardMarkup
+#: telebot.types.ReplyKeyboardMarkup.add telebot.types.ReplyKeyboardMarkup.row
+#: telebot.types.ReplyKeyboardRemove telebot.types.ReplyParameters
+#: telebot.types.SentWebAppMessage telebot.types.ShippingAddress
+#: telebot.types.ShippingOption telebot.types.ShippingOption.add_price
+#: telebot.types.ShippingQuery telebot.types.Sticker telebot.types.StickerSet
+#: telebot.types.SuccessfulPayment telebot.types.SwitchInlineQueryChosenChat
+#: telebot.types.TextQuote telebot.types.Update telebot.types.User
+#: telebot.types.UserChatBoosts telebot.types.UserProfilePhotos
+#: telebot.types.UsersShared telebot.types.Venue telebot.types.Video
+#: telebot.types.VideoChatEnded telebot.types.VideoChatParticipantsInvited
+#: telebot.types.VideoChatScheduled telebot.types.VideoNote telebot.types.Voice
+#: telebot.types.WebAppData telebot.types.WebAppInfo telebot.types.WebhookInfo
+msgid "Returns"
+msgstr ""
+
+#: of telebot.types.Animation:35 telebot.types.Audio:35
+#: telebot.types.BotCommand:12 telebot.types.BotCommandScope:38
+#: telebot.types.BotCommandScopeAllChatAdministrators:8
+#: telebot.types.BotCommandScopeAllGroupChats:8
+#: telebot.types.BotCommandScopeAllPrivateChats:8
+#: telebot.types.BotCommandScopeChat:12
+#: telebot.types.BotCommandScopeChatAdministrators:12
+#: telebot.types.BotCommandScopeChatMember:15
+#: telebot.types.BotCommandScopeDefault:8 telebot.types.BotDescription:8
+#: telebot.types.BotName:8 telebot.types.BotShortDescription:8
+#: telebot.types.CallbackQuery:29 telebot.types.Chat:137
+#: telebot.types.ChatAdministratorRights:55 telebot.types.ChatBoost:17
+#: telebot.types.ChatBoostRemoved:17 telebot.types.ChatBoostSource:8
+#: telebot.types.ChatBoostSourceGiftCode:11
+#: telebot.types.ChatBoostSourceGiveaway:17
+#: telebot.types.ChatBoostSourcePremium:11 telebot.types.ChatBoostUpdated:11
+#: telebot.types.ChatInviteLink:34 telebot.types.ChatJoinRequest:27
+#: telebot.types.ChatLocation:11 telebot.types.ChatMemberAdministrator:68
+#: telebot.types.ChatMemberBanned:15 telebot.types.ChatMemberLeft:11
+#: telebot.types.ChatMemberMember:11 telebot.types.ChatMemberOwner:17
+#: telebot.types.ChatMemberRestricted:61 telebot.types.ChatMemberUpdated:27
+#: telebot.types.ChatPermissions:55 telebot.types.ChatPhoto:21
+#: telebot.types.ChatShared:15 telebot.types.ChosenInlineResult:21
+#: telebot.types.Contact:22 telebot.types.Dice:11 telebot.types.Document:26
+#: telebot.types.ExternalReplyInfo:75 telebot.types.File:21
+#: telebot.types.ForceReply:18 telebot.types.ForumTopic:17
+#: telebot.types.ForumTopicCreated:14 telebot.types.Game:25
+#: telebot.types.GameHighScore:14 telebot.types.Giveaway:29
+#: telebot.types.GiveawayCompleted:14 telebot.types.GiveawayWinners:38
+#: telebot.types.InaccessibleMessage:14 telebot.types.InlineKeyboardButton:49
+#: telebot.types.InlineKeyboardMarkup:28 telebot.types.InlineQuery:26
+#: telebot.types.InlineQueryResultArticle:38
+#: telebot.types.InlineQueryResultAudio:40
+#: telebot.types.InlineQueryResultCachedAudio:31
+#: telebot.types.InlineQueryResultCachedDocument:37
+#: telebot.types.InlineQueryResultCachedGif:33
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:33
+#: telebot.types.InlineQueryResultCachedPhoto:37
+#: telebot.types.InlineQueryResultCachedSticker:20
+#: telebot.types.InlineQueryResultCachedVideo:37
+#: telebot.types.InlineQueryResultCachedVoice:34
+#: telebot.types.InlineQueryResultContact:38
+#: telebot.types.InlineQueryResultDocument:49
+#: telebot.types.InlineQueryResultGame:17 telebot.types.InlineQueryResultGif:49
+#: telebot.types.InlineQueryResultLocation:50
+#: telebot.types.InlineQueryResultMpeg4Gif:49
+#: telebot.types.InlineQueryResultPhoto:46
+#: telebot.types.InlineQueryResultVenue:51
+#: telebot.types.InlineQueryResultVideo:53
+#: telebot.types.InlineQueryResultVoice:37
+#: telebot.types.InlineQueryResultsButton:22
+#: telebot.types.InputContactMessageContent:17
+#: telebot.types.InputInvoiceMessageContent:75
+#: telebot.types.InputLocationMessageContent:26
+#: telebot.types.InputMediaAnimation:40 telebot.types.InputMediaAudio:37
+#: telebot.types.InputMediaDocument:32 telebot.types.InputMediaPhoto:24
+#: telebot.types.InputMediaVideo:43 telebot.types.InputSticker:18
+#: telebot.types.InputTextMessageContent:22
+#: telebot.types.InputVenueMessageContent:30 telebot.types.Invoice:22
+#: telebot.types.KeyboardButton:36 telebot.types.KeyboardButtonPollType:9
+#: telebot.types.KeyboardButtonRequestChat:35
+#: telebot.types.KeyboardButtonRequestUsers:21 telebot.types.LabeledPrice:13
+#: telebot.types.LinkPreviewOptions:20 telebot.types.Location:25
+#: telebot.types.LoginUrl:24 telebot.types.MaskPosition:20
+#: telebot.types.MenuButtonCommands:8 telebot.types.MenuButtonDefault:8
+#: telebot.types.MenuButtonWebApp:15 telebot.types.Message:277
+#: telebot.types.MessageAutoDeleteTimerChanged:8 telebot.types.MessageEntity:32
+#: telebot.types.MessageID:8 telebot.types.MessageOrigin:23
+#: telebot.types.MessageReactionCountUpdated:17
+#: telebot.types.MessageReactionUpdated:26 telebot.types.OrderInfo:17
+#: telebot.types.PhotoSize:21 telebot.types.Poll:47 telebot.types.PollAnswer:18
+#: telebot.types.PollOption:11 telebot.types.PreCheckoutQuery:28
+#: telebot.types.ProximityAlertTriggered:14 telebot.types.ReactionCount:11
+#: telebot.types.ReactionType:8 telebot.types.ReactionTypeCustomEmoji:11
+#: telebot.types.ReactionTypeEmoji:11 telebot.types.ReplyKeyboardMarkup:49
+#: telebot.types.ReplyKeyboardRemove:18 telebot.types.ReplyParameters:26
+#: telebot.types.SentWebAppMessage:9 telebot.types.ShippingAddress:23
+#: telebot.types.ShippingOption:14 telebot.types.ShippingQuery:17
+#: telebot.types.Sticker:54 telebot.types.StickerSet:29
+#: telebot.types.SuccessfulPayment:28
+#: telebot.types.SwitchInlineQueryChosenChat:22 telebot.types.TextQuote:17
+#: telebot.types.Update:75 telebot.types.User:41 telebot.types.UserChatBoosts:8
+#: telebot.types.UserProfilePhotos:11 telebot.types.UsersShared:17
+#: telebot.types.Venue:27 telebot.types.Video:35 telebot.types.VideoChatEnded:8
+#: telebot.types.VideoChatParticipantsInvited:8
+#: telebot.types.VideoChatScheduled:9 telebot.types.VideoNote:24
+#: telebot.types.Voice:23 telebot.types.WebAppData:12
+#: telebot.types.WebAppInfo:8 telebot.types.WebhookInfo:37
+msgid "Instance of the class"
+msgstr ""
+
+#: of telebot.types.Animation telebot.types.Audio telebot.types.BotCommand
+#: telebot.types.BotCommandScope
+#: telebot.types.BotCommandScopeAllChatAdministrators
+#: telebot.types.BotCommandScopeAllGroupChats
+#: telebot.types.BotCommandScopeAllPrivateChats
+#: telebot.types.BotCommandScopeChat
+#: telebot.types.BotCommandScopeChatAdministrators
+#: telebot.types.BotCommandScopeChatMember telebot.types.BotCommandScopeDefault
+#: telebot.types.BotDescription telebot.types.BotName
+#: telebot.types.BotShortDescription telebot.types.CallbackQuery
+#: telebot.types.Chat telebot.types.ChatAdministratorRights
+#: telebot.types.ChatBoost telebot.types.ChatBoostRemoved
+#: telebot.types.ChatBoostSource telebot.types.ChatBoostSourceGiftCode
+#: telebot.types.ChatBoostSourceGiveaway telebot.types.ChatBoostSourcePremium
+#: telebot.types.ChatBoostUpdated telebot.types.ChatInviteLink
+#: telebot.types.ChatJoinRequest telebot.types.ChatLocation
+#: telebot.types.ChatMemberAdministrator telebot.types.ChatMemberBanned
+#: telebot.types.ChatMemberLeft telebot.types.ChatMemberMember
+#: telebot.types.ChatMemberOwner telebot.types.ChatMemberRestricted
+#: telebot.types.ChatMemberUpdated telebot.types.ChatMemberUpdated.difference
+#: telebot.types.ChatPermissions telebot.types.ChatPhoto
+#: telebot.types.ChatShared telebot.types.ChosenInlineResult
+#: telebot.types.Contact telebot.types.Dice telebot.types.Document
+#: telebot.types.ExternalReplyInfo telebot.types.File telebot.types.ForceReply
+#: telebot.types.ForumTopic telebot.types.ForumTopicCreated telebot.types.Game
+#: telebot.types.GameHighScore telebot.types.Giveaway
+#: telebot.types.GiveawayCompleted telebot.types.GiveawayWinners
+#: telebot.types.InaccessibleMessage telebot.types.InlineKeyboardButton
+#: telebot.types.InlineKeyboardMarkup telebot.types.InlineKeyboardMarkup.add
+#: telebot.types.InlineKeyboardMarkup.row telebot.types.InlineQuery
+#: telebot.types.InlineQueryResultArticle telebot.types.InlineQueryResultAudio
+#: telebot.types.InlineQueryResultCachedAudio
+#: telebot.types.InlineQueryResultCachedDocument
+#: telebot.types.InlineQueryResultCachedGif
+#: telebot.types.InlineQueryResultCachedMpeg4Gif
+#: telebot.types.InlineQueryResultCachedPhoto
+#: telebot.types.InlineQueryResultCachedSticker
+#: telebot.types.InlineQueryResultCachedVideo
+#: telebot.types.InlineQueryResultCachedVoice
+#: telebot.types.InlineQueryResultContact
+#: telebot.types.InlineQueryResultDocument telebot.types.InlineQueryResultGame
+#: telebot.types.InlineQueryResultGif telebot.types.InlineQueryResultLocation
+#: telebot.types.InlineQueryResultMpeg4Gif telebot.types.InlineQueryResultPhoto
+#: telebot.types.InlineQueryResultVenue telebot.types.InlineQueryResultVideo
+#: telebot.types.InlineQueryResultVoice telebot.types.InlineQueryResultsButton
+#: telebot.types.InputContactMessageContent
+#: telebot.types.InputInvoiceMessageContent
+#: telebot.types.InputLocationMessageContent telebot.types.InputMediaAnimation
+#: telebot.types.InputMediaAudio telebot.types.InputMediaDocument
+#: telebot.types.InputMediaPhoto telebot.types.InputMediaVideo
+#: telebot.types.InputSticker telebot.types.InputTextMessageContent
+#: telebot.types.InputVenueMessageContent telebot.types.Invoice
+#: telebot.types.KeyboardButton telebot.types.KeyboardButtonPollType
+#: telebot.types.KeyboardButtonRequestChat
+#: telebot.types.KeyboardButtonRequestUsers telebot.types.LabeledPrice
+#: telebot.types.LinkPreviewOptions telebot.types.Location
+#: telebot.types.LoginUrl telebot.types.MaskPosition
+#: telebot.types.MenuButtonCommands telebot.types.MenuButtonDefault
+#: telebot.types.MenuButtonWebApp telebot.types.Message
+#: telebot.types.MessageAutoDeleteTimerChanged telebot.types.MessageEntity
+#: telebot.types.MessageID telebot.types.MessageOrigin
+#: telebot.types.MessageReactionCountUpdated
+#: telebot.types.MessageReactionUpdated telebot.types.OrderInfo
+#: telebot.types.PhotoSize telebot.types.Poll telebot.types.PollAnswer
+#: telebot.types.PollOption telebot.types.PreCheckoutQuery
+#: telebot.types.ProximityAlertTriggered telebot.types.ReactionCount
+#: telebot.types.ReactionType telebot.types.ReactionTypeCustomEmoji
+#: telebot.types.ReactionTypeEmoji telebot.types.ReplyKeyboardMarkup
+#: telebot.types.ReplyKeyboardMarkup.add telebot.types.ReplyKeyboardMarkup.row
+#: telebot.types.ReplyKeyboardRemove telebot.types.ReplyParameters
+#: telebot.types.SentWebAppMessage telebot.types.ShippingAddress
+#: telebot.types.ShippingOption telebot.types.ShippingQuery
+#: telebot.types.Sticker telebot.types.StickerSet
+#: telebot.types.SuccessfulPayment telebot.types.SwitchInlineQueryChosenChat
+#: telebot.types.TextQuote telebot.types.Update telebot.types.User
+#: telebot.types.UserChatBoosts telebot.types.UserProfilePhotos
+#: telebot.types.UsersShared telebot.types.Venue telebot.types.Video
+#: telebot.types.VideoChatEnded telebot.types.VideoChatParticipantsInvited
+#: telebot.types.VideoChatScheduled telebot.types.VideoNote telebot.types.Voice
+#: telebot.types.WebAppData telebot.types.WebAppInfo telebot.types.WebhookInfo
+msgid "Return type"
+msgstr ""
+
+#: of telebot.types.Animation:36
+msgid ":class:`telebot.types.Animation`"
+msgstr ""
+
+#: of telebot.types.Audio:1
+msgid ""
+"This object represents an audio file to be treated as music by the "
+"Telegram clients."
+msgstr ""
+
+#: of telebot.types.Audio:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#audio"
+msgstr ""
+
+#: of telebot.types.Audio:12 telebot.types.Voice:12
+msgid "Duration of the audio in seconds as defined by sender"
+msgstr ""
+
+#: of telebot.types.Audio:15
+msgid "Optional. Performer of the audio as defined by sender or by audio tags"
+msgstr ""
+
+#: of telebot.types.Audio:18
+msgid "Optional. Title of the audio as defined by sender or by audio tags"
+msgstr ""
+
+#: of telebot.types.Audio:21 telebot.types.Document:15 telebot.types.Video:24
+msgid "Optional. Original filename as defined by sender"
+msgstr ""
+
+#: of telebot.types.Audio:32
+msgid "Optional. Thumbnail of the album cover to which the music file belongs"
+msgstr ""
+
+#: of telebot.types.Audio:36
+msgid ":class:`telebot.types.Audio`"
+msgstr ""
+
+#: of telebot.types.BotCommand:1 telebot.types.ChatInviteLink:1
+#: telebot.types.ChatLocation:1 telebot.types.PollAnswer:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonSerializable`, "
+":py:class:`telebot.types.JsonDeserializable`, "
+":py:class:`telebot.types.Dictionaryable`"
+msgstr ""
+
+#: of telebot.types.BotCommand:1
+msgid "This object represents a bot command."
+msgstr ""
+
+#: of telebot.types.BotCommand:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#botcommand"
+msgstr ""
+
+#: of telebot.types.BotCommand:5
+msgid ""
+"Text of the command; 1-32 characters. Can contain only lowercase English "
+"letters, digits and underscores."
+msgstr ""
+
+#: of telebot.types.BotCommand:9
+msgid "Description of the command; 1-256 characters."
+msgstr ""
+
+#: of telebot.types.BotCommand:13
+msgid ":class:`telebot.types.BotCommand`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:1
+#: telebot.types.InlineQueryResultCachedBase:1
+msgid "Bases: :py:class:`abc.ABC`, :py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:1
+msgid ""
+"This object represents the scope to which bot commands are applied. "
+"Currently, the following 7 scopes are supported:"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:3 telebot.types.BotCommandScope:21
+#: telebot.types.BotCommandScope:36
+msgid ":class:`BotCommandScopeDefault`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:4 telebot.types.BotCommandScope:19
+msgid ":class:`BotCommandScopeAllPrivateChats`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:5 telebot.types.BotCommandScope:34
+msgid ":class:`BotCommandScopeAllGroupChats`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:6
+msgid ":class:`BotCommandScopeAllChatAdministrators`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:7 telebot.types.BotCommandScope:17
+#: telebot.types.BotCommandScope:30
+msgid ":class:`BotCommandScopeChat`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:8
+msgid ":class:`BotCommandScopeChatAdministrators`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:9 telebot.types.BotCommandScope:26
+msgid ":class:`BotCommandScopeChatMember`"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:11
+msgid ""
+"Determining list of commands The following algorithm is used to determine"
+" the list of commands for a particular user viewing the bot menu. The "
+"first list of commands which is set is returned:"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:14
+msgid "Commands in the chat with the bot:"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:16 telebot.types.BotCommandScope:29
+msgid ":class:`BotCommandScopeChat` + language_code"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:18
+msgid ":class:`BotCommandScopeAllPrivateChats` + language_code"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:20 telebot.types.BotCommandScope:35
+msgid ":class:`BotCommandScopeDefault` + language_code"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:23
+msgid "Commands in group and supergroup chats:"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:25
+msgid ":class:`BotCommandScopeChatMember` + language_code"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:27
+msgid ""
+":class:`BotCommandScopeChatAdministrators` + language_code "
+"(administrators only)"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:28
+msgid ":class:`BotCommandScopeChatAdministrators` (administrators only)"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:31
+msgid ""
+":class:`BotCommandScopeAllChatAdministrators` + language_code "
+"(administrators only)"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:32
+msgid ":class:`BotCommandScopeAllChatAdministrators` (administrators only)"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:33
+msgid ":class:`BotCommandScopeAllGroupChats` + language_code"
+msgstr ""
+
+#: of telebot.types.BotCommandScope:39
+msgid ":class:`telebot.types.BotCommandScope`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllChatAdministrators:1
+#: telebot.types.BotCommandScopeAllGroupChats:1
+#: telebot.types.BotCommandScopeAllPrivateChats:1
+#: telebot.types.BotCommandScopeChat:1
+#: telebot.types.BotCommandScopeChatAdministrators:1
+#: telebot.types.BotCommandScopeChatMember:1
+#: telebot.types.BotCommandScopeDefault:1
+msgid "Bases: :py:class:`telebot.types.BotCommandScope`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllChatAdministrators:1
+msgid ""
+"Represents the scope of bot commands, covering all group and supergroup "
+"chat administrators."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllChatAdministrators:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopeallchatadministrators"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllChatAdministrators:5
+msgid "Scope type, must be all_chat_administrators"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllChatAdministrators:9
+msgid ":class:`telebot.types.BotCommandScopeAllChatAdministrators`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllGroupChats:1
+msgid ""
+"Represents the scope of bot commands, covering all group and supergroup "
+"chats."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllGroupChats:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopeallgroupchats"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllGroupChats:5
+msgid "Scope type, must be all_group_chats"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllGroupChats:9
+msgid ":class:`telebot.types.BotCommandScopeAllGroupChats`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllPrivateChats:1
+msgid "Represents the scope of bot commands, covering all private chats."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllPrivateChats:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopeallprivatechats"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllPrivateChats:5
+msgid "Scope type, must be all_private_chats"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeAllPrivateChats:9
+msgid ":class:`telebot.types.BotCommandScopeAllPrivateChats`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChat:1
+msgid "Represents the scope of bot commands, covering a specific chat."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChat:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopechat"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChat:5
+msgid "Scope type, must be chat"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChat:8
+#: telebot.types.BotCommandScopeChatAdministrators:8
+#: telebot.types.BotCommandScopeChatMember:8
+msgid ""
+"Unique identifier for the target chat or username of the target "
+"supergroup (in the format @supergroupusername)"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChat:13
+msgid ":class:`telebot.types.BotCommandScopeChat`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatAdministrators:1
+msgid ""
+"Represents the scope of bot commands, covering all administrators of a "
+"specific group or supergroup chat."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatAdministrators:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopechatadministrators"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatAdministrators:5
+msgid "Scope type, must be chat_administrators"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatAdministrators:13
+msgid ":class:`telebot.types.BotCommandScopeChatAdministrators`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatMember:1
+msgid ""
+"Represents the scope of bot commands, covering a specific member of a "
+"group or supergroup chat."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatMember:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopechatmember"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatMember:5
+msgid "Scope type, must be chat_member"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatMember:12
+msgid "Unique identifier of the target user"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeChatMember:16
+msgid ":class:`telebot.types.BotCommandScopeChatMember`"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeDefault:1
+msgid ""
+"Represents the default scope of bot commands. Default commands are used "
+"if no commands with a narrower scope are specified for the user."
+msgstr ""
+
+#: of telebot.types.BotCommandScopeDefault:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#botcommandscopedefault"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeDefault:5
+msgid "Scope type, must be default"
+msgstr ""
+
+#: of telebot.types.BotCommandScopeDefault:9
+msgid ":class:`telebot.types.BotCommandScopeDefault`"
+msgstr ""
+
+#: of telebot.types.BotDescription:1
+msgid "This object represents a bot description."
+msgstr ""
+
+#: of telebot.types.BotDescription:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#botdescription"
+msgstr ""
+
+#: of telebot.types.BotDescription:5
+msgid "Bot description"
+msgstr ""
+
+#: of telebot.types.BotDescription:9
+msgid ":class:`telebot.types.BotDescription`"
+msgstr ""
+
+#: of telebot.types.BotName:1
+msgid "This object represents a bot name."
+msgstr ""
+
+#: of telebot.types.BotName:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#botname"
+msgstr ""
+
+#: of telebot.types.BotName:5
+msgid "The bot name"
+msgstr ""
+
+#: of telebot.types.BotName:9
+msgid ":class:`BotName`"
+msgstr ""
+
+#: of telebot.types.BotShortDescription:1
+msgid "This object represents a bot short description."
+msgstr ""
+
+#: of telebot.types.BotShortDescription:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#botshortdescription"
+msgstr ""
+
+#: of telebot.types.BotShortDescription:5
+msgid "Bot short description"
+msgstr ""
+
+#: of telebot.types.BotShortDescription:9
+msgid ":class:`telebot.types.BotShortDescription`"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:1
+msgid ""
+"This object represents an incoming callback query from a callback button "
+"in an inline keyboard. If the button that originated the query was "
+"attached to a message sent by the bot, the field message will be present."
+" If the button was attached to a message sent via the bot (in inline "
+"mode), the field inline_message_id will be present. Exactly one of the "
+"fields data or game_short_name will be present."
+msgstr ""
+
+#: of telebot.types.CallbackQuery:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#callbackquery"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:5 telebot.types.InlineQuery:5
+msgid "Unique identifier for this query"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:8 telebot.types.InlineQuery:8
+msgid "Sender"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:11
+msgid ""
+"Optional. Message sent by the bot with the callback button that "
+"originated the query"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:14
+msgid ""
+"Optional. Identifier of the message sent via the bot in inline mode, that"
+" originated the query."
+msgstr ""
+
+#: of telebot.types.CallbackQuery:18
+msgid ""
+"Global identifier, uniquely corresponding to the chat to which the "
+"message with the callback button was sent. Useful for high scores in "
+"games."
+msgstr ""
+
+#: of telebot.types.CallbackQuery:22
+msgid ""
+"Optional. Data associated with the callback button. Be aware that the "
+"message originated the query can contain no callback buttons with this "
+"data."
+msgstr ""
+
+#: of telebot.types.CallbackQuery:26
+msgid ""
+"Optional. Short name of a Game to be returned, serves as the unique "
+"identifier for the game"
+msgstr ""
+
+#: of telebot.types.CallbackQuery:30
+msgid ":class:`telebot.types.CallbackQuery`"
+msgstr ""
+
+#: of telebot.types.Chat:1
+msgid "This object represents a chat."
+msgstr ""
+
+#: of telebot.types.Chat:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chat"
+msgstr ""
+
+#: of telebot.types.Chat:5
+msgid ""
+"Unique identifier for this chat. This number may have more than 32 "
+"significant bits and some programming languages may have "
+"difficulty/silent defects in interpreting it. But it has at most 52 "
+"significant bits, so a signed 64-bit integer or double-precision float "
+"type are safe for storing this identifier."
+msgstr ""
+
+#: of telebot.types.Chat:10
+msgid "Type of chat, can be either “private”, “group”, “supergroup” or “channel”"
+msgstr ""
+
+#: of telebot.types.Chat:13
+msgid "Optional. Title, for supergroups, channels and group chats"
+msgstr ""
+
+#: of telebot.types.Chat:16
+msgid ""
+"Optional. Username, for private chats, supergroups and channels if "
+"available"
+msgstr ""
+
+#: of telebot.types.Chat:19
+msgid "Optional. First name of the other party in a private chat"
+msgstr ""
+
+#: of telebot.types.Chat:22
+msgid "Optional. Last name of the other party in a private chat"
+msgstr ""
+
+#: of telebot.types.Chat:25
+msgid "Optional. True, if the supergroup chat is a forum (has topics enabled)"
+msgstr ""
+
+#: of telebot.types.Chat:28
+msgid "Optional. Chat photo. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:31
+msgid ""
+"Optional. If non-empty, the list of all active chat usernames; for "
+"private chats, supergroups and channels. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:35
+msgid ""
+"Optional. List of available chat reactions; for private chats, "
+"supergroups and channels. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:39
+msgid ""
+"Optional. Optional. Identifier of the accent color for the chat name and "
+"backgrounds of the chat photo, reply header, and link preview. See accent"
+" colors for more details. Returned only in getChat. Always returned in "
+"getChat."
+msgstr ""
+
+#: of telebot.types.Chat:43
+msgid ""
+"Optional. Custom emoji identifier of emoji chosen by the chat for the "
+"reply header and link preview background. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:47
+msgid ""
+"Optional. Identifier of the accent color for the chat's profile "
+"background. See profile accent colors for more details. Returned only in "
+"getChat."
+msgstr ""
+
+#: of telebot.types.Chat:51
+msgid ""
+"Optional. Custom emoji identifier of the emoji chosen by the chat for its"
+" profile background. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:55
+msgid ""
+"Optional. Custom emoji identifier of emoji status of the other party in a"
+" private chat. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:59
+msgid ""
+"Optional. Expiration date of the emoji status of the other party in a "
+"private chat, if any. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:63
+msgid ""
+"Optional. Bio of the other party in a private chat. Returned only in "
+"getChat."
+msgstr ""
+
+#: of telebot.types.Chat:66
+msgid ""
+"Optional. :obj:`bool`, if privacy settings of the other party in the "
+"private chat allows to use tg://user?id= links only in chats "
+"with the user. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:70
+msgid ""
+"Optional. True, if the privacy settings of the other party restrict "
+"sending voice and video note messages in the private chat. Returned only "
+"in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:72
+msgid ":type :obj:`bool`"
+msgstr ""
+
+#: of telebot.types.Chat:74
+msgid ""
+"Optional. :obj:`bool`, if users need to join the supergroup before they "
+"can send messages. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:78
+msgid ""
+"Optional. :obj:`bool`, if all users directly joining the supergroup need "
+"to be approved by supergroup administrators. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:82
+msgid ""
+"Optional. Description, for groups, supergroups and channel chats. "
+"Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:85
+msgid ""
+"Optional. Primary invite link, for groups, supergroups and channel chats."
+" Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:89
+msgid ""
+"Optional. The most recent pinned message (by sending date). Returned only"
+" in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:92
+msgid ""
+"Optional. Default chat member permissions, for groups and supergroups. "
+"Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:96
+msgid ""
+"Optional. For supergroups, the minimum allowed delay between consecutive "
+"messages sent by each unpriviledged user; in seconds. Returned only in "
+"getChat."
+msgstr ""
+
+#: of telebot.types.Chat:100
+msgid ""
+"Optional. The time after which all messages sent to the chat will be "
+"automatically deleted; in seconds. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:104
+msgid ""
+"Optional. :obj:`bool`, if the chat has enabled aggressive anti-spam "
+"protection. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:108
+msgid ""
+"Optional. :obj:`bool`, if the chat has enabled hidden members. Returned "
+"only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:112
+msgid ""
+"Optional. :obj:`bool`, if messages from the chat can't be forwarded to "
+"other chats. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:116
+msgid ""
+"Optional. True, if new chat members will have access to old messages; "
+"available only to chat administrators. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:120
+msgid ""
+"Optional. For supergroups, name of group sticker set. Returned only in "
+"getChat."
+msgstr ""
+
+#: of telebot.types.Chat:123
+msgid ""
+"Optional. :obj:`bool`, if the bot can change the group sticker set. "
+"Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:127
+msgid ""
+"Optional. Unique identifier for the linked chat, i.e. the discussion "
+"group identifier for a channel and vice versa; for supergroups and "
+"channel chats. This identifier may be greater than 32 bits and some "
+"programming languages may have difficulty/silent defects in interpreting "
+"it. But it is smaller than 52 bits, so a signed 64 bit integer or double-"
+"precision float type are safe for storing this identifier. Returned only "
+"in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:133
+msgid ""
+"Optional. For supergroups, the location to which the supergroup is "
+"connected. Returned only in getChat."
+msgstr ""
+
+#: of telebot.types.Chat:138
+msgid ":class:`telebot.types.Chat`"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:1 telebot.types.ChatPermissions:1
+#: telebot.types.Location:1 telebot.types.MenuButton:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonDeserializable`, "
+":py:class:`telebot.types.JsonSerializable`, "
+":py:class:`telebot.types.Dictionaryable`"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:1
+msgid "Represents the rights of an administrator in a chat."
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatadministratorrights"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:5
+#: telebot.types.ChatMemberAdministrator:14 telebot.types.ChatMemberOwner:11
+msgid "True, if the user's presence in the chat is hidden"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:8
+#: telebot.types.ChatMemberAdministrator:17
+msgid ""
+"True, if the administrator can access the chat event log, chat "
+"statistics, message statistics in channels, see channel members, see "
+"anonymous administrators in supergroups and ignore slow mode. Implied by "
+"any other administrator privilege"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:13
+#: telebot.types.ChatMemberAdministrator:22
+msgid "True, if the administrator can delete messages of other users"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:16
+#: telebot.types.ChatMemberAdministrator:25
+msgid "True, if the administrator can manage video chats"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:19
+#: telebot.types.ChatMemberAdministrator:28
+msgid "True, if the administrator can restrict, ban or unban chat members"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:22
+#: telebot.types.ChatMemberAdministrator:31
+msgid ""
+"True, if the administrator can add new administrators with a subset of "
+"their own privileges or demote administrators that he has promoted, "
+"directly or indirectly (promoted by administrators that were appointed by"
+" the user)"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:27
+#: telebot.types.ChatMemberAdministrator:36
+#: telebot.types.ChatMemberRestricted:14
+msgid ""
+"True, if the user is allowed to change the chat title, photo and other "
+"settings"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:30
+#: telebot.types.ChatMemberAdministrator:39
+#: telebot.types.ChatMemberRestricted:17
+msgid "True, if the user is allowed to invite new users to the chat"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:33
+#: telebot.types.ChatMemberAdministrator:42
+msgid ""
+"Optional. True, if the administrator can post in the channel; channels "
+"only"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:36
+#: telebot.types.ChatMemberAdministrator:45
+msgid ""
+"Optional. True, if the administrator can edit messages of other users and"
+" can pin messages; channels only"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:40
+#: telebot.types.ChatMemberAdministrator:49
+msgid ""
+"Optional. True, if the user is allowed to pin messages; groups and "
+"supergroups only"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:43
+#: telebot.types.ChatMemberAdministrator:52
+msgid ""
+"Optional. True, if the user is allowed to create, rename, close, and "
+"reopen forum topics; supergroups only"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:46
+#: telebot.types.ChatMemberAdministrator:59
+msgid "Optional. True, if the administrator can post channel stories"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:49
+#: telebot.types.ChatMemberAdministrator:62
+msgid "Optional. True, if the administrator can edit stories"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:52
+#: telebot.types.ChatMemberAdministrator:65
+msgid "Optional. True, if the administrator can delete stories of other users"
+msgstr ""
+
+#: of telebot.types.ChatAdministratorRights:56
+msgid ":class:`telebot.types.ChatAdministratorRights`"
+msgstr ""
+
+#: of telebot.types.ChatBoost:1
+msgid "This object contains information about a chat boost."
+msgstr ""
+
+#: of telebot.types.ChatBoost:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#chatboost"
+msgstr ""
+
+#: of telebot.types.ChatBoost:5 telebot.types.ChatBoostRemoved:8
+msgid "Unique identifier of the boost"
+msgstr ""
+
+#: of telebot.types.ChatBoost:8
+msgid "Point in time (Unix timestamp) when the chat was boosted"
+msgstr ""
+
+#: of telebot.types.ChatBoost:11
+msgid ""
+"Point in time (Unix timestamp) when the boost will automatically expire, "
+"unless the booster's Telegram Premium subscription is prolonged"
+msgstr ""
+
+#: of telebot.types.ChatBoost:14
+msgid "Source of the added boost"
+msgstr ""
+
+#: of telebot.types.ChatBoost:18
+msgid ":class:`ChatBoost`"
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:1
+msgid "This object represents a boost removed from a chat."
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#chatboostremoved"
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:5 telebot.types.ChatBoostUpdated:5
+msgid "Chat which was boosted"
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:11
+msgid "Point in time (Unix timestamp) when the boost was removed"
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:14
+msgid "Source of the removed boost"
+msgstr ""
+
+#: of telebot.types.ChatBoostRemoved:18
+msgid ":class:`ChatBoostRemoved`"
+msgstr ""
+
+#: of telebot.types.ChatBoostSource:1
+msgid "This object describes the source of a chat boost."
+msgstr ""
+
+#: of telebot.types.ChatBoostSource:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#chatboostsource"
+msgstr ""
+
+#: of telebot.types.ChatBoostSource:5
+msgid "Source of the boost"
+msgstr ""
+
+#: of telebot.types.ChatBoostSource:9
+msgid ":class:`ChatBoostSource`"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:1
+#: telebot.types.ChatBoostSourceGiveaway:1
+#: telebot.types.ChatBoostSourcePremium:1
+msgid "Bases: :py:class:`telebot.types.ChatBoostSource`"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:1
+msgid ""
+"The boost was obtained by the creation of Telegram Premium gift codes to "
+"boost a chat."
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#chatboostsourcegiftcode"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:5
+msgid "Source of the boost, always “gift_code”"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:8
+msgid "User for which the gift code was created"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiftCode:12
+msgid ":class:`ChatBoostSourceGiftCode`"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:1
+msgid "The boost was obtained by the creation of a Telegram Premium giveaway."
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#chatboostsourcegiveaway"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:5
+msgid "Source of the boost, always “giveaway”"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:8
+msgid ""
+"Identifier of a message in the chat with the giveaway; the message could "
+"have been deleted already. May be 0 if the message isn't sent yet."
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:11
+msgid "User that won the prize in the giveaway if any"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:14
+msgid ""
+"True, if the giveaway was completed, but there was no user to win the "
+"prize"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourceGiveaway:18
+msgid ":class:`ChatBoostSourceGiveaway`"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourcePremium:1
+msgid ""
+"The boost was obtained by subscribing to Telegram Premium or by gifting a"
+" Telegram Premium subscription to another user."
+msgstr ""
+
+#: of telebot.types.ChatBoostSourcePremium:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#chatboostsourcepremium"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourcePremium:5
+msgid "Source of the boost, always “premium”"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourcePremium:8
+msgid "User that boosted the chat"
+msgstr ""
+
+#: of telebot.types.ChatBoostSourcePremium:12
+msgid ":class:`ChatBoostSourcePremium`"
+msgstr ""
+
+#: of telebot.types.ChatBoostUpdated:1
+msgid "This object represents a boost added to a chat or changed."
+msgstr ""
+
+#: of telebot.types.ChatBoostUpdated:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#chatboostupdated"
+msgstr ""
+
+#: of telebot.types.ChatBoostUpdated:8
+msgid "Infomation about the chat boost"
+msgstr ""
+
+#: of telebot.types.ChatBoostUpdated:12
+msgid ":class:`ChatBoostUpdated`"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:1
+msgid "Represents an invite link for a chat."
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatinvitelink"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:5
+msgid ""
+"The invite link. If the link was created by another chat administrator, "
+"then the second part of the link will be replaced with “…”."
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:9
+msgid "Creator of the link"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:12
+msgid ""
+"True, if users joining the chat via the link need to be approved by chat "
+"administrators"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:15
+msgid "True, if the link is primary"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:18
+msgid "True, if the link is revoked"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:21
+msgid "Optional. Invite link name"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:24
+msgid ""
+"Optional. Point in time (Unix timestamp) when the link will expire or has"
+" been expired"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:27
+msgid ""
+"Optional. The maximum number of users that can be members of the chat "
+"simultaneously after joining the chat via this invite link; 1-99999"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:31
+msgid "Optional. Number of pending join requests created using this link"
+msgstr ""
+
+#: of telebot.types.ChatInviteLink:35
+msgid ":class:`telebot.types.ChatInviteLink`"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:1
+msgid "Represents a join request sent to a chat."
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatjoinrequest"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:5
+msgid "Chat to which the request was sent"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:8
+msgid "User that sent the join request"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:11
+msgid ""
+"Optional. Identifier of a private chat with the user who sent the join "
+"request. This number may have more than 32 significant bits and some "
+"programming languages may have difficulty/silent defects in interpreting "
+"it. But it has at most 52 significant bits, so a 64-bit integer or "
+"double-precision float type are safe for storing this identifier. The bot"
+" can use this identifier for 24 hours to send messages until the join "
+"request is processed, assuming no other administrator contacted the user."
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:18
+msgid "Date the request was sent in Unix time"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:21
+msgid "Optional. Bio of the user."
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:24
+msgid ""
+"Optional. Chat invite link that was used by the user to send the join "
+"request"
+msgstr ""
+
+#: of telebot.types.ChatJoinRequest:28
+msgid ":class:`telebot.types.ChatJoinRequest`"
+msgstr ""
+
+#: of telebot.types.ChatLocation:1
+msgid "Represents a location to which a chat is connected."
+msgstr ""
+
+#: of telebot.types.ChatLocation:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatlocation"
+msgstr ""
+
+#: of telebot.types.ChatLocation:5
+msgid ""
+"The location to which the supergroup is connected. Can't be a live "
+"location."
+msgstr ""
+
+#: of telebot.types.ChatLocation:8
+msgid "Location address; 1-64 characters, as defined by the chat owner"
+msgstr ""
+
+#: of telebot.types.ChatLocation:12
+msgid ":class:`telebot.types.ChatLocation`"
+msgstr ""
+
+#: of telebot.types.ChatMember:1
+msgid ""
+"This object contains information about one member of a chat. Currently, "
+"the following 6 types of chat members are supported:"
+msgstr ""
+
+#: of telebot.types.ChatMember:4 telebot.types.ChatMemberOwner:18
+msgid ":class:`telebot.types.ChatMemberOwner`"
+msgstr ""
+
+#: of telebot.types.ChatMember:5 telebot.types.ChatMemberAdministrator:69
+msgid ":class:`telebot.types.ChatMemberAdministrator`"
+msgstr ""
+
+#: of telebot.types.ChatMember:6 telebot.types.ChatMemberMember:12
+msgid ":class:`telebot.types.ChatMemberMember`"
+msgstr ""
+
+#: of telebot.types.ChatMember:7 telebot.types.ChatMemberRestricted:62
+msgid ":class:`telebot.types.ChatMemberRestricted`"
+msgstr ""
+
+#: of telebot.types.ChatMember:8 telebot.types.ChatMemberLeft:12
+msgid ":class:`telebot.types.ChatMemberLeft`"
+msgstr ""
+
+#: of telebot.types.ChatMember:9 telebot.types.ChatMemberBanned:16
+msgid ":class:`telebot.types.ChatMemberBanned`"
+msgstr ""
+
+#: of telebot.types.ChatMember:11
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatmember"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:1 telebot.types.ChatMemberBanned:1
+#: telebot.types.ChatMemberLeft:1 telebot.types.ChatMemberMember:1
+#: telebot.types.ChatMemberOwner:1 telebot.types.ChatMemberRestricted:1
+msgid "Bases: :py:class:`telebot.types.ChatMember`"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:1
+msgid "Represents a chat member that has some additional privileges."
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatmemberadministrator"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:5
+msgid "The member's status in the chat, always “administrator”"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:8 telebot.types.ChatMemberBanned:8
+#: telebot.types.ChatMemberLeft:8 telebot.types.ChatMemberMember:8
+#: telebot.types.ChatMemberOwner:8 telebot.types.ChatMemberRestricted:8
+msgid "Information about the user"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:11
+msgid "True, if the bot is allowed to edit administrator privileges of that user"
+msgstr ""
+
+#: of telebot.types.ChatMemberAdministrator:56 telebot.types.ChatMemberOwner:14
+msgid "Optional. Custom title for this user"
+msgstr ""
+
+#: of telebot.types.ChatMemberBanned:1
+msgid ""
+"Represents a chat member that was banned in the chat and can't return to "
+"the chat or view chat messages."
+msgstr ""
+
+#: of telebot.types.ChatMemberBanned:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatmemberbanned"
+msgstr ""
+
+#: of telebot.types.ChatMemberBanned:5
+msgid "The member's status in the chat, always “kicked”"
+msgstr ""
+
+#: of telebot.types.ChatMemberBanned:11
+msgid ""
+"Date when restrictions will be lifted for this user; unix time. If 0, "
+"then the user is banned forever"
+msgstr ""
+
+#: of telebot.types.ChatMemberLeft:1
+msgid ""
+"Represents a chat member that isn't currently a member of the chat, but "
+"may join it themselves."
+msgstr ""
+
+#: of telebot.types.ChatMemberLeft:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatmemberleft"
+msgstr ""
+
+#: of telebot.types.ChatMemberLeft:5
+msgid "The member's status in the chat, always “left”"
+msgstr ""
+
+#: of telebot.types.ChatMemberMember:1
+msgid ""
+"Represents a chat member that has no additional privileges or "
+"restrictions."
+msgstr ""
+
+#: of telebot.types.ChatMemberMember:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatmembermember"
+msgstr ""
+
+#: of telebot.types.ChatMemberMember:5
+msgid "The member's status in the chat, always “member”"
+msgstr ""
+
+#: of telebot.types.ChatMemberOwner:1
+msgid ""
+"Represents a chat member that owns the chat and has all administrator "
+"privileges."
+msgstr ""
+
+#: of telebot.types.ChatMemberOwner:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatmemberowner"
+msgstr ""
+
+#: of telebot.types.ChatMemberOwner:5
+msgid "The member's status in the chat, always “creator”"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:1
+msgid ""
+"Represents a chat member that is under certain restrictions in the chat. "
+"Supergroups only."
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatmemberrestricted"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:5
+msgid "The member's status in the chat, always “restricted”"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:11
+msgid "True, if the user is a member of the chat at the moment of the request"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:20
+msgid "True, if the user is allowed to pin messages"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:23
+msgid "True, if the user is allowed to create forum topics"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:26
+msgid ""
+"True, if the user is allowed to send text messages, contacts, locations "
+"and venues"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:29
+msgid "True, if the user is allowed to send audios"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:32
+msgid "True, if the user is allowed to send documents"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:35
+msgid "True, if the user is allowed to send photos"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:38
+msgid "True, if the user is allowed to send videos"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:41
+msgid "True, if the user is allowed to send video notes"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:44
+msgid "True, if the user is allowed to send voice notes"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:47
+msgid "True, if the user is allowed to send polls"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:50
+msgid ""
+"True, if the user is allowed to send animations, games, stickers and use "
+"inline bots"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:54
+msgid "True, if the user is allowed to add web page previews to their messages"
+msgstr ""
+
+#: of telebot.types.ChatMemberRestricted:57
+msgid ""
+"Date when restrictions will be lifted for this user; unix time. If 0, "
+"then the user is restricted forever"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:1
+msgid "This object represents changes in the status of a chat member."
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#chatmemberupdated"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:5
+msgid "Chat the user belongs to"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:8
+msgid "Performer of the action, which resulted in the change"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:11
+msgid "Date the change was done in Unix time"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:14
+msgid "Previous information about the chat member"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:17
+msgid "New information about the chat member"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:20
+msgid ""
+"Optional. Chat invite link, which was used by the user to join the chat; "
+"for joining by invite link events only."
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:24
+msgid "Optional. True, if the user joined the chat via a chat folder invite link"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated:28
+msgid ":class:`telebot.types.ChatMemberUpdated`"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated.difference:1
+msgid ""
+"Get the difference between `old_chat_member` and `new_chat_member` as a "
+"dict in the following format {'parameter': [old_value, new_value]} E.g "
+"{'status': ['member', 'kicked'], 'until_date': [None, 1625055092]}"
+msgstr ""
+
+#: of telebot.types.ChatMemberUpdated.difference:6
+msgid "Dict of differences"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:1
+msgid ""
+"Describes actions that a non-administrator user is allowed to take in a "
+"chat."
+msgstr ""
+
+#: of telebot.types.ChatPermissions:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatpermissions"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:5
+msgid ""
+"Optional. True, if the user is allowed to send text messages, contacts, "
+"locations and venues"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:9
+msgid "Optional. True, if the user is allowed to send audios"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:12
+msgid "Optional. True, if the user is allowed to send documents"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:15
+msgid "Optional. True, if the user is allowed to send photos"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:18
+msgid "Optional. True, if the user is allowed to send videos"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:21
+msgid "Optional. True, if the user is allowed to send video notes"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:24
+msgid "Optional. True, if the user is allowed to send voice notes"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:27
+msgid ""
+"Optional. True, if the user is allowed to send polls, implies "
+"can_send_messages"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:30
+msgid ""
+"Optional. True, if the user is allowed to send animations, games, "
+"stickers and use inline bots"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:34
+msgid ""
+"Optional. True, if the user is allowed to add web page previews to their "
+"messages"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:38
+msgid ""
+"Optional. True, if the user is allowed to change the chat title, photo "
+"and other settings. Ignored in public supergroups"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:42
+msgid "Optional. True, if the user is allowed to invite new users to the chat"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:45
+msgid ""
+"Optional. True, if the user is allowed to pin messages. Ignored in public"
+" supergroups"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:48
+msgid ""
+"Optional. True, if the user is allowed to create forum topics. If omitted"
+" defaults to the value of can_pin_messages"
+msgstr ""
+
+#: of telebot.types.ChatPermissions:52 telebot.types.Message:27
+#: telebot.types.Message:30 telebot.types.Message:37 telebot.types.Message:40
+#: telebot.types.Message:43
+msgid "deprecated."
+msgstr ""
+
+#: of telebot.types.ChatPermissions:56
+msgid ":class:`telebot.types.ChatPermissions`"
+msgstr ""
+
+#: of telebot.types.ChatPhoto:1
+msgid "This object represents a chat photo."
+msgstr ""
+
+#: of telebot.types.ChatPhoto:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#chatphoto"
+msgstr ""
+
+#: of telebot.types.ChatPhoto:5
+msgid ""
+"File identifier of small (160x160) chat photo. This file_id can be used "
+"only for photo download and only for as long as the photo is not changed."
+msgstr ""
+
+#: of telebot.types.ChatPhoto:9
+msgid ""
+"Unique file identifier of small (160x160) chat photo, which is supposed "
+"to be the same over time and for different bots. Can't be used to "
+"download or reuse the file."
+msgstr ""
+
+#: of telebot.types.ChatPhoto:13
+msgid ""
+"File identifier of big (640x640) chat photo. This file_id can be used "
+"only for photo download and only for as long as the photo is not changed."
+msgstr ""
+
+#: of telebot.types.ChatPhoto:17
+msgid ""
+"Unique file identifier of big (640x640) chat photo, which is supposed to "
+"be the same over time and for different bots. Can't be used to download "
+"or reuse the file."
+msgstr ""
+
+#: of telebot.types.ChatPhoto:22
+msgid ":class:`telebot.types.ChatPhoto`"
+msgstr ""
+
+#: of telebot.types.ChatShared:1
+msgid ""
+"This object contains information about the chat whose identifier was "
+"shared with the bot using a `telebot.types.KeyboardButtonRequestChat` "
+"button."
+msgstr ""
+
+#: of telebot.types.ChatShared:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#Chatshared"
+msgstr ""
+
+#: of telebot.types.ChatShared:6
+msgid "identifier of the request"
+msgstr ""
+
+#: of telebot.types.ChatShared:9
+msgid ""
+"Identifier of the shared chat. This number may have more than 32 "
+"significant bits and some programming languages may have "
+"difficulty/silent defects in interpreting it. But it has at most 52 "
+"significant bits, so a 64-bit integer or double-precision float type are "
+"safe for storing this identifier. The bot may not have access to the chat"
+" and could be unable to use this identifier, unless the chat is already "
+"known to the bot by some other means."
+msgstr ""
+
+#: of telebot.types.ChatShared:16
+msgid ":class:`telebot.types.ChatShared`"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:1
+msgid ""
+"Represents a result of an inline query that was chosen by the user and "
+"sent to their chat partner."
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#choseninlineresult"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:5
+msgid "The unique identifier for the result that was chosen"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:8
+msgid "The user that chose the result"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:11
+msgid "Optional. Sender location, only for bots that require user location"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:14
+msgid ""
+"Optional. Identifier of the sent inline message. Available only if there "
+"is an inline keyboard attached to the message. Will be also received in "
+"callback queries and can be used to edit the message."
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:18
+msgid "The query that was used to obtain the result"
+msgstr ""
+
+#: of telebot.types.ChosenInlineResult:22
+msgid ":class:`telebot.types.ChosenInlineResult`"
+msgstr ""
+
+#: of telebot.types.Contact:1
+msgid "This object represents a phone contact."
+msgstr ""
+
+#: of telebot.types.Contact:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#contact"
+msgstr ""
+
+#: of telebot.types.Contact:5 telebot.types.InlineQueryResultContact:11
+#: telebot.types.InputContactMessageContent:5
+msgid "Contact's phone number"
+msgstr ""
+
+#: of telebot.types.Contact:8 telebot.types.InlineQueryResultContact:14
+#: telebot.types.InputContactMessageContent:8
+msgid "Contact's first name"
+msgstr ""
+
+#: of telebot.types.Contact:11 telebot.types.InlineQueryResultContact:17
+#: telebot.types.InputContactMessageContent:11
+msgid "Optional. Contact's last name"
+msgstr ""
+
+#: of telebot.types.Contact:14
+msgid ""
+"Optional. Contact's user identifier in Telegram. This number may have "
+"more than 32 significant bits and some programming languages may have "
+"difficulty/silent defects in interpreting it. But it has at most 52 "
+"significant bits, so a 64-bit integer or double-precision float type are "
+"safe for storing this identifier."
+msgstr ""
+
+#: of telebot.types.Contact:19
+msgid "Optional. Additional data about the contact in the form of a vCard"
+msgstr ""
+
+#: of telebot.types.Contact:23
+msgid ":class:`telebot.types.Contact`"
+msgstr ""
+
+#: of telebot.types.Dice:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonSerializable`, "
+":py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonDeserializable`"
+msgstr ""
+
+#: of telebot.types.Dice:1
+msgid "This object represents an animated emoji that displays a random value."
+msgstr ""
+
+#: of telebot.types.Dice:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#dice"
+msgstr ""
+
+#: of telebot.types.Dice:5
+msgid "Emoji on which the dice throw animation is based"
+msgstr ""
+
+#: of telebot.types.Dice:8
+msgid ""
+"Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and "
+"“⚽” base emoji, 1-64 for “🎰” base emoji"
+msgstr ""
+
+#: of telebot.types.Dice:12
+msgid ":class:`telebot.types.Dice`"
+msgstr ""
+
+#: of telebot.types.Dictionaryable:1 telebot.types.InputFile:1
+#: telebot.types.JsonDeserializable:1 telebot.types.JsonSerializable:1
+msgid "Bases: :py:class:`object`"
+msgstr ""
+
+#: of telebot.types.Dictionaryable:1
+msgid ""
+"Subclasses of this class are guaranteed to be able to be converted to "
+"dictionary. All subclasses of this class must override to_dict."
+msgstr ""
+
+#: of telebot.types.Document:1
+msgid ""
+"This object represents a general file (as opposed to photos, voice "
+"messages and audio files)."
+msgstr ""
+
+#: of telebot.types.Document:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#document"
+msgstr ""
+
+#: of telebot.types.Document:12
+msgid "Optional. Document thumbnail as defined by sender"
+msgstr ""
+
+#: of telebot.types.Document:27
+msgid ":class:`telebot.types.Document`"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:1
+msgid ""
+"This object contains information about a message that is being replied "
+"to, which may come from another chat or forum topic."
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#externalreplyinfo"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:6
+msgid "Origin of the message replied to by the given message"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:9
+msgid ""
+"Optional. Chat the original message belongs to. Available only if the "
+"chat is a supergroup or a channel."
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:12
+msgid ""
+"Optional. Unique message identifier inside the original chat. Available "
+"only if the original chat is a supergroup or a channel."
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:15
+msgid ""
+"Optional. Options used for link preview generation for the original "
+"message, if it is a text message"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:18
+msgid "Optional. Message is an animation, information about the animation"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:21 telebot.types.Message:97
+msgid "Optional. Message is an audio file, information about the file"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:24 telebot.types.Message:100
+msgid "Optional. Message is a general file, information about the file"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:27 telebot.types.Message:103
+msgid "Optional. Message is a photo, available sizes of the photo"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:30 telebot.types.Message:106
+msgid "Optional. Message is a sticker, information about the sticker"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:33 telebot.types.Message:109
+msgid "Optional. Message is a forwarded story"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:36 telebot.types.Message:112
+msgid "Optional. Message is a video, information about the video"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:39 telebot.types.Message:115
+msgid "Optional. Message is a video note, information about the video message"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:42 telebot.types.Message:118
+msgid "Optional. Message is a voice message, information about the file"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:45 telebot.types.Message:128
+msgid "Optional. True, if the message media is covered by a spoiler animation"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:48 telebot.types.Message:131
+msgid "Optional. Message is a shared contact, information about the contact"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:51 telebot.types.Message:134
+msgid "Optional. Message is a dice with random value"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:54 telebot.types.Message:137
+msgid ""
+"Optional. Message is a game, information about the game. More about games"
+" »"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:57
+msgid "Optional. Message is a scheduled giveaway, information about the giveaway"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:60
+msgid "Optional. A giveaway with public winners was completed"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:63 telebot.types.Message:200
+msgid ""
+"Optional. Message is an invoice for a payment, information about the "
+"invoice. More about payments »"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:66 telebot.types.Message:147
+msgid "Optional. Message is a shared location, information about the location"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:69 telebot.types.Message:140
+msgid "Optional. Message is a native poll, information about the poll"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:72
+msgid "Optional. Message is a venue, information about the venue"
+msgstr ""
+
+#: of telebot.types.ExternalReplyInfo:76
+msgid ":class:`ExternalReplyInfo`"
+msgstr ""
+
+#: of telebot.types.File:1
+msgid ""
+"This object represents a file ready to be downloaded. The file can be "
+"downloaded via the link "
+"https://api.telegram.org/file/bot/. It is guaranteed "
+"that the link will be valid for at least 1 hour. When the link expires, a"
+" new one can be requested by calling getFile."
+msgstr ""
+
+#: of telebot.types.File:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#file"
+msgstr ""
+
+#: of telebot.types.File:17
+msgid ""
+"Optional. File path. Use "
+"https://api.telegram.org/file/bot/ to get the file."
+msgstr ""
+
+#: of telebot.types.File:22
+msgid ":class:`telebot.types.File`"
+msgstr ""
+
+#: of telebot.types.ForceReply:1 telebot.types.ReplyKeyboardMarkup:1
+#: telebot.types.ReplyKeyboardRemove:1 telebot.types.ShippingOption:1
+msgid "Bases: :py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.ForceReply:1
+msgid ""
+"Upon receiving a message with this object, Telegram clients will display "
+"a reply interface to the user (act as if the user has selected the bot's "
+"message and tapped 'Reply'). This can be extremely useful if you want to "
+"create user-friendly step-by-step interfaces without having to sacrifice "
+"privacy mode."
+msgstr ""
+
+#: of telebot.types.ForceReply:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#forcereply"
+msgstr ""
+
+#: of telebot.types.ForceReply:5
+msgid ""
+"Shows reply interface to the user, as if they manually selected the bot's"
+" message and tapped 'Reply'"
+msgstr ""
+
+#: of telebot.types.ForceReply:9
+msgid ""
+"Optional. The placeholder to be shown in the input field when the reply "
+"is active; 1-64 characters"
+msgstr ""
+
+#: of telebot.types.ForceReply:13
+msgid ""
+"Optional. Use this parameter if you want to force reply from specific "
+"users only. Targets: 1) users that are @mentioned in the text of the "
+"Message object; 2) if the bot's message is a reply (has "
+"reply_to_message_id), sender of the original message."
+msgstr ""
+
+#: of telebot.types.ForceReply:19
+msgid ":class:`telebot.types.ForceReply`"
+msgstr ""
+
+#: of telebot.types.ForumTopic:1
+msgid "This object represents a forum topic."
+msgstr ""
+
+#: of telebot.types.ForumTopic:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#forumtopic"
+msgstr ""
+
+#: of telebot.types.ForumTopic:5
+msgid "Unique identifier of the forum topic"
+msgstr ""
+
+#: of telebot.types.ForumTopic:8 telebot.types.ForumTopicCreated:5
+msgid "Name of the topic"
+msgstr ""
+
+#: of telebot.types.ForumTopic:11 telebot.types.ForumTopicCreated:8
+msgid "Color of the topic icon in RGB format"
+msgstr ""
+
+#: of telebot.types.ForumTopic:14 telebot.types.ForumTopicCreated:11
+msgid "Optional. Unique identifier of the custom emoji shown as the topic icon"
+msgstr ""
+
+#: of telebot.types.ForumTopic:18
+msgid ":class:`telebot.types.ForumTopic`"
+msgstr ""
+
+#: of telebot.types.ForumTopicClosed:1
+msgid ""
+"This object represents a service message about a forum topic closed in "
+"the chat. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.ForumTopicClosed:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#forumtopicclosed"
+msgstr ""
+
+#: of telebot.types.ForumTopicCreated:1
+msgid ""
+"This object represents a service message about a new forum topic created "
+"in the chat."
+msgstr ""
+
+#: of telebot.types.ForumTopicCreated:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#forumtopiccreated"
+msgstr ""
+
+#: of telebot.types.ForumTopicCreated:15
+msgid ":class:`telebot.types.ForumTopicCreated`"
+msgstr ""
+
+#: of telebot.types.ForumTopicEdited:1
+msgid "This object represents a service message about an edited forum topic."
+msgstr ""
+
+#: of telebot.types.ForumTopicEdited:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#forumtopicedited"
+msgstr ""
+
+#: of telebot.types.ForumTopicEdited:5
+msgid "Optional, Name of the topic(if updated)"
+msgstr ""
+
+#: of telebot.types.ForumTopicEdited:8
+msgid ""
+"Optional. New identifier of the custom emoji shown as the topic icon, if "
+"it was edited; an empty string if the icon was removed"
+msgstr ""
+
+#: of telebot.types.ForumTopicReopened:1
+msgid ""
+"This object represents a service message about a forum topic reopened in "
+"the chat. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.ForumTopicReopened:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#forumtopicreopened"
+msgstr ""
+
+#: of telebot.types.Game:1
+msgid ""
+"This object represents a game. Use BotFather to create and edit games, "
+"their short names will act as unique identifiers."
+msgstr ""
+
+#: of telebot.types.Game:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#game"
+msgstr ""
+
+#: of telebot.types.Game:5
+msgid "Title of the game"
+msgstr ""
+
+#: of telebot.types.Game:8
+msgid "Description of the game"
+msgstr ""
+
+#: of telebot.types.Game:11
+msgid "Photo that will be displayed in the game message in chats."
+msgstr ""
+
+#: of telebot.types.Game:14
+msgid ""
+"Optional. Brief description of the game or high scores included in the "
+"game message. Can be automatically edited to include current high scores "
+"for the game when the bot calls setGameScore, or manually edited using "
+"editMessageText. 0-4096 characters."
+msgstr ""
+
+#: of telebot.types.Game:19
+msgid ""
+"Optional. Special entities that appear in text, such as usernames, URLs, "
+"bot commands, etc."
+msgstr ""
+
+#: of telebot.types.Game:22
+msgid ""
+"Optional. Animation that will be displayed in the game message in chats. "
+"Upload via BotFather"
+msgstr ""
+
+#: of telebot.types.Game:26
+msgid ":class:`telebot.types.Game`"
+msgstr ""
+
+#: of telebot.types.Game.parse_entities:1
+msgid "Parse the message entity array into a list of MessageEntity objects"
+msgstr ""
+
+#: of telebot.types.Game.parse_photo:1
+msgid "Parse the photo array into a list of PhotoSize objects"
+msgstr ""
+
+#: of telebot.types.GameHighScore:1
+msgid "This object represents one row of the high scores table for a game."
+msgstr ""
+
+#: of telebot.types.GameHighScore:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#gamehighscore"
+msgstr ""
+
+#: of telebot.types.GameHighScore:5
+msgid "Position in high score table for the game"
+msgstr ""
+
+#: of telebot.types.GameHighScore:8
+msgid "User"
+msgstr ""
+
+#: of telebot.types.GameHighScore:11
+msgid "Score"
+msgstr ""
+
+#: of telebot.types.GameHighScore:15
+msgid ":class:`telebot.types.GameHighScore`"
+msgstr ""
+
+#: of telebot.types.GeneralForumTopicHidden:1
+msgid ""
+"This object represents a service message about General forum topic hidden"
+" in the chat. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.GeneralForumTopicHidden:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#generalforumtopichidden"
+msgstr ""
+
+#: of telebot.types.GeneralForumTopicUnhidden:1
+msgid ""
+"This object represents a service message about General forum topic "
+"unhidden in the chat. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.GeneralForumTopicUnhidden:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#generalforumtopicunhidden"
+msgstr ""
+
+#: of telebot.types.Giveaway:1
+msgid "This object represents a message about a scheduled giveaway."
+msgstr ""
+
+#: of telebot.types.Giveaway:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#giveaway"
+msgstr ""
+
+#: of telebot.types.Giveaway:5
+msgid "The list of chats which the user must join to participate in the giveaway"
+msgstr ""
+
+#: of telebot.types.Giveaway:8
+msgid ""
+"Point in time (Unix timestamp) when winners of the giveaway will be "
+"selected"
+msgstr ""
+
+#: of telebot.types.Giveaway:11
+msgid ""
+"The number of users which are supposed to be selected as winners of the "
+"giveaway"
+msgstr ""
+
+#: of telebot.types.Giveaway:14
+msgid ""
+"Optional. True, if only users who join the chats after the giveaway "
+"started should be eligible to win"
+msgstr ""
+
+#: of telebot.types.Giveaway:17
+msgid ""
+"Optional. True, if the list of giveaway winners will be visible to "
+"everyone"
+msgstr ""
+
+#: of telebot.types.Giveaway:20 telebot.types.GiveawayWinners:35
+msgid "Optional. Description of additional giveaway prize"
+msgstr ""
+
+#: of telebot.types.Giveaway:23
+msgid ""
+"Optional. A list of two-letter ISO 3166-1 alpha-2 country codes "
+"indicating the countries from which eligible users for the giveaway must "
+"come. If empty, then all users can participate in the giveaway."
+msgstr ""
+
+#: of telebot.types.Giveaway:26 telebot.types.GiveawayWinners:23
+msgid ""
+"Optional. The number of months the Telegram Premium subscription won from"
+" the giveaway will be active for"
+msgstr ""
+
+#: of telebot.types.Giveaway:30
+msgid ":class:`Giveaway`"
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:1
+msgid ""
+"This object represents a service message about the completion of a "
+"giveaway without public winners."
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#giveawaycompleted"
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:5
+msgid "Number of winners in the giveaway"
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:8 telebot.types.GiveawayWinners:26
+msgid "Optional. Number of undistributed prizes"
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:11
+msgid ""
+"Optional. Message with the giveaway that was completed, if it wasn't "
+"deleted"
+msgstr ""
+
+#: of telebot.types.GiveawayCompleted:15
+msgid ":class:`GiveawayCompleted`"
+msgstr ""
+
+#: of telebot.types.GiveawayCreated:1
+msgid ""
+"This object represents a service message about the creation of a "
+"scheduled giveaway. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:1
+msgid ""
+"This object represents a message about the completion of a giveaway with "
+"public winners."
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#giveawaywinners"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:5
+msgid "The chat that created the giveaway"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:8
+msgid "Identifier of the messsage with the giveaway in the chat"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:11
+msgid "Point in time (Unix timestamp) when winners of the giveaway were selected"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:14
+msgid "Total number of winners in the giveaway"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:17
+msgid "List of up to 100 winners of the giveaway"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:20
+msgid ""
+"Optional. The number of other chats the user had to join in order to be "
+"eligible for the giveaway"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:29
+msgid ""
+"Optional. True, if only users who had joined the chats after the giveaway"
+" started were eligible to win"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:32
+msgid ""
+"Optional. True, if the giveaway was canceled because the payment for it "
+"was refunded"
+msgstr ""
+
+#: of telebot.types.GiveawayWinners:39
+msgid ":class:`GiveawayWinners`"
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:1
+msgid ""
+"This object describes a message that was deleted or is otherwise "
+"inaccessible to the bot."
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#inaccessiblemessage"
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:5
+msgid "Chat the message belonged to"
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:8 telebot.types.MessageOriginChannel:6
+#: telebot.types.MessageReactionCountUpdated:8
+msgid "Unique message identifier inside the chat"
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:11
+msgid ""
+"Always 0. The field can be used to differentiate regular and inaccessible"
+" messages."
+msgstr ""
+
+#: of telebot.types.InaccessibleMessage:15
+msgid ":class:`InaccessibleMessage`"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:1 telebot.types.InlineKeyboardMarkup:1
+#: telebot.types.LoginUrl:1 telebot.types.MessageEntity:1
+msgid ""
+"Bases: :py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonSerializable`, "
+":py:class:`telebot.types.JsonDeserializable`"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:1
+msgid ""
+"This object represents one button of an inline keyboard. You must use "
+"exactly one of the optional fields."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:3
+#: telebot.types.SwitchInlineQueryChosenChat:4
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinekeyboardbutton"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:5
+#: telebot.types.InlineQueryResultsButton:6
+msgid "Label text on the button"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:8
+msgid ""
+"Optional. HTTP or tg:// URL to be opened when the button is pressed. "
+"Links tg://user?id= can be used to mention a user by their ID "
+"without using a username, if this is allowed by their privacy settings."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:12
+msgid ""
+"Optional. Data to be sent in a callback query to the bot when button is "
+"pressed, 1-64 bytes"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:15
+msgid ""
+"Optional. Description of the Web App that will be launched when the user "
+"presses the button. The Web App will be able to send an arbitrary message"
+" on behalf of the user using the method answerWebAppQuery. Available only"
+" in private chats between a user and the bot."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:20
+msgid ""
+"Optional. An HTTPS URL used to automatically authorize the user. Can be "
+"used as a replacement for the Telegram Login Widget."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:24
+msgid ""
+"Optional. If set, pressing the button will prompt the user to select one "
+"of their chats, open that chat and insert the bot's username and the "
+"specified inline query in the input field. May be empty, in which case "
+"just the bot's username will be inserted.Note: This offers an easy way "
+"for users to start using your bot in inline mode when they are currently "
+"in a private chat with it. Especially useful when combined with "
+"switch_pm… actions - in this case the user will be automatically returned"
+" to the chat they switched from, skipping the chat selection screen."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:31
+msgid ""
+"Optional. If set, pressing the button will insert the bot's username and "
+"the specified inline query in the current chat's input field. May be "
+"empty, in which case only the bot's username will be inserted.This offers"
+" a quick way for the user to open your bot in inline mode in the same "
+"chat - good for selecting something from multiple options."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:37
+msgid ""
+"Optional. If set, pressing the button will prompt the user to select one "
+"of their chats of the specified type, open that chat and insert the bot's"
+" username and the specified inline query in the input field"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:41
+msgid ""
+"Optional. Description of the game that will be launched when the user "
+"presses the button. NOTE: This type of button must always be the first "
+"button in the first row."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:45
+msgid ""
+"Optional. Specify True, to send a Pay button. NOTE: This type of button "
+"must always be the first button in the first row and can only be used in "
+"invoice messages."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardButton:50
+msgid ":class:`telebot.types.InlineKeyboardButton`"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:1
+msgid ""
+"This object represents an inline keyboard that appears right next to the "
+"message it belongs to."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:4
+msgid "It is recommended to use :meth:`telebot.util.quick_markup` instead."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:6
+msgid "Example of a custom keyboard with buttons."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:19
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinekeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:21
+msgid ""
+":obj:`list` of button rows, each represented by an :obj:`list` of "
+":class:`telebot.types.InlineKeyboardButton` objects"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:25
+msgid "number of :class:`telebot.types.InlineKeyboardButton` objects on each row"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup:29
+#: telebot.types.InlineKeyboardMarkup.add:17
+#: telebot.types.InlineKeyboardMarkup.row:12
+msgid ":class:`telebot.types.InlineKeyboardMarkup`"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.add:1
+msgid "This method adds buttons to the keyboard without exceeding row_width."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.add:3
+msgid ""
+"E.g. InlineKeyboardMarkup.add(\"A\", \"B\", \"C\") yields the json "
+"result: {keyboard: [[\"A\"], [\"B\"], [\"C\"]]} when row_width is set to "
+"1. When row_width is set to 2, the result: {keyboard: [[\"A\", \"B\"], "
+"[\"C\"]]} See https://core.telegram.org/bots/api#inlinekeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.add:10
+#: telebot.types.InlineKeyboardMarkup.row:8
+msgid "Array of InlineKeyboardButton to append to the keyboard"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.add:13
+#: telebot.types.ReplyKeyboardMarkup.add:10
+msgid "width of row"
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.add:16
+#: telebot.types.InlineKeyboardMarkup.row:11
+#: telebot.types.ReplyKeyboardMarkup.add:13
+#: telebot.types.ReplyKeyboardMarkup.row:8
+msgid "self, to allow function chaining."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.row:1
+msgid ""
+"Adds a list of InlineKeyboardButton to the keyboard. This method does not"
+" consider row_width."
+msgstr ""
+
+#: of telebot.types.InlineKeyboardMarkup.row:4
+msgid ""
+"InlineKeyboardMarkup.row(\"A\").row(\"B\", \"C\").to_json() outputs: "
+"'{keyboard: [[\"A\"], [\"B\", \"C\"]]}' See "
+"https://core.telegram.org/bots/api#inlinekeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.InlineQuery:1
+msgid ""
+"This object represents an incoming inline query. When the user sends an "
+"empty query, your bot could return some default or trending results."
+msgstr ""
+
+#: of telebot.types.InlineQuery:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#inlinequery"
+msgstr ""
+
+#: of telebot.types.InlineQuery:11
+msgid "Text of the query (up to 256 characters)"
+msgstr ""
+
+#: of telebot.types.InlineQuery:14
+msgid "Offset of the results to be returned, can be controlled by the bot"
+msgstr ""
+
+#: of telebot.types.InlineQuery:17
+msgid ""
+"Optional. Type of the chat from which the inline query was sent. Can be "
+"either “sender” for a private chat with the inline query sender, "
+"“private”, “group”, “supergroup”, or “channel”. The chat type should be "
+"always known for requests sent from official clients and most third-party"
+" clients, unless the request was sent from a secret chat"
+msgstr ""
+
+#: of telebot.types.InlineQuery:23
+msgid "Optional. Sender location, only for bots that request user location"
+msgstr ""
+
+#: of telebot.types.InlineQuery:27
+msgid ":class:`telebot.types.InlineQuery`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:1
+#: telebot.types.InlineQueryResultAudio:1
+#: telebot.types.InlineQueryResultContact:1
+#: telebot.types.InlineQueryResultDocument:1
+#: telebot.types.InlineQueryResultGame:1 telebot.types.InlineQueryResultGif:1
+#: telebot.types.InlineQueryResultLocation:1
+#: telebot.types.InlineQueryResultMpeg4Gif:1
+#: telebot.types.InlineQueryResultPhoto:1
+#: telebot.types.InlineQueryResultVenue:1
+#: telebot.types.InlineQueryResultVideo:1
+#: telebot.types.InlineQueryResultVoice:1
+msgid "Bases: :py:class:`telebot.types.InlineQueryResultBase`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:1
+msgid "Represents a link to an article or web page."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultarticle"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:5
+msgid "Type of the result, must be article"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:8
+#: telebot.types.InlineQueryResultContact:8
+#: telebot.types.InlineQueryResultLocation:8
+#: telebot.types.InlineQueryResultVenue:8
+msgid "Unique identifier for this result, 1-64 Bytes"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:11
+msgid "Title of the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:14
+msgid "Content of the message to be sent"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:17
+#: telebot.types.InlineQueryResultAudio:34
+#: telebot.types.InlineQueryResultCachedAudio:25
+#: telebot.types.InlineQueryResultCachedDocument:31
+#: telebot.types.InlineQueryResultCachedGif:27
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:27
+#: telebot.types.InlineQueryResultCachedPhoto:31
+#: telebot.types.InlineQueryResultCachedSticker:14
+#: telebot.types.InlineQueryResultCachedVideo:31
+#: telebot.types.InlineQueryResultCachedVoice:28
+#: telebot.types.InlineQueryResultContact:23
+#: telebot.types.InlineQueryResultDocument:34
+#: telebot.types.InlineQueryResultGame:14 telebot.types.InlineQueryResultGif:43
+#: telebot.types.InlineQueryResultLocation:35
+#: telebot.types.InlineQueryResultMpeg4Gif:43
+#: telebot.types.InlineQueryResultPhoto:40
+#: telebot.types.InlineQueryResultVenue:36
+#: telebot.types.InlineQueryResultVideo:46
+#: telebot.types.InlineQueryResultVoice:31
+msgid "Optional. Inline keyboard attached to the message"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:20
+msgid "Optional. URL of the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:23
+msgid "Optional. Pass True, if you don't want the URL to be shown in the message"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:26
+#: telebot.types.InlineQueryResultCachedDocument:17
+#: telebot.types.InlineQueryResultCachedPhoto:17
+#: telebot.types.InlineQueryResultCachedVideo:17
+#: telebot.types.InlineQueryResultDocument:31
+#: telebot.types.InlineQueryResultPhoto:26
+#: telebot.types.InlineQueryResultVideo:43
+msgid "Optional. Short description of the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:29
+#: telebot.types.InlineQueryResultContact:29
+#: telebot.types.InlineQueryResultLocation:41
+#: telebot.types.InlineQueryResultVenue:42
+msgid "Optional. Url of the thumbnail for the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:32
+#: telebot.types.InlineQueryResultContact:32
+#: telebot.types.InlineQueryResultDocument:43
+#: telebot.types.InlineQueryResultLocation:44
+#: telebot.types.InlineQueryResultVenue:45
+msgid "Optional. Thumbnail width"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:35
+#: telebot.types.InlineQueryResultContact:35
+#: telebot.types.InlineQueryResultDocument:46
+#: telebot.types.InlineQueryResultLocation:47
+#: telebot.types.InlineQueryResultVenue:48
+msgid "Optional. Thumbnail height"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultArticle:39
+msgid ":class:`telebot.types.InlineQueryResultArticle`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:1
+msgid ""
+"Represents a link to an MP3 audio file. By default, this audio file will "
+"be sent by the user. Alternatively, you can use input_message_content to "
+"send a message with the specified content instead of the audio."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultaudio"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:5
+#: telebot.types.InlineQueryResultCachedAudio:5
+msgid "Type of the result, must be audio"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:8
+#: telebot.types.InlineQueryResultCachedAudio:8
+#: telebot.types.InlineQueryResultCachedDocument:8
+#: telebot.types.InlineQueryResultCachedGif:8
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:8
+#: telebot.types.InlineQueryResultCachedPhoto:8
+#: telebot.types.InlineQueryResultCachedSticker:8
+#: telebot.types.InlineQueryResultCachedVideo:8
+#: telebot.types.InlineQueryResultCachedVoice:8
+#: telebot.types.InlineQueryResultDocument:8
+#: telebot.types.InlineQueryResultGame:8 telebot.types.InlineQueryResultGif:8
+#: telebot.types.InlineQueryResultMpeg4Gif:8
+#: telebot.types.InlineQueryResultPhoto:8
+#: telebot.types.InlineQueryResultVideo:8
+#: telebot.types.InlineQueryResultVoice:8
+msgid "Unique identifier for this result, 1-64 bytes"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:11
+msgid "A valid URL for the audio file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:14
+msgid "Title"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:17
+#: telebot.types.InlineQueryResultCachedAudio:14
+#: telebot.types.InlineQueryResultCachedVoice:17
+#: telebot.types.InlineQueryResultVoice:17
+msgid "Optional. Caption, 0-1024 characters after entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:20
+#: telebot.types.InlineQueryResultCachedAudio:17
+#: telebot.types.InputMediaAudio:20
+msgid ""
+"Optional. Mode for parsing entities in the audio caption. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:24
+#: telebot.types.InlineQueryResultCachedAudio:21
+#: telebot.types.InlineQueryResultCachedDocument:27
+#: telebot.types.InlineQueryResultCachedGif:23
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:23
+#: telebot.types.InlineQueryResultCachedPhoto:27
+#: telebot.types.InlineQueryResultCachedVideo:27
+#: telebot.types.InlineQueryResultCachedVoice:24
+#: telebot.types.InlineQueryResultDocument:21
+#: telebot.types.InlineQueryResultGif:39
+#: telebot.types.InlineQueryResultMpeg4Gif:39
+#: telebot.types.InlineQueryResultPhoto:36
+#: telebot.types.InlineQueryResultVideo:30
+#: telebot.types.InlineQueryResultVoice:24 telebot.types.InputMediaAnimation:24
+#: telebot.types.InputMediaAudio:24 telebot.types.InputMediaDocument:24
+#: telebot.types.InputMediaPhoto:17 telebot.types.InputMediaVideo:24
+msgid ""
+"Optional. List of special entities that appear in the caption, which can "
+"be specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:28
+msgid "Optional. Performer"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:31
+msgid "Optional. Audio duration in seconds"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:37
+#: telebot.types.InlineQueryResultCachedAudio:28
+msgid "Optional. Content of the message to be sent instead of the audio"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultAudio:41
+msgid ":class:`telebot.types.InlineQueryResultAudio`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:1
+msgid ""
+"Bases: :py:class:`abc.ABC`, :py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:1
+msgid ""
+"This object represents one result of an inline query. Telegram clients "
+"currently support results of the following 20 types:"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:3
+msgid ":class:`InlineQueryResultCachedAudio`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:4
+msgid ":class:`InlineQueryResultCachedDocument`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:5
+msgid ":class:`InlineQueryResultCachedGif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:6
+msgid ":class:`InlineQueryResultCachedMpeg4Gif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:7
+msgid ":class:`InlineQueryResultCachedPhoto`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:8
+msgid ":class:`InlineQueryResultCachedSticker`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:9
+msgid ":class:`InlineQueryResultCachedVideo`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:10
+msgid ":class:`InlineQueryResultCachedVoice`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:11
+msgid ":class:`InlineQueryResultArticle`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:12
+msgid ":class:`InlineQueryResultAudio`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:13
+msgid ":class:`InlineQueryResultContact`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:14
+msgid ":class:`InlineQueryResultGame`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:15
+msgid ":class:`InlineQueryResultDocument`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:16
+msgid ":class:`InlineQueryResultGif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:17
+msgid ":class:`InlineQueryResultLocation`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:18
+msgid ":class:`InlineQueryResultMpeg4Gif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:19
+msgid ":class:`InlineQueryResultPhoto`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:20
+msgid ":class:`InlineQueryResultVenue`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:21
+msgid ":class:`InlineQueryResultVideo`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:22
+msgid ":class:`InlineQueryResultVoice`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultBase:24
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresult"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedAudio:1
+#: telebot.types.InlineQueryResultCachedDocument:1
+#: telebot.types.InlineQueryResultCachedGif:1
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:1
+#: telebot.types.InlineQueryResultCachedPhoto:1
+#: telebot.types.InlineQueryResultCachedSticker:1
+#: telebot.types.InlineQueryResultCachedVideo:1
+#: telebot.types.InlineQueryResultCachedVoice:1
+msgid "Bases: :py:class:`telebot.types.InlineQueryResultCachedBase`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedAudio:1
+msgid ""
+"Represents a link to an MP3 audio file stored on the Telegram servers. By"
+" default, this audio file will be sent by the user. Alternatively, you "
+"can use input_message_content to send a message with the specified "
+"content instead of the audio."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedAudio:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedaudio"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedAudio:11
+msgid "A valid file identifier for the audio file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedAudio:32
+msgid ":class:`telebot.types.InlineQueryResultCachedAudio`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedBase:1
+msgid "Base class of all InlineQueryResultCached* classes."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:1
+msgid ""
+"Represents a link to a file stored on the Telegram servers. By default, "
+"this file will be sent by the user with an optional caption. "
+"Alternatively, you can use input_message_content to send a message with "
+"the specified content instead of the file."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcacheddocument"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:5
+#: telebot.types.InlineQueryResultDocument:5
+msgid "Type of the result, must be document"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:11
+#: telebot.types.InlineQueryResultCachedVideo:14
+#: telebot.types.InlineQueryResultDocument:11
+#: telebot.types.InlineQueryResultVideo:20
+msgid "Title for the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:14
+msgid "A valid file identifier for the file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:20
+#: telebot.types.InlineQueryResultDocument:14
+#: telebot.types.InputMediaDocument:17
+msgid ""
+"Optional. Caption of the document to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:23
+#: telebot.types.InlineQueryResultDocument:17
+#: telebot.types.InputMediaDocument:20
+msgid ""
+"Optional. Mode for parsing entities in the document caption. See "
+"formatting options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:34
+#: telebot.types.InlineQueryResultDocument:37
+msgid "Optional. Content of the message to be sent instead of the file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedDocument:38
+msgid ":class:`telebot.types.InlineQueryResultCachedDocument`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:1
+msgid ""
+"Represents a link to an animated GIF file stored on the Telegram servers."
+" By default, this animated GIF file will be sent by the user with an "
+"optional caption. Alternatively, you can use input_message_content to "
+"send a message with specified content instead of the animation."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedgif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:5
+#: telebot.types.InlineQueryResultGif:5
+msgid "Type of the result, must be gif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:11
+msgid "A valid file identifier for the GIF file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:14
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:14
+#: telebot.types.InlineQueryResultCachedPhoto:14
+#: telebot.types.InlineQueryResultGif:30
+#: telebot.types.InlineQueryResultMpeg4Gif:30
+#: telebot.types.InlineQueryResultPhoto:23
+msgid "Optional. Title for the result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:17
+#: telebot.types.InlineQueryResultGif:33
+msgid ""
+"Optional. Caption of the GIF file to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:20
+#: telebot.types.InlineQueryResultCachedMpeg4Gif:20
+#: telebot.types.InlineQueryResultGif:36
+#: telebot.types.InlineQueryResultMpeg4Gif:36
+msgid ""
+"Optional. Mode for parsing entities in the caption. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:30
+#: telebot.types.InlineQueryResultGif:46
+msgid "Optional. Content of the message to be sent instead of the GIF animation"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedGif:34
+msgid ":class:`telebot.types.InlineQueryResultCachedGif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:1
+msgid ""
+"Represents a link to a video animation (H.264/MPEG-4 AVC video without "
+"sound) stored on the Telegram servers. By default, this animated MPEG-4 "
+"file will be sent by the user with an optional caption. Alternatively, "
+"you can use input_message_content to send a message with the specified "
+"content instead of the animation."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:5
+#: telebot.types.InlineQueryResultMpeg4Gif:5
+msgid "Type of the result, must be mpeg4_gif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:11
+msgid "A valid file identifier for the MPEG4 file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:17
+#: telebot.types.InlineQueryResultMpeg4Gif:33
+msgid ""
+"Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:30
+#: telebot.types.InlineQueryResultMpeg4Gif:46
+msgid "Optional. Content of the message to be sent instead of the video animation"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedMpeg4Gif:34
+msgid ":class:`telebot.types.InlineQueryResultCachedMpeg4Gif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:1
+msgid ""
+"Represents a link to a photo stored on the Telegram servers. By default, "
+"this photo will be sent by the user with an optional caption. "
+"Alternatively, you can use input_message_content to send a message with "
+"the specified content instead of the photo."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedphoto"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:5
+#: telebot.types.InlineQueryResultPhoto:5
+msgid "Type of the result, must be photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:11
+msgid "A valid file identifier of the photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:20
+#: telebot.types.InlineQueryResultPhoto:29 telebot.types.InputMediaPhoto:10
+msgid ""
+"Optional. Caption of the photo to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:23
+#: telebot.types.InlineQueryResultPhoto:32 telebot.types.InputMediaPhoto:13
+msgid ""
+"Optional. Mode for parsing entities in the photo caption. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:34
+#: telebot.types.InlineQueryResultPhoto:43
+msgid "Optional. Content of the message to be sent instead of the photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedPhoto:38
+msgid ":class:`telebot.types.InlineQueryResultCachedPhoto`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:1
+msgid ""
+"Represents a link to a sticker stored on the Telegram servers. By "
+"default, this sticker will be sent by the user. Alternatively, you can "
+"use input_message_content to send a message with the specified content "
+"instead of the sticker."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedsticker"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:5
+msgid "Type of the result, must be sticker"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:11
+msgid "A valid file identifier of the sticker"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:17
+msgid "Optional. Content of the message to be sent instead of the sticker"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedSticker:21
+msgid ":class:`telebot.types.InlineQueryResultCachedSticker`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:1
+msgid ""
+"Represents a link to a video file stored on the Telegram servers. By "
+"default, this video file will be sent by the user with an optional "
+"caption. Alternatively, you can use input_message_content to send a "
+"message with the specified content instead of the video."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedvideo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:5
+#: telebot.types.InlineQueryResultVideo:5
+msgid "Type of the result, must be video"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:11
+msgid "A valid file identifier for the video file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:20
+#: telebot.types.InlineQueryResultVideo:23 telebot.types.InputMediaVideo:17
+msgid ""
+"Optional. Caption of the video to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:23
+#: telebot.types.InlineQueryResultVideo:26 telebot.types.InputMediaVideo:20
+msgid ""
+"Optional. Mode for parsing entities in the video caption. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:34
+msgid "Optional. Content of the message to be sent instead of the video"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVideo:38
+msgid ":class:`telebot.types.InlineQueryResultCachedVideo`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:1
+msgid ""
+"Represents a link to a voice message stored on the Telegram servers. By "
+"default, this voice message will be sent by the user. Alternatively, you "
+"can use input_message_content to send a message with the specified "
+"content instead of the voice message."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcachedvoice"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:5
+#: telebot.types.InlineQueryResultVoice:5
+msgid "Type of the result, must be voice"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:11
+msgid "A valid file identifier for the voice message"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:14
+msgid "Voice message title"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:20
+#: telebot.types.InlineQueryResultVoice:20
+msgid ""
+"Optional. Mode for parsing entities in the voice message caption. See "
+"formatting options for more details."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:31
+msgid "Optional. Content of the message to be sent instead of the voice message"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultCachedVoice:35
+msgid ":class:`telebot.types.InlineQueryResultCachedVoice`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:1
+msgid ""
+"Represents a contact with a phone number. By default, this contact will "
+"be sent by the user. Alternatively, you can use input_message_content to "
+"send a message with the specified content instead of the contact."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultcontact"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:5
+msgid "Type of the result, must be contact"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:20
+#: telebot.types.InputContactMessageContent:14
+msgid ""
+"Optional. Additional data about the contact in the form of a vCard, "
+"0-2048 bytes"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:26
+msgid "Optional. Content of the message to be sent instead of the contact"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultContact:39
+msgid ":class:`telebot.types.InlineQueryResultContact`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:1
+msgid ""
+"Represents a link to a file. By default, this file will be sent by the "
+"user with an optional caption. Alternatively, you can use "
+"input_message_content to send a message with the specified content "
+"instead of the file. Currently, only .PDF and .ZIP files can be sent "
+"using this method."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultdocument"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:25
+msgid "A valid URL for the file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:28
+msgid ""
+"MIME type of the content of the file, either “application/pdf” or "
+"“application/zip”"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:40
+msgid "Optional. URL of the thumbnail (JPEG only) for the file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultDocument:50
+msgid ":class:`telebot.types.InlineQueryResultDocument`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGame:1
+msgid "Represents a Game."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGame:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultgame"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGame:5
+msgid "Type of the result, must be game"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGame:11
+msgid "Short name of the game"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGame:18
+msgid ":class:`telebot.types.InlineQueryResultGame`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:1
+msgid ""
+"Represents a link to an animated GIF file. By default, this animated GIF "
+"file will be sent by the user with optional caption. Alternatively, you "
+"can use input_message_content to send a message with the specified "
+"content instead of the animation."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultgif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:11
+msgid "A valid URL for the GIF file. File size must not exceed 1MB"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:14
+msgid "Optional. Width of the GIF"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:17
+msgid "Optional. Height of the GIF"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:20
+msgid "Optional. Duration of the GIF in seconds"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:23
+#: telebot.types.InlineQueryResultMpeg4Gif:23
+msgid ""
+"URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the "
+"result"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:26
+#: telebot.types.InlineQueryResultMpeg4Gif:26
+msgid ""
+"Optional. MIME type of the thumbnail, must be one of “image/jpeg”, "
+"“image/gif”, or “video/mp4”. Defaults to “image/jpeg”"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultGif:50
+msgid ":class:`telebot.types.InlineQueryResultGif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:1
+msgid ""
+"Represents a location on a map. By default, the location will be sent by "
+"the user. Alternatively, you can use input_message_content to send a "
+"message with the specified content instead of the location."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultlocation"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:5
+msgid "Type of the result, must be location"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:11
+msgid "Location latitude in degrees"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:14
+msgid "Location longitude in degrees"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:17
+msgid "Location title"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:20
+#: telebot.types.InputLocationMessageContent:11 telebot.types.Location:11
+msgid ""
+"Optional. The radius of uncertainty for the location, measured in meters;"
+" 0-1500"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:23
+#: telebot.types.InputLocationMessageContent:14
+msgid ""
+"Optional. Period in seconds for which the location can be updated, should"
+" be between 60 and 86400."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:27
+#: telebot.types.InputLocationMessageContent:18
+msgid ""
+"Optional. For live locations, a direction in which the user is moving, in"
+" degrees. Must be between 1 and 360 if specified."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:31
+#: telebot.types.InputLocationMessageContent:22
+msgid ""
+"Optional. For live locations, a maximum distance for proximity alerts "
+"about approaching another chat member, in meters. Must be between 1 and "
+"100000 if specified."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:38
+msgid "Optional. Content of the message to be sent instead of the location"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultLocation:51
+msgid ":class:`telebot.types.InlineQueryResultLocation`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:1
+msgid ""
+"Represents a link to a video animation (H.264/MPEG-4 AVC video without "
+"sound). By default, this animated MPEG-4 file will be sent by the user "
+"with optional caption. Alternatively, you can use input_message_content "
+"to send a message with the specified content instead of the animation."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:11
+msgid "A valid URL for the MPEG4 file. File size must not exceed 1MB"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:14
+#: telebot.types.InlineQueryResultVideo:34 telebot.types.InputMediaVideo:28
+msgid "Optional. Video width"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:17
+#: telebot.types.InlineQueryResultVideo:37 telebot.types.InputMediaVideo:31
+msgid "Optional. Video height"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:20
+#: telebot.types.InlineQueryResultVideo:40 telebot.types.InputMediaVideo:34
+msgid "Optional. Video duration in seconds"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultMpeg4Gif:50
+msgid ":class:`telebot.types.InlineQueryResultMpeg4Gif`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:1
+msgid ""
+"Represents a link to a photo. By default, this photo will be sent by the "
+"user with optional caption. Alternatively, you can use "
+"input_message_content to send a message with the specified content "
+"instead of the photo."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultphoto"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:11
+msgid ""
+"A valid URL of the photo. Photo must be in JPEG format. Photo size must "
+"not exceed 5MB"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:14
+msgid "URL of the thumbnail for the photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:17
+msgid "Optional. Width of the photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:20
+msgid "Optional. Height of the photo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultPhoto:47
+msgid ":class:`telebot.types.InlineQueryResultPhoto`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:1
+msgid ""
+"Represents a venue. By default, the venue will be sent by the user. "
+"Alternatively, you can use input_message_content to send a message with "
+"the specified content instead of the venue."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultvenue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:5
+msgid "Type of the result, must be venue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:11
+msgid "Latitude of the venue location in degrees"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:14
+msgid "Longitude of the venue location in degrees"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:17
+msgid "Title of the venue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:20
+#: telebot.types.InputVenueMessageContent:14 telebot.types.Venue:11
+msgid "Address of the venue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:23
+msgid "Optional. Foursquare identifier of the venue if known"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:26
+#: telebot.types.InputVenueMessageContent:20
+msgid ""
+"Optional. Foursquare type of the venue, if known. (For example, "
+"“arts_entertainment/default”, “arts_entertainment/aquarium” or "
+"“food/icecream”.)"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:30
+#: telebot.types.InputVenueMessageContent:24 telebot.types.Venue:21
+msgid "Optional. Google Places identifier of the venue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:33
+#: telebot.types.InputVenueMessageContent:27 telebot.types.Venue:24
+msgid "Optional. Google Places type of the venue. (See supported types.)"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:39
+msgid "Optional. Content of the message to be sent instead of the venue"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVenue:52
+msgid ":class:`telebot.types.InlineQueryResultVenue`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:1
+msgid ""
+"Represents a link to a page containing an embedded video player or a "
+"video file. By default, this video file will be sent by the user with an "
+"optional caption. Alternatively, you can use input_message_content to "
+"send a message with the specified content instead of the video."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultvideo"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:11
+msgid "A valid URL for the embedded video player or video file"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:14
+msgid "MIME type of the content of the video URL, “text/html” or “video/mp4”"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:17
+msgid "URL of the thumbnail (JPEG only) for the video"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:49
+msgid ""
+"Optional. Content of the message to be sent instead of the video. This "
+"field is required if InlineQueryResultVideo is used to send an HTML-page "
+"as a result (e.g., a YouTube video)."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVideo:54
+msgid ":class:`telebot.types.InlineQueryResultVideo`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:1
+msgid ""
+"Represents a link to a voice recording in an .OGG container encoded with "
+"OPUS. By default, this voice recording will be sent by the user. "
+"Alternatively, you can use input_message_content to send a message with "
+"the specified content instead of the the voice message."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultvoice"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:11
+msgid "A valid URL for the voice recording"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:14
+msgid "Recording title"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:28
+msgid "Optional. Recording duration in seconds"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:34
+msgid "Optional. Content of the message to be sent instead of the voice recording"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultVoice:38
+msgid ":class:`telebot.types.InlineQueryResultVoice`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:1 telebot.types.LabeledPrice:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonSerializable`, "
+":py:class:`telebot.types.Dictionaryable`"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:1
+msgid ""
+"This object represents a button to be shown above inline query results. "
+"You must use exactly one of the optional fields."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#inlinequeryresultsbutton"
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:9
+msgid ""
+"Optional. Description of the Web App that will be launched when the user "
+"presses the button. The Web App will be able to switch back to the inline"
+" mode using the method web_app_switch_inline_query inside the Web App."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:13
+msgid ""
+"Optional. Deep-linking parameter for the /start message sent to the bot "
+"when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ "
+"and - are allowed. Example: An inline bot that sends YouTube videos can "
+"ask the user to connect the bot to their YouTube account to adapt search "
+"results accordingly. To do this, it displays a 'Connect your YouTube "
+"account' button above the results, or even before showing any. The user "
+"presses the button, switches to a private chat with the bot and, in doing"
+" so, passes a start parameter that instructs the bot to return an OAuth "
+"link. Once done, the bot can offer a switch_inline button so that the "
+"user can easily return to the chat where they wanted to use the bot's "
+"inline capabilities."
+msgstr ""
+
+#: of telebot.types.InlineQueryResultsButton:23
+msgid ":class:`InlineQueryResultsButton`"
+msgstr ""
+
+#: of telebot.types.InputContactMessageContent:1
+#: telebot.types.InputInvoiceMessageContent:1
+#: telebot.types.InputLocationMessageContent:1
+#: telebot.types.InputTextMessageContent:1
+#: telebot.types.InputVenueMessageContent:1
+#: telebot.types.KeyboardButtonPollType:1
+#: telebot.types.KeyboardButtonRequestChat:1
+#: telebot.types.KeyboardButtonRequestUsers:1
+msgid "Bases: :py:class:`telebot.types.Dictionaryable`"
+msgstr ""
+
+#: of telebot.types.InputContactMessageContent:1
+msgid ""
+"Represents the content of a contact message to be sent as the result of "
+"an inline query."
+msgstr ""
+
+#: of telebot.types.InputContactMessageContent:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputcontactmessagecontent"
+msgstr ""
+
+#: of telebot.types.InputContactMessageContent:18
+msgid ":class:`telebot.types.InputContactMessageContent`"
+msgstr ""
+
+#: of telebot.types.InputFile:1
+msgid "A class to send files through Telegram Bot API."
+msgstr ""
+
+#: of telebot.types.InputFile:3
+msgid ""
+"You need to pass a file, which should be an instance of "
+":class:`io.IOBase` or :class:`pathlib.Path`, or :obj:`str`."
+msgstr ""
+
+#: of telebot.types.InputFile:6
+msgid ""
+"If you pass an :obj:`str` as a file, it will be opened and closed by the "
+"class."
+msgstr ""
+
+#: of telebot.types.InputFile:8
+msgid "A file to send."
+msgstr ""
+
+#: of telebot.types.InputFile:11
+msgid "Example on sending a file using this class"
+msgstr ""
+
+#: of telebot.types.InputFile.file:1
+msgid "File object."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:1
+msgid ""
+"Represents the content of an invoice message to be sent as the result of "
+"an inline query."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputinvoicemessagecontent"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:5
+msgid "Product name, 1-32 characters"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:8
+msgid "Product description, 1-255 characters"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:11
+msgid ""
+"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to "
+"the user, use for your internal processes."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:15
+msgid "Payment provider token, obtained via @BotFather"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:18
+msgid "Three-letter ISO 4217 currency code, see more on currencies"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:21
+msgid ""
+"Price breakdown, a JSON-serialized list of components (e.g. product "
+"price, tax, discount, delivery cost, delivery tax, bonus, etc.)"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:25
+msgid ""
+"Optional. The maximum accepted amount for tips in the smallest units of "
+"the currency (integer, not float/double). For example, for a maximum tip "
+"of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in "
+"currencies.json, it shows the number of digits past the decimal point for"
+" each currency (2 for the majority of currencies). Defaults to 0"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:31
+msgid ""
+"Optional. A JSON-serialized array of suggested amounts of tip in the "
+"smallest units of the currency (integer, not float/double). At most 4 "
+"suggested tip amounts can be specified. The suggested tip amounts must be"
+" positive, passed in a strictly increased order and must not exceed "
+"max_tip_amount."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:36
+msgid ""
+"Optional. A JSON-serialized object for data about the invoice, which will"
+" be shared with the payment provider. A detailed description of the "
+"required fields should be provided by the payment provider."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:40
+msgid ""
+"Optional. URL of the product photo for the invoice. Can be a photo of the"
+" goods or a marketing image for a service."
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:44
+msgid "Optional. Photo size in bytes"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:47
+msgid "Optional. Photo width"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:50
+msgid "Optional. Photo height"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:53
+msgid ""
+"Optional. Pass True, if you require the user's full name to complete the "
+"order"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:56
+msgid ""
+"Optional. Pass True, if you require the user's phone number to complete "
+"the order"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:59
+msgid ""
+"Optional. Pass True, if you require the user's email address to complete "
+"the order"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:62
+msgid ""
+"Optional. Pass True, if you require the user's shipping address to "
+"complete the order"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:66
+msgid "Optional. Pass True, if the user's phone number should be sent to provider"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:69
+msgid ""
+"Optional. Pass True, if the user's email address should be sent to "
+"provider"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:72
+msgid "Optional. Pass True, if the final price depends on the shipping method"
+msgstr ""
+
+#: of telebot.types.InputInvoiceMessageContent:76
+msgid ":class:`telebot.types.InputInvoiceMessageContent`"
+msgstr ""
+
+#: of telebot.types.InputLocationMessageContent:1
+msgid ""
+"Represents the content of a location message to be sent as the result of "
+"an inline query."
+msgstr ""
+
+#: of telebot.types.InputLocationMessageContent:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputlocationmessagecontent"
+msgstr ""
+
+#: of telebot.types.InputLocationMessageContent:5
+msgid "Latitude of the location in degrees"
+msgstr ""
+
+#: of telebot.types.InputLocationMessageContent:8
+msgid "Longitude of the location in degrees"
+msgstr ""
+
+#: of telebot.types.InputLocationMessageContent:27
+msgid ":class:`telebot.types.InputLocationMessageContent`"
+msgstr ""
+
+#: of telebot.types.InputMedia:1 telebot.types.InputSticker:1
+#: telebot.types.KeyboardButton:1
+msgid ""
+"Bases: :py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.InputMedia:1
+msgid ""
+"This object represents the content of a media message to be sent. It "
+"should be one of"
+msgstr ""
+
+#: of telebot.types.InputMedia:3
+msgid ":class:`InputMediaAnimation`"
+msgstr ""
+
+#: of telebot.types.InputMedia:4
+msgid ":class:`InputMediaDocument`"
+msgstr ""
+
+#: of telebot.types.InputMedia:5
+msgid ":class:`InputMediaAudio`"
+msgstr ""
+
+#: of telebot.types.InputMedia:6
+msgid ":class:`InputMediaPhoto`"
+msgstr ""
+
+#: of telebot.types.InputMedia:7
+msgid ":class:`InputMediaVideo`"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:1 telebot.types.InputMediaAudio:1
+#: telebot.types.InputMediaDocument:1 telebot.types.InputMediaPhoto:1
+#: telebot.types.InputMediaVideo:1
+msgid "Bases: :py:class:`telebot.types.InputMedia`"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:1
+msgid ""
+"Represents an animation file (GIF or H.264/MPEG-4 AVC video without "
+"sound) to be sent."
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputmediaanimation"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:5 telebot.types.InputMediaAudio:5
+#: telebot.types.InputMediaDocument:5 telebot.types.InputMediaPhoto:5
+#: telebot.types.InputMediaVideo:5
+msgid ""
+"File to send. Pass a file_id to send a file that exists on the Telegram "
+"servers (recommended), pass an HTTP URL for Telegram to get a file from "
+"the Internet, or pass “attach://” to upload a new one "
+"using multipart/form-data under name. More information"
+" on Sending Files »"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:10 telebot.types.InputMediaAudio:10
+#: telebot.types.InputMediaDocument:10 telebot.types.InputMediaVideo:10
+msgid ""
+"Optional. Thumbnail of the file sent; can be ignored if thumbnail "
+"generation for the file is supported server-side. The thumbnail should be"
+" in JPEG format and less than 200 kB in size. A thumbnail's width and "
+"height should not exceed 320. Ignored if the file is not uploaded using "
+"multipart/form-data. Thumbnails can't be reused and can be only uploaded "
+"as a new file, so you can pass “attach://” if the "
+"thumbnail was uploaded using multipart/form-data under "
+". More information on Sending Files »"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:17
+msgid ""
+"Optional. Caption of the animation to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:20
+msgid ""
+"Optional. Mode for parsing entities in the animation caption. See "
+"formatting options for more details."
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:28
+msgid "Optional. Animation width"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:31
+msgid "Optional. Animation height"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:34
+msgid "Optional. Animation duration in seconds"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:37
+msgid "Optional. True, if the uploaded animation is a spoiler"
+msgstr ""
+
+#: of telebot.types.InputMediaAnimation:41
+msgid ":class:`telebot.types.InputMediaAnimation`"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:1
+msgid "Represents an audio file to be treated as music to be sent."
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#inputmediaaudio"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:17
+msgid ""
+"Optional. Caption of the audio to be sent, 0-1024 characters after "
+"entities parsing"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:28
+msgid "Optional. Duration of the audio in seconds"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:31
+msgid "Optional. Performer of the audio"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:34
+msgid "Optional. Title of the audio"
+msgstr ""
+
+#: of telebot.types.InputMediaAudio:38
+msgid ":class:`telebot.types.InputMediaAudio`"
+msgstr ""
+
+#: of telebot.types.InputMediaDocument:1
+msgid "Represents a general file to be sent."
+msgstr ""
+
+#: of telebot.types.InputMediaDocument:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputmediadocument"
+msgstr ""
+
+#: of telebot.types.InputMediaDocument:28
+msgid ""
+"Optional. Disables automatic server-side content type detection for files"
+" uploaded using multipart/form-data. Always True, if the document is sent"
+" as part of an album."
+msgstr ""
+
+#: of telebot.types.InputMediaDocument:33
+msgid ":class:`telebot.types.InputMediaDocument`"
+msgstr ""
+
+#: of telebot.types.InputMediaPhoto:1
+msgid "Represents a photo to be sent."
+msgstr ""
+
+#: of telebot.types.InputMediaPhoto:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#inputmediaphoto"
+msgstr ""
+
+#: of telebot.types.InputMediaPhoto:21
+msgid "Optional. True, if the uploaded photo is a spoiler"
+msgstr ""
+
+#: of telebot.types.InputMediaPhoto:25
+msgid ":class:`telebot.types.InputMediaPhoto`"
+msgstr ""
+
+#: of telebot.types.InputMediaVideo:1
+msgid "Represents a video to be sent."
+msgstr ""
+
+#: of telebot.types.InputMediaVideo:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#inputmediavideo"
+msgstr ""
+
+#: of telebot.types.InputMediaVideo:37
+msgid "Optional. Pass True, if the uploaded video is suitable for streaming"
+msgstr ""
+
+#: of telebot.types.InputMediaVideo:40
+msgid "Optional. True, if the uploaded video is a spoiler"
+msgstr ""
+
+#: of telebot.types.InputMediaVideo:44
+msgid ":class:`telebot.types.InputMediaVideo`"
+msgstr ""
+
+#: of telebot.types.InputSticker:1
+msgid "This object describes a sticker to be added to a sticker set."
+msgstr ""
+
+#: of telebot.types.InputSticker:3
+msgid ""
+"The added sticker. Pass a file_id as a String to send a file that already"
+" exists on the Telegram servers, pass an HTTP URL as a String for "
+"Telegram to get a file from the Internet, or upload a new one using "
+"multipart/form-data. Animated and video stickers can't be uploaded via "
+"HTTP URL."
+msgstr ""
+
+#: of telebot.types.InputSticker:8
+msgid "One or more(up to 20) emoji(s) corresponding to the sticker"
+msgstr ""
+
+#: of telebot.types.InputSticker:11
+msgid ""
+"Optional. Position where the mask should be placed on faces. For “mask” "
+"stickers only."
+msgstr ""
+
+#: of telebot.types.InputSticker:14
+msgid ""
+"Optional. List of 0-20 search keywords for the sticker with total length "
+"of up to 64 characters. For “regular” and “custom_emoji” stickers only."
+msgstr ""
+
+#: of telebot.types.InputSticker:19
+msgid ":class:`telebot.types.InputSticker`"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:1
+msgid ""
+"Represents the content of a text message to be sent as the result of an "
+"inline query."
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputtextmessagecontent"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:5
+msgid "Text of the message to be sent, 1-4096 characters"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:8
+msgid ""
+"Optional. Mode for parsing entities in the message text. See formatting "
+"options for more details."
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:12
+msgid ""
+"Optional. List of special entities that appear in message text, which can"
+" be specified instead of parse_mode"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:16 telebot.types.KeyboardButton:25
+#: telebot.types.StickerSet:20
+msgid "deprecated"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:19
+msgid "Optional. Link preview generation options for the message"
+msgstr ""
+
+#: of telebot.types.InputTextMessageContent:23
+msgid ":class:`telebot.types.InputTextMessageContent`"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:1
+msgid ""
+"Represents the content of a venue message to be sent as the result of an "
+"inline query."
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#inputvenuemessagecontent"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:5
+msgid "Latitude of the venue in degrees"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:8
+msgid "Longitude of the venue in degrees"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:11 telebot.types.Venue:8
+msgid "Name of the venue"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:17
+msgid "Optional. Foursquare identifier of the venue, if known"
+msgstr ""
+
+#: of telebot.types.InputVenueMessageContent:31
+msgid ":class:`telebot.types.InputVenueMessageContent`"
+msgstr ""
+
+#: of telebot.types.Invoice:1
+msgid "This object contains basic information about an invoice."
+msgstr ""
+
+#: of telebot.types.Invoice:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#invoice"
+msgstr ""
+
+#: of telebot.types.Invoice:5
+msgid "Product name"
+msgstr ""
+
+#: of telebot.types.Invoice:8
+msgid "Product description"
+msgstr ""
+
+#: of telebot.types.Invoice:11
+msgid ""
+"Unique bot deep-linking parameter that can be used to generate this "
+"invoice"
+msgstr ""
+
+#: of telebot.types.Invoice:14 telebot.types.PreCheckoutQuery:11
+#: telebot.types.SuccessfulPayment:5
+msgid "Three-letter ISO 4217 currency code"
+msgstr ""
+
+#: of telebot.types.Invoice:17 telebot.types.PreCheckoutQuery:14
+#: telebot.types.SuccessfulPayment:8
+msgid ""
+"Total price in the smallest units of the currency (integer, not "
+"float/double). For example, for a price of US$ 1.45 pass amount = 145. "
+"See the exp parameter in currencies.json, it shows the number of digits "
+"past the decimal point for each currency (2 for the majority of "
+"currencies)."
+msgstr ""
+
+#: of telebot.types.Invoice:23
+msgid ":class:`telebot.types.Invoice`"
+msgstr ""
+
+#: of telebot.types.JsonDeserializable:1
+msgid ""
+"Subclasses of this class are guaranteed to be able to be created from a "
+"json-style dict or json formatted string. All subclasses of this class "
+"must override de_json."
+msgstr ""
+
+#: of telebot.types.JsonSerializable:1
+msgid ""
+"Subclasses of this class are guaranteed to be able to be converted to "
+"JSON format. All subclasses of this class must override to_json."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:1
+msgid ""
+"This object represents one button of the reply keyboard. For simple text "
+"buttons String can be used instead of this object to specify text of the "
+"button. Optional fields web_app, request_contact, request_location, and "
+"request_poll are mutually exclusive."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#keyboardbutton"
+msgstr ""
+
+#: of telebot.types.KeyboardButton:5
+msgid ""
+"Text of the button. If none of the optional fields are used, it will be "
+"sent as a message when the button is pressed"
+msgstr ""
+
+#: of telebot.types.KeyboardButton:9
+msgid ""
+"Optional. If True, the user's phone number will be sent as a contact when"
+" the button is pressed. Available in private chats only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:13
+msgid ""
+"Optional. If True, the user's current location will be sent when the "
+"button is pressed. Available in private chats only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:17
+msgid ""
+"Optional. If specified, the user will be asked to create a poll and send "
+"it to the bot when the button is pressed. Available in private chats "
+"only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:21
+msgid ""
+"Optional. If specified, the described Web App will be launched when the "
+"button is pressed. The Web App will be able to send a “web_app_data” "
+"service message. Available in private chats only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:28
+msgid ""
+"Optional. If specified, pressing the button will open a list of suitable "
+"users. Identifiers of selected users will be sent to the bot in a "
+"“users_shared” service message. Available in private chats only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:32
+msgid ""
+"Optional. If specified, pressing the button will open a list of suitable "
+"chats. Tapping on a chat will send its identifier to the bot in a "
+"“chat_shared” service message. Available in private chats only."
+msgstr ""
+
+#: of telebot.types.KeyboardButton:37
+msgid ":class:`telebot.types.KeyboardButton`"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonPollType:1
+msgid ""
+"This object represents type of a poll, which is allowed to be created and"
+" sent when the corresponding button is pressed."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonPollType:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#keyboardbuttonpolltype"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonPollType:5
+msgid ""
+"Optional. If quiz is passed, the user will be allowed to create only "
+"polls in the quiz mode. If regular is passed, only regular polls will be "
+"allowed. Otherwise, the user will be allowed to create a poll of any "
+"type."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonPollType:10
+msgid ":class:`telebot.types.KeyboardButtonPollType`"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:1
+msgid ""
+"This object defines the criteria used to request a suitable chat. The "
+"identifier of the selected chat will be shared with the bot when the "
+"corresponding button is pressed."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#keyboardbuttonrequestchat"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:6
+msgid ""
+"Signed 32-bit identifier of the request, which will be received back in "
+"the ChatShared object. Must be unique within the message"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:10
+msgid ""
+"Pass True to request a channel chat, pass False to request a group or a "
+"supergroup chat."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:13
+msgid ""
+"Optional. Pass True to request a forum supergroup, pass False to request "
+"a non-forum chat. If not specified, no additional restrictions are "
+"applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:17
+msgid ""
+"Optional. Pass True to request a supergroup or a channel with a username,"
+" pass False to request a chat without a username. If not specified, no "
+"additional restrictions are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:21
+msgid ""
+"Optional. Pass True to request a chat owned by the user. Otherwise, no "
+"additional restrictions are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:24
+msgid ""
+"Optional. A JSON-serialized object listing the required administrator "
+"rights of the user in the chat. The rights must be a superset of "
+"bot_administrator_rights. If not specified, no additional restrictions "
+"are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:28
+msgid ""
+"Optional. A JSON-serialized object listing the required administrator "
+"rights of the bot in the chat. The rights must be a subset of "
+"user_administrator_rights. If not specified, no additional restrictions "
+"are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:32
+msgid ""
+"Optional. Pass True to request a chat where the bot is a member. "
+"Otherwise, no additional restrictions are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestChat:36
+msgid ":class:`telebot.types.KeyboardButtonRequestChat`"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUser:1
+msgid "Bases: :py:class:`telebot.types.KeyboardButtonRequestUsers`"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUser:1
+msgid "Deprecated. Use KeyboardButtonRequestUsers instead."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:1
+msgid ""
+"This object defines the criteria used to request a suitable user. The "
+"identifier of the selected user will be shared with the bot when the "
+"corresponding button is pressed."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:4
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#keyboardbuttonrequestusers"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:6
+msgid ""
+"Signed 32-bit identifier of the request, which will be received back in "
+"the UsersShared object. Must be unique within the message"
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:10
+msgid ""
+"Optional. Pass True to request a bot, pass False to request a regular "
+"user. If not specified, no additional restrictions are applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:14
+msgid ""
+"Optional. Pass True to request a premium user, pass False to request a "
+"non-premium user. If not specified, no additional restrictions are "
+"applied."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:18
+msgid "Optional. The maximum number of users to be selected; 1-10. Defaults to 1."
+msgstr ""
+
+#: of telebot.types.KeyboardButtonRequestUsers:22
+msgid ":class:`telebot.types.KeyboardButtonRequestUsers`"
+msgstr ""
+
+#: of telebot.types.LabeledPrice:1
+msgid "This object represents a portion of the price for goods or services."
+msgstr ""
+
+#: of telebot.types.LabeledPrice:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#labeledprice"
+msgstr ""
+
+#: of telebot.types.LabeledPrice:5
+msgid "Portion label"
+msgstr ""
+
+#: of telebot.types.LabeledPrice:8
+msgid ""
+"Price of the product in the smallest units of the currency (integer, not "
+"float/double). For example, for a price of US$ 1.45 pass amount = 145. "
+"See the exp parameter in currencies.json, it shows the number of digits "
+"past the decimal point for each currency (2 for the majority of "
+"currencies)."
+msgstr ""
+
+#: of telebot.types.LabeledPrice:14
+msgid ":class:`telebot.types.LabeledPrice`"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:1 telebot.types.ReactionType:1
+#: telebot.types.ReplyParameters:1 telebot.types.SwitchInlineQueryChosenChat:1
+#: telebot.types.User:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonDeserializable`, "
+":py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:1
+msgid "Describes the options used for link preview generation."
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#linkpreviewoptions"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:5
+msgid "Optional. True, if the link preview is disabled"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:8
+msgid ""
+"Optional. URL to use for the link preview. If empty, then the first URL "
+"found in the message text will be used"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:11
+msgid ""
+"Optional. True, if the media in the link preview is supposed to be "
+"shrunk; ignored if the URL isn't explicitly specified or media size "
+"change isn't supported for the preview"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:14
+msgid ""
+"Optional. True, if the media in the link preview is supposed to be "
+"enlarged; ignored if the URL isn't explicitly specified or media size "
+"change isn't supported for the preview"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:17
+msgid ""
+"Optional. True, if the link preview must be shown above the message text;"
+" otherwise, the link preview will be shown below the message text"
+msgstr ""
+
+#: of telebot.types.LinkPreviewOptions:21
+msgid ":class:`LinkPreviewOptions`"
+msgstr ""
+
+#: of telebot.types.Location:1
+msgid "This object represents a point on the map."
+msgstr ""
+
+#: of telebot.types.Location:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#location"
+msgstr ""
+
+#: of telebot.types.Location:5
+msgid "Longitude as defined by sender"
+msgstr ""
+
+#: of telebot.types.Location:8
+msgid "Latitude as defined by sender"
+msgstr ""
+
+#: of telebot.types.Location:14
+msgid ""
+"Optional. Time relative to the message sending date, during which the "
+"location can be updated; in seconds. For active live locations only."
+msgstr ""
+
+#: of telebot.types.Location:18
+msgid ""
+"Optional. The direction in which user is moving, in degrees; 1-360. For "
+"active live locations only."
+msgstr ""
+
+#: of telebot.types.Location:21
+msgid ""
+"Optional. The maximum distance for proximity alerts about approaching "
+"another chat member, in meters. For sent live locations only."
+msgstr ""
+
+#: of telebot.types.Location:26
+msgid ":class:`telebot.types.Location`"
+msgstr ""
+
+#: of telebot.types.LoginUrl:1
+msgid ""
+"This object represents a parameter of the inline keyboard button used to "
+"automatically authorize a user. Serves as a great replacement for the "
+"Telegram Login Widget when the user is coming from Telegram. All the user"
+" needs to do is tap/click a button and confirm that they want to log in:"
+msgstr ""
+
+#: of telebot.types.LoginUrl:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#loginurl"
+msgstr ""
+
+#: of telebot.types.LoginUrl:5
+msgid ""
+"An HTTPS URL to be opened with user authorization data added to the query"
+" string when the button is pressed. If the user refuses to provide "
+"authorization data, the original URL without information about the user "
+"will be opened. The data added is the same as described in Receiving "
+"authorization data. NOTE: You must always check the hash of the received "
+"data to verify the authentication and the integrity of the data as "
+"described in Checking authorization."
+msgstr ""
+
+#: of telebot.types.LoginUrl:12
+msgid "Optional. New text of the button in forwarded messages."
+msgstr ""
+
+#: of telebot.types.LoginUrl:15
+msgid ""
+"Optional. Username of a bot, which will be used for user authorization. "
+"See Setting up a bot for more details. If not specified, the current "
+"bot's username will be assumed. The url's domain must be the same as the "
+"domain linked with the bot. See Linking your domain to the bot for more "
+"details."
+msgstr ""
+
+#: of telebot.types.LoginUrl:20
+msgid ""
+"Optional. Pass True to request the permission for your bot to send "
+"messages to the user."
+msgstr ""
+
+#: of telebot.types.LoginUrl:25
+msgid ":class:`telebot.types.LoginUrl`"
+msgstr ""
+
+#: of telebot.types.MaskPosition:1
+msgid ""
+"Bases: :py:class:`telebot.types.Dictionaryable`, "
+":py:class:`telebot.types.JsonDeserializable`, "
+":py:class:`telebot.types.JsonSerializable`"
+msgstr ""
+
+#: of telebot.types.MaskPosition:1
+msgid ""
+"This object describes the position on faces where a mask should be placed"
+" by default."
+msgstr ""
+
+#: of telebot.types.MaskPosition:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#maskposition"
+msgstr ""
+
+#: of telebot.types.MaskPosition:5
+msgid ""
+"The part of the face relative to which the mask should be placed. One of "
+"“forehead”, “eyes”, “mouth”, or “chin”."
+msgstr ""
+
+#: of telebot.types.MaskPosition:9
+msgid ""
+"Shift by X-axis measured in widths of the mask scaled to the face size, "
+"from left to right. For example, choosing -1.0 will place mask just to "
+"the left of the default mask position."
+msgstr ""
+
+#: of telebot.types.MaskPosition:13
+msgid ""
+"Shift by Y-axis measured in heights of the mask scaled to the face size, "
+"from top to bottom. For example, 1.0 will place the mask just below the "
+"default mask position."
+msgstr ""
+
+#: of telebot.types.MaskPosition:17
+msgid "Mask scaling coefficient. For example, 2.0 means double size."
+msgstr ""
+
+#: of telebot.types.MaskPosition:21
+msgid ":class:`telebot.types.MaskPosition`"
+msgstr ""
+
+#: of telebot.types.MenuButton:1
+msgid ""
+"This object describes the bot's menu button in a private chat. It should "
+"be one of"
+msgstr ""
+
+#: of telebot.types.MenuButton:3
+msgid ":class:`MenuButtonCommands`"
+msgstr ""
+
+#: of telebot.types.MenuButton:4
+msgid ":class:`MenuButtonWebApp`"
+msgstr ""
+
+#: of telebot.types.MenuButton:5
+msgid ":class:`MenuButtonDefault`"
+msgstr ""
+
+#: of telebot.types.MenuButton:7
+msgid ""
+"If a menu button other than MenuButtonDefault is set for a private chat, "
+"then it is applied in the chat. Otherwise the default menu button is "
+"applied. By default, the menu button opens the list of bot commands."
+msgstr ""
+
+#: of telebot.types.MenuButtonCommands:1 telebot.types.MenuButtonDefault:1
+#: telebot.types.MenuButtonWebApp:1
+msgid "Bases: :py:class:`telebot.types.MenuButton`"
+msgstr ""
+
+#: of telebot.types.MenuButtonCommands:1
+msgid "Represents a menu button, which opens the bot's list of commands."
+msgstr ""
+
+#: of telebot.types.MenuButtonCommands:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#menubuttoncommands"
+msgstr ""
+
+#: of telebot.types.MenuButtonCommands:5
+msgid "Type of the button, must be commands"
+msgstr ""
+
+#: of telebot.types.MenuButtonCommands:9
+msgid ":class:`telebot.types.MenuButtonCommands`"
+msgstr ""
+
+#: of telebot.types.MenuButtonDefault:1
+msgid "Describes that no specific value for the menu button was set."
+msgstr ""
+
+#: of telebot.types.MenuButtonDefault:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#menubuttondefault"
+msgstr ""
+
+#: of telebot.types.MenuButtonDefault:5
+msgid "Type of the button, must be default"
+msgstr ""
+
+#: of telebot.types.MenuButtonDefault:9
+msgid ":class:`telebot.types.MenuButtonDefault`"
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:1
+msgid "Represents a menu button, which launches a Web App."
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#menubuttonwebapp"
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:5
+msgid "Type of the button, must be web_app"
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:8
+msgid "Text on the button"
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:11
+msgid ""
+"Description of the Web App that will be launched when the user presses "
+"the button. The Web App will be able to send an arbitrary message on "
+"behalf of the user using the method answerWebAppQuery."
+msgstr ""
+
+#: of telebot.types.MenuButtonWebApp:16
+msgid ":class:`telebot.types.MenuButtonWebApp`"
+msgstr ""
+
+#: of telebot.types.Message:1
+msgid "This object represents a message."
+msgstr ""
+
+#: of telebot.types.Message:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#message"
+msgstr ""
+
+#: of telebot.types.Message:5
+msgid "Unique message identifier inside this chat"
+msgstr ""
+
+#: of telebot.types.Message:8
+msgid ""
+"Optional. Unique identifier of a message thread to which the message "
+"belongs; for supergroups only"
+msgstr ""
+
+#: of telebot.types.Message:11
+msgid ""
+"Optional. Sender of the message; empty for messages sent to channels. For"
+" backward compatibility, the field contains a fake sender user in non-"
+"channel chats, if the message was sent on behalf of a chat."
+msgstr ""
+
+#: of telebot.types.Message:15
+msgid ""
+"Optional. Sender of the message, sent on behalf of a chat. For example, "
+"the channel itself for channel posts, the supergroup itself for messages "
+"from anonymous group administrators, the linked channel for messages "
+"automatically forwarded to the discussion group. For backward "
+"compatibility, the field from contains a fake sender user in non-channel "
+"chats, if the message was sent on behalf of a chat."
+msgstr ""
+
+#: of telebot.types.Message:21
+msgid "Date the message was sent in Unix time"
+msgstr ""
+
+#: of telebot.types.Message:24
+msgid "Conversation the message belongs to"
+msgstr ""
+
+#: of telebot.types.Message:33
+msgid "deprecated. message in the channel"
+msgstr ""
+
+#: of telebot.types.Message:49
+msgid "Optional. True, if the message is sent to a forum topic"
+msgstr ""
+
+#: of telebot.types.Message:52
+msgid ""
+"Optional. :obj:`bool`, if the message is a channel post that was "
+"automatically forwarded to the connected discussion group"
+msgstr ""
+
+#: of telebot.types.Message:56
+msgid ""
+"Optional. For replies, the original message. Note that the Message object"
+" in this field will not contain further reply_to_message fields even if "
+"it itself is a reply."
+msgstr ""
+
+#: of telebot.types.Message:60
+msgid ""
+"Optional. Information about the message that is being replied to, which "
+"may come from another chat or forum topic"
+msgstr ""
+
+#: of telebot.types.Message:63
+msgid ""
+"Optional. For replies that quote part of the original message, the quoted"
+" part of the message"
+msgstr ""
+
+#: of telebot.types.Message:66
+msgid "Optional. Bot through which the message was sent"
+msgstr ""
+
+#: of telebot.types.Message:69
+msgid "Optional. Date the message was last edited in Unix time"
+msgstr ""
+
+#: of telebot.types.Message:72
+msgid "Optional. :obj:`bool`, if the message can't be forwarded"
+msgstr ""
+
+#: of telebot.types.Message:75
+msgid ""
+"Optional. The unique identifier of a media message group this message "
+"belongs to"
+msgstr ""
+
+#: of telebot.types.Message:78
+msgid ""
+"Optional. Signature of the post author for messages in channels, or the "
+"custom title of an anonymous group administrator"
+msgstr ""
+
+#: of telebot.types.Message:82
+msgid "Optional. For text messages, the actual UTF-8 text of the message"
+msgstr ""
+
+#: of telebot.types.Message:85
+msgid ""
+"Optional. For text messages, special entities like usernames, URLs, bot "
+"commands, etc. that appear in the text"
+msgstr ""
+
+#: of telebot.types.Message:89
+msgid ""
+"Optional. Options used for link preview generation for the message, if it"
+" is a text message and link preview options were changed"
+msgstr ""
+
+#: of telebot.types.Message:93
+msgid ""
+"Optional. Message is an animation, information about the animation. For "
+"backward compatibility, when this field is set, the document field will "
+"also be set"
+msgstr ""
+
+#: of telebot.types.Message:121
+msgid ""
+"Optional. Caption for the animation, audio, document, photo, video or "
+"voice"
+msgstr ""
+
+#: of telebot.types.Message:124
+msgid ""
+"Optional. For messages with a caption, special entities like usernames, "
+"URLs, bot commands, etc. that appear in the caption"
+msgstr ""
+
+#: of telebot.types.Message:143
+msgid ""
+"Optional. Message is a venue, information about the venue. For backward "
+"compatibility, when this field is set, the location field will also be "
+"set"
+msgstr ""
+
+#: of telebot.types.Message:150
+msgid ""
+"Optional. New members that were added to the group or supergroup and "
+"information about them (the bot itself may be one of these members)"
+msgstr ""
+
+#: of telebot.types.Message:154
+msgid ""
+"Optional. A member was removed from the group, information about them "
+"(this member may be the bot itself)"
+msgstr ""
+
+#: of telebot.types.Message:158
+msgid "Optional. A chat title was changed to this value"
+msgstr ""
+
+#: of telebot.types.Message:161
+msgid "Optional. A chat photo was change to this value"
+msgstr ""
+
+#: of telebot.types.Message:164
+msgid "Optional. Service message: the chat photo was deleted"
+msgstr ""
+
+#: of telebot.types.Message:167
+msgid "Optional. Service message: the group has been created"
+msgstr ""
+
+#: of telebot.types.Message:170
+msgid ""
+"Optional. Service message: the supergroup has been created. This field "
+"can't be received in a message coming through updates, because bot can't "
+"be a member of a supergroup when it is created. It can only be found in "
+"reply_to_message if someone replies to a very first message in a directly"
+" created supergroup."
+msgstr ""
+
+#: of telebot.types.Message:175
+msgid ""
+"Optional. Service message: the channel has been created. This field can't"
+" be received in a message coming through updates, because bot can't be a "
+"member of a channel when it is created. It can only be found in "
+"reply_to_message if someone replies to a very first message in a channel."
+msgstr ""
+
+#: of telebot.types.Message:180
+msgid "Optional. Service message: auto-delete timer settings changed in the chat"
+msgstr ""
+
+#: of telebot.types.Message:184
+msgid ""
+"Optional. The group has been migrated to a supergroup with the specified "
+"identifier. This number may have more than 32 significant bits and some "
+"programming languages may have difficulty/silent defects in interpreting "
+"it. But it has at most 52 significant bits, so a signed 64-bit integer or"
+" double-precision float type are safe for storing this identifier."
+msgstr ""
+
+#: of telebot.types.Message:190
+msgid ""
+"Optional. The supergroup has been migrated from a group with the "
+"specified identifier. This number may have more than 32 significant bits "
+"and some programming languages may have difficulty/silent defects in "
+"interpreting it. But it has at most 52 significant bits, so a signed "
+"64-bit integer or double-precision float type are safe for storing this "
+"identifier."
+msgstr ""
+
+#: of telebot.types.Message:196
+msgid ""
+"Optional. Specified message was pinned. Note that the Message object in "
+"this field will not contain further reply_to_message fields even if it is"
+" itself a reply."
+msgstr ""
+
+#: of telebot.types.Message:203
+msgid ""
+"Optional. Message is a service message about a successful payment, "
+"information about the payment. More about payments »"
+msgstr ""
+
+#: of telebot.types.Message:207
+msgid "Optional. Service message: a user was shared with the bot"
+msgstr ""
+
+#: of telebot.types.Message:210
+msgid "Optional. Service message: a chat was shared with the bot"
+msgstr ""
+
+#: of telebot.types.Message:213
+msgid ""
+"Optional. The domain name of the website on which the user has logged in."
+" More about Telegram Login »"
+msgstr ""
+
+#: of telebot.types.Message:217
+msgid ""
+"Optional. Service message: the user allowed the bot added to the "
+"attachment menu to write messages"
+msgstr ""
+
+#: of telebot.types.Message:221
+msgid "Optional. Telegram Passport data"
+msgstr ""
+
+#: of telebot.types.Message:224
+msgid ""
+"Optional. Service message. A user in the chat triggered another user's "
+"proximity alert while sharing Live Location."
+msgstr ""
+
+#: of telebot.types.Message:228
+msgid "Optional. Service message: forum topic created"
+msgstr ""
+
+#: of telebot.types.Message:231
+msgid "Optional. Service message: forum topic edited"
+msgstr ""
+
+#: of telebot.types.Message:234
+msgid "Optional. Service message: forum topic closed"
+msgstr ""
+
+#: of telebot.types.Message:237
+msgid "Optional. Service message: forum topic reopened"
+msgstr ""
+
+#: of telebot.types.Message:240
+msgid "Optional. Service message: the 'General' forum topic hidden"
+msgstr ""
+
+#: of telebot.types.Message:243
+msgid "Optional. Service message: the 'General' forum topic unhidden"
+msgstr ""
+
+#: of telebot.types.Message:246
+msgid "Optional. Service message: a giveaway has been created"
+msgstr ""
+
+#: of telebot.types.Message:249
+msgid "Optional. The message is a scheduled giveaway message"
+msgstr ""
+
+#: of telebot.types.Message:252
+msgid "Optional. Service message: giveaway winners(public winners)"
+msgstr ""
+
+#: of telebot.types.Message:255
+msgid "Optional. Service message: giveaway completed, without public winners"
+msgstr ""
+
+#: of telebot.types.Message:258
+msgid "Optional. Service message: video chat scheduled"
+msgstr ""
+
+#: of telebot.types.Message:261
+msgid "Optional. Service message: video chat started"
+msgstr ""
+
+#: of telebot.types.Message:264
+msgid "Optional. Service message: video chat ended"
+msgstr ""
+
+#: of telebot.types.Message:267
+msgid "Optional. Service message: new participants invited to a video chat"
+msgstr ""
+
+#: of telebot.types.Message:270
+msgid "Optional. Service message: data sent by a Web App"
+msgstr ""
+
+#: of telebot.types.Message:273
+msgid ""
+"Optional. Inline keyboard attached to the message. login_url buttons are "
+"represented as ordinary url buttons."
+msgstr ""
+
+#: of telebot.types.Message
+msgid "forward_origin"
+msgstr ""
+
+#: of telebot.types.Message:46
+msgid "Optional. For forwarded messages, information about the original message;"
+msgstr ""
+
+#: of telebot.types.Message:278
+msgid ":class:`telebot.types.Message`"
+msgstr ""
+
+#: of telebot.types.Message.html_caption:1
+msgid "Returns html-rendered caption."
+msgstr ""
+
+#: of telebot.types.Message.html_text:1
+msgid "Returns html-rendered text."
+msgstr ""
+
+#: of telebot.types.Message.parse_chat:1
+msgid "Parses chat."
+msgstr ""
+
+#: of telebot.types.Message.parse_entities:1
+msgid "Parses message entity array."
+msgstr ""
+
+#: of telebot.types.Message.parse_photo:1
+msgid "Parses photo array."
+msgstr ""
+
+#: of telebot.types.MessageAutoDeleteTimerChanged:1
+msgid ""
+"This object represents a service message about a change in auto-delete "
+"timer settings."
+msgstr ""
+
+#: of telebot.types.MessageAutoDeleteTimerChanged:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#messageautodeletetimerchanged"
+msgstr ""
+
+#: of telebot.types.MessageAutoDeleteTimerChanged:5
+msgid "New auto-delete time for messages in the chat; in seconds"
+msgstr ""
+
+#: of telebot.types.MessageAutoDeleteTimerChanged:9
+msgid ":class:`telebot.types.MessageAutoDeleteTimerChanged`"
+msgstr ""
+
+#: of telebot.types.MessageEntity:1
+msgid ""
+"This object represents one special entity in a text message. For example,"
+" hashtags, usernames, URLs, etc."
+msgstr ""
+
+#: of telebot.types.MessageEntity:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#messageentity"
+msgstr ""
+
+#: of telebot.types.MessageEntity:5
+msgid ""
+"Type of the entity. Currently, can be “mention” (@username), “hashtag” "
+"(#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” "
+"(https://telegram.org), “email” (do-not-reply@telegram.org), "
+"“phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic "
+"text), “underline” (underlined text), “strikethrough” (strikethrough "
+"text), “spoiler” (spoiler message), “code” (monowidth string), “pre” "
+"(monowidth block), “text_link” (for clickable text URLs), “text_mention” "
+"(for users without usernames), “custom_emoji” (for inline custom emoji "
+"stickers)"
+msgstr ""
+
+#: of telebot.types.MessageEntity:13
+msgid "Offset in UTF-16 code units to the start of the entity"
+msgstr ""
+
+#: of telebot.types.MessageEntity:16
+msgid "Length of the entity in UTF-16 code units"
+msgstr ""
+
+#: of telebot.types.MessageEntity:19
+msgid ""
+"Optional. For “text_link” only, URL that will be opened after user taps "
+"on the text"
+msgstr ""
+
+#: of telebot.types.MessageEntity:22
+msgid "Optional. For “text_mention” only, the mentioned user"
+msgstr ""
+
+#: of telebot.types.MessageEntity:25
+msgid "Optional. For “pre” only, the programming language of the entity text"
+msgstr ""
+
+#: of telebot.types.MessageEntity:28
+msgid ""
+"Optional. For “custom_emoji” only, unique identifier of the custom emoji."
+" Use get_custom_emoji_stickers to get full information about the sticker."
+msgstr ""
+
+#: of telebot.types.MessageEntity:33
+msgid ":class:`telebot.types.MessageEntity`"
+msgstr ""
+
+#: of telebot.types.MessageEntity.to_list_of_dicts:1
+msgid "Converts a list of MessageEntity objects to a list of dictionaries."
+msgstr ""
+
+#: of telebot.types.MessageID:1
+msgid "This object represents a unique message identifier."
+msgstr ""
+
+#: of telebot.types.MessageID:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#messageid"
+msgstr ""
+
+#: of telebot.types.MessageID:5
+msgid "Unique message identifier"
+msgstr ""
+
+#: of telebot.types.MessageID:9
+msgid ":class:`telebot.types.MessageId`"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:1
+msgid "This object describes the origin of a message."
+msgstr ""
+
+#: of telebot.types.MessageOrigin:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#messageorigin"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:5
+msgid "Type of the message origin"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:8
+msgid "Date the message was sent originally in Unix time"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:11
+msgid "User that sent the message originally (for MessageOriginUser)"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:14
+msgid ""
+"Name of the user that sent the message originally (for "
+"MessageOriginHiddenUser)"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:17
+msgid "Chat that sent the message originally (for MessageOriginChat)"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:20
+msgid "Optional. Author signature for certain cases"
+msgstr ""
+
+#: of telebot.types.MessageOrigin:24
+msgid ":class:`MessageOrigin`"
+msgstr ""
+
+#: of telebot.types.MessageOriginChannel:1 telebot.types.MessageOriginChat:1
+#: telebot.types.MessageOriginHiddenUser:1 telebot.types.MessageOriginUser:1
+msgid "Bases: :py:class:`telebot.types.MessageOrigin`"
+msgstr ""
+
+#: of telebot.types.MessageOriginChannel:1
+msgid "The message was originally sent to a channel chat."
+msgstr ""
+
+#: of telebot.types.MessageOriginChannel:3
+msgid "Channel chat to which the message was originally sent"
+msgstr ""
+
+#: of telebot.types.MessageOriginChannel:9
+msgid "Optional. Signature of the original post author"
+msgstr ""
+
+#: of telebot.types.MessageOriginChat:1
+msgid "The message was originally sent on behalf of a chat to a group chat."
+msgstr ""
+
+#: of telebot.types.MessageOriginChat:3
+msgid "Chat that sent the message originally"
+msgstr ""
+
+#: of telebot.types.MessageOriginChat:6
+msgid ""
+"Optional. For messages originally sent by an anonymous chat "
+"administrator, original message author signature"
+msgstr ""
+
+#: of telebot.types.MessageOriginHiddenUser:1
+msgid "The message was originally sent by an unknown user."
+msgstr ""
+
+#: of telebot.types.MessageOriginHiddenUser:3
+msgid "Name of the user that sent the message originally"
+msgstr ""
+
+#: of telebot.types.MessageOriginUser:1
+msgid "The message was originally sent by a known user."
+msgstr ""
+
+#: of telebot.types.MessageOriginUser:3
+msgid "User that sent the message originally"
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:1
+#: telebot.types.MessageReactionUpdated:1
+msgid ""
+"This object represents a service message about a change in the list of "
+"the current user's reactions to a message."
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#messagereactioncountupdated"
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:5
+msgid "The chat containing the message"
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:11
+#: telebot.types.MessageReactionUpdated:17
+msgid "Date of the change in Unix time"
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:14
+msgid "List of reactions that are present on the message"
+msgstr ""
+
+#: of telebot.types.MessageReactionCountUpdated:18
+msgid ":class:`MessageReactionCountUpdated`"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#messagereactionupdated"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:5
+msgid "The chat containing the message the user reacted to"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:8
+msgid "Unique identifier of the message inside the chat"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:11
+msgid "Optional. The user that changed the reaction, if the user isn't anonymous"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:14
+msgid ""
+"Optional. The chat on behalf of which the reaction was changed, if the "
+"user is anonymous"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:20
+msgid "Previous list of reaction types that were set by the user"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:23
+msgid "New list of reaction types that have been set by the user"
+msgstr ""
+
+#: of telebot.types.MessageReactionUpdated:27
+msgid ":class:`MessageReactionUpdated`"
+msgstr ""
+
+#: of telebot.types.OrderInfo:1
+msgid "This object represents information about an order."
+msgstr ""
+
+#: of telebot.types.OrderInfo:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#orderinfo"
+msgstr ""
+
+#: of telebot.types.OrderInfo:5
+msgid "Optional. User name"
+msgstr ""
+
+#: of telebot.types.OrderInfo:8
+msgid "Optional. User's phone number"
+msgstr ""
+
+#: of telebot.types.OrderInfo:11
+msgid "Optional. User email"
+msgstr ""
+
+#: of telebot.types.OrderInfo:14
+msgid "Optional. User shipping address"
+msgstr ""
+
+#: of telebot.types.OrderInfo:18
+msgid ":class:`telebot.types.OrderInfo`"
+msgstr ""
+
+#: of telebot.types.PhotoSize:1
+msgid "This object represents one size of a photo or a file / sticker thumbnail."
+msgstr ""
+
+#: of telebot.types.PhotoSize:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#photosize"
+msgstr ""
+
+#: of telebot.types.PhotoSize:12
+msgid "Photo width"
+msgstr ""
+
+#: of telebot.types.PhotoSize:15
+msgid "Photo height"
+msgstr ""
+
+#: of telebot.types.PhotoSize:18 telebot.types.Sticker:51
+#: telebot.types.VideoNote:21
+msgid "Optional. File size in bytes"
+msgstr ""
+
+#: of telebot.types.PhotoSize:22
+msgid ":class:`telebot.types.PhotoSize`"
+msgstr ""
+
+#: of telebot.types.Poll:1
+msgid "This object contains information about a poll."
+msgstr ""
+
+#: of telebot.types.Poll:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#poll"
+msgstr ""
+
+#: of telebot.types.Poll:5 telebot.types.PollAnswer:5
+msgid "Unique poll identifier"
+msgstr ""
+
+#: of telebot.types.Poll:8
+msgid "Poll question, 1-300 characters"
+msgstr ""
+
+#: of telebot.types.Poll:11
+msgid "List of poll options"
+msgstr ""
+
+#: of telebot.types.Poll:14
+msgid "Total number of users that voted in the poll"
+msgstr ""
+
+#: of telebot.types.Poll:17
+msgid "True, if the poll is closed"
+msgstr ""
+
+#: of telebot.types.Poll:20
+msgid "True, if the poll is anonymous"
+msgstr ""
+
+#: of telebot.types.Poll:23
+msgid "Poll type, currently can be “regular” or “quiz”"
+msgstr ""
+
+#: of telebot.types.Poll:26
+msgid "True, if the poll allows multiple answers"
+msgstr ""
+
+#: of telebot.types.Poll:29
+msgid ""
+"Optional. 0-based identifier of the correct answer option. Available only"
+" for polls in the quiz mode, which are closed, or was sent (not "
+"forwarded) by the bot or to the private chat with the bot."
+msgstr ""
+
+#: of telebot.types.Poll:33
+msgid ""
+"Optional. Text that is shown when a user chooses an incorrect answer or "
+"taps on the lamp icon in a quiz-style poll, 0-200 characters"
+msgstr ""
+
+#: of telebot.types.Poll:37
+msgid ""
+"Optional. Special entities like usernames, URLs, bot commands, etc. that "
+"appear in the explanation"
+msgstr ""
+
+#: of telebot.types.Poll:41
+msgid "Optional. Amount of time in seconds the poll will be active after creation"
+msgstr ""
+
+#: of telebot.types.Poll:44
+msgid ""
+"Optional. Point in time (Unix timestamp) when the poll will be "
+"automatically closed"
+msgstr ""
+
+#: of telebot.types.Poll:48
+msgid ":class:`telebot.types.Poll`"
+msgstr ""
+
+#: of telebot.types.Poll.add:1
+msgid "Add an option to the poll."
+msgstr ""
+
+#: of telebot.types.Poll.add:3
+msgid "Option to add"
+msgstr ""
+
+#: of telebot.types.PollAnswer:1
+msgid "This object represents an answer of a user in a non-anonymous poll."
+msgstr ""
+
+#: of telebot.types.PollAnswer:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#pollanswer"
+msgstr ""
+
+#: of telebot.types.PollAnswer:8
+msgid ""
+"Optional. The chat that changed the answer to the poll, if the voter is "
+"anonymous"
+msgstr ""
+
+#: of telebot.types.PollAnswer:11
+msgid "Optional. The user, who changed the answer to the poll"
+msgstr ""
+
+#: of telebot.types.PollAnswer:14
+msgid ""
+"0-based identifiers of answer options, chosen by the user. May be empty "
+"if the user retracted their vote."
+msgstr ""
+
+#: of telebot.types.PollAnswer:19
+msgid ":class:`telebot.types.PollAnswer`"
+msgstr ""
+
+#: of telebot.types.PollOption:1
+msgid "This object contains information about one answer option in a poll."
+msgstr ""
+
+#: of telebot.types.PollOption:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#polloption"
+msgstr ""
+
+#: of telebot.types.PollOption:5
+msgid "Option text, 1-100 characters"
+msgstr ""
+
+#: of telebot.types.PollOption:8
+msgid "Number of users that voted for this option"
+msgstr ""
+
+#: of telebot.types.PollOption:12
+msgid ":class:`telebot.types.PollOption`"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:1
+msgid "This object contains information about an incoming pre-checkout query."
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#precheckoutquery"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:5 telebot.types.ShippingQuery:5
+msgid "Unique query identifier"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:8 telebot.types.ShippingQuery:8
+msgid "User who sent the query"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:19 telebot.types.ShippingQuery:11
+#: telebot.types.SuccessfulPayment:13
+msgid "Bot specified invoice payload"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:22 telebot.types.SuccessfulPayment:16
+msgid "Optional. Identifier of the shipping option chosen by the user"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:25 telebot.types.SuccessfulPayment:19
+msgid "Optional. Order information provided by the user"
+msgstr ""
+
+#: of telebot.types.PreCheckoutQuery:29
+msgid ":class:`telebot.types.PreCheckoutQuery`"
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:1
+msgid ""
+"This object represents the content of a service message, sent whenever a "
+"user in the chat triggers a proximity alert set by another user."
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#proximityalerttriggered"
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:5
+msgid "User that triggered the alert"
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:8
+msgid "User that set the alert"
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:11
+msgid "The distance between the users"
+msgstr ""
+
+#: of telebot.types.ProximityAlertTriggered:15
+msgid ":class:`telebot.types.ProximityAlertTriggered`"
+msgstr ""
+
+#: of telebot.types.ReactionCount:1
+msgid ""
+"This object represents a reaction added to a message along with the "
+"number of times it was added."
+msgstr ""
+
+#: of telebot.types.ReactionCount:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#reactioncount"
+msgstr ""
+
+#: of telebot.types.ReactionCount:5 telebot.types.ReactionType:5
+msgid "Type of the reaction"
+msgstr ""
+
+#: of telebot.types.ReactionCount:8
+msgid "Number of times the reaction was added"
+msgstr ""
+
+#: of telebot.types.ReactionCount:12
+msgid ":class:`ReactionCount`"
+msgstr ""
+
+#: of telebot.types.ReactionType:1
+msgid "This object represents a reaction type."
+msgstr ""
+
+#: of telebot.types.ReactionType:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#reactiontype"
+msgstr ""
+
+#: of telebot.types.ReactionType:9
+msgid ":class:`ReactionType`"
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:1 telebot.types.ReactionTypeEmoji:1
+msgid "Bases: :py:class:`telebot.types.ReactionType`"
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:1
+msgid "This object represents a custom emoji reaction type."
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reactiontypecustomemoji"
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:5
+msgid "Type of the reaction, must be custom_emoji"
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:8
+msgid "Identifier of the custom emoji"
+msgstr ""
+
+#: of telebot.types.ReactionTypeCustomEmoji:12
+msgid ":class:`ReactionTypeCustomEmoji`"
+msgstr ""
+
+#: of telebot.types.ReactionTypeEmoji:1
+msgid "This object represents an emoji reaction type."
+msgstr ""
+
+#: of telebot.types.ReactionTypeEmoji:3
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#reactiontypeemoji"
+msgstr ""
+
+#: of telebot.types.ReactionTypeEmoji:5
+msgid "Type of the reaction, must be emoji"
+msgstr ""
+
+#: of telebot.types.ReactionTypeEmoji:8
+msgid "Reaction emoji. List is available on the API doc."
+msgstr ""
+
+#: of telebot.types.ReactionTypeEmoji:12
+msgid ":class:`ReactionTypeEmoji`"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:1
+msgid ""
+"This object represents a custom keyboard with reply options (see "
+"Introduction to bots for details and examples)."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:3
+msgid "Example on creating ReplyKeyboardMarkup object"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:16
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#replykeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:18
+msgid ""
+":obj:`list` of button rows, each represented by an :obj:`list` of "
+":class:`telebot.types.KeyboardButton` objects"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:22
+msgid ""
+"Optional. Requests clients to resize the keyboard vertically for optimal "
+"fit (e.g., make the keyboard smaller if there are just two rows of "
+"buttons). Defaults to false, in which case the custom keyboard is always "
+"of the same height as the app's standard keyboard."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:27
+msgid ""
+"Optional. Requests clients to hide the keyboard as soon as it's been "
+"used. The keyboard will still be available, but clients will "
+"automatically display the usual letter-keyboard in the chat - the user "
+"can press a special button in the input field to see the custom keyboard "
+"again. Defaults to false."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:32
+msgid ""
+"Optional. The placeholder to be shown in the input field when the "
+"keyboard is active; 1-64 characters"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:36
+msgid ""
+"Optional. Use this parameter if you want to show the keyboard to specific"
+" users only. Targets: 1) users that are @mentioned in the text of the "
+"Message object; 2) if the bot's message is a reply (has "
+"reply_to_message_id), sender of the original message.Example: A user "
+"requests to change the bot's language, bot replies to the request with a "
+"keyboard to select the new language. Other users in the group don't see "
+"the keyboard."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:42
+msgid ""
+"Optional. Use this parameter if you want to show the keyboard to specific"
+" users only. Targets: 1) users that are @mentioned in the text of the "
+"Message object; 2) if the bot's message is a reply (has "
+"reply_to_message_id), sender of the original message. Example: A user "
+"requests to change the bot's language, bot replies to the request with a "
+"keyboard to select the new language. Other users in the group don't see "
+"the keyboard."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:42
+msgid ""
+"Optional. Use this parameter if you want to show the keyboard to specific"
+" users only. Targets: 1) users that are @mentioned in the text of the "
+"Message object; 2) if the bot's message is a reply (has "
+"reply_to_message_id), sender of the original message."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:46
+msgid ""
+"Example: A user requests to change the bot's language, bot replies to the"
+" request with a keyboard to select the new language. Other users in the "
+"group don't see the keyboard."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup:50
+#: telebot.types.ReplyKeyboardMarkup.add:14
+#: telebot.types.ReplyKeyboardMarkup.row:9
+msgid ":class:`telebot.types.ReplyKeyboardMarkup`"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup.add:1
+msgid ""
+"This function adds strings to the keyboard, while not exceeding "
+"row_width. E.g. ReplyKeyboardMarkup#add(\"A\", \"B\", \"C\") yields the "
+"json result {keyboard: [[\"A\"], [\"B\"], [\"C\"]]} when row_width is set"
+" to 1. When row_width is set to 2, the following is the result of this "
+"function: {keyboard: [[\"A\", \"B\"], [\"C\"]]} See "
+"https://core.telegram.org/bots/api#replykeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup.add:7
+msgid "KeyboardButton to append to the keyboard"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup.row:1
+msgid ""
+"Adds a list of KeyboardButton to the keyboard. This function does not "
+"consider row_width. ReplyKeyboardMarkup#row(\"A\")#row(\"B\", "
+"\"C\")#to_json() outputs '{keyboard: [[\"A\"], [\"B\", \"C\"]]}' See "
+"https://core.telegram.org/bots/api#replykeyboardmarkup"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardMarkup.row:5
+msgid "strings"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardRemove:1
+msgid ""
+"Upon receiving a message with this object, Telegram clients will remove "
+"the current custom keyboard and display the default letter-keyboard. By "
+"default, custom keyboards are displayed until a new keyboard is sent by a"
+" bot. An exception is made for one-time keyboards that are hidden "
+"immediately after the user presses a button (see ReplyKeyboardMarkup)."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardRemove:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#replykeyboardremove"
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardRemove:5
+msgid ""
+"Requests clients to remove the custom keyboard (user will not be able to "
+"summon this keyboard; if you want to hide the keyboard from sight but "
+"keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup) Note "
+"that this parameter is set to True by default by the library. You cannot "
+"modify it."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardRemove:11
+msgid ""
+"Optional. Use this parameter if you want to remove the keyboard for "
+"specific users only. Targets: 1) users that are @mentioned in the text of"
+" the Message object; 2) if the bot's message is a reply (has "
+"reply_to_message_id), sender of the original message.Example: A user "
+"votes in a poll, bot returns confirmation message in reply to the vote "
+"and removes the keyboard for that user, while still showing the keyboard "
+"with poll options to users who haven't voted yet."
+msgstr ""
+
+#: of telebot.types.ReplyKeyboardRemove:19
+msgid ":class:`telebot.types.ReplyKeyboardRemove`"
+msgstr ""
+
+#: of telebot.types.ReplyParameters:1
+msgid "Describes reply parameters for the message that is being sent."
+msgstr ""
+
+#: of telebot.types.ReplyParameters:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#replyparameters"
+msgstr ""
+
+#: of telebot.types.ReplyParameters:5
+msgid ""
+"Identifier of the message that will be replied to in the current chat, or"
+" in the chat chat_id if it is specified"
+msgstr ""
+
+#: of telebot.types.ReplyParameters:8
+msgid ""
+"Optional. If the message to be replied to is from a different chat, "
+"unique identifier for the chat or username of the channel (in the format "
+"@channelusername)"
+msgstr ""
+
+#: of telebot.types.ReplyParameters:11
+msgid ""
+"Optional. Pass True if the message should be sent even if the specified "
+"message to be replied to is not found; can be used only for replies in "
+"the same chat and forum topic."
+msgstr ""
+
+#: of telebot.types.ReplyParameters:14
+msgid ""
+"Optional. Quoted part of the message to be replied to; 0-1024 characters "
+"after entities parsing. The quote must be an exact substring of the "
+"message to be replied to, including bold, italic, underline, "
+"strikethrough, spoiler, and custom_emoji entities. The message will fail "
+"to send if the quote isn't found in the original message."
+msgstr ""
+
+#: of telebot.types.ReplyParameters:17
+msgid ""
+"Optional. Mode for parsing entities in the quote. See formatting options "
+"for more details."
+msgstr ""
+
+#: of telebot.types.ReplyParameters:20
+msgid ""
+"Optional. A JSON-serialized list of special entities that appear in the "
+"quote. It can be specified instead of quote_parse_mode."
+msgstr ""
+
+#: of telebot.types.ReplyParameters:23
+msgid ""
+"Optional. Position of the quote in the original message in UTF-16 code "
+"units"
+msgstr ""
+
+#: of telebot.types.ReplyParameters:27
+msgid ":class:`ReplyParameters`"
+msgstr ""
+
+#: of telebot.types.SentWebAppMessage:1 telebot.types.WebAppData:1
+#: telebot.types.WebAppInfo:1
+msgid ""
+"Bases: :py:class:`telebot.types.JsonDeserializable`, "
+":py:class:`telebot.types.Dictionaryable`"
+msgstr ""
+
+#: of telebot.types.SentWebAppMessage:1
+msgid "Describes an inline message sent by a Web App on behalf of a user."
+msgstr ""
+
+#: of telebot.types.SentWebAppMessage:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#sentwebappmessage"
+msgstr ""
+
+#: of telebot.types.SentWebAppMessage:5
+msgid ""
+"Optional. Identifier of the sent inline message. Available only if there "
+"is an inline keyboard attached to the message."
+msgstr ""
+
+#: of telebot.types.SentWebAppMessage:10
+msgid ":class:`telebot.types.SentWebAppMessage`"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:1
+msgid "This object represents a shipping address."
+msgstr ""
+
+#: of telebot.types.ShippingAddress:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#shippingaddress"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:5
+msgid "Two-letter ISO 3166-1 alpha-2 country code"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:8
+msgid "State, if applicable"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:11
+msgid "City"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:14
+msgid "First line for the address"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:17
+msgid "Second line for the address"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:20
+msgid "Address post code"
+msgstr ""
+
+#: of telebot.types.ShippingAddress:24
+msgid ":class:`telebot.types.ShippingAddress`"
+msgstr ""
+
+#: of telebot.types.ShippingOption:1
+msgid "This object represents one shipping option."
+msgstr ""
+
+#: of telebot.types.ShippingOption:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#shippingoption"
+msgstr ""
+
+#: of telebot.types.ShippingOption:5
+msgid "Shipping option identifier"
+msgstr ""
+
+#: of telebot.types.ShippingOption:8
+msgid "Option title"
+msgstr ""
+
+#: of telebot.types.ShippingOption:11
+msgid "List of price portions"
+msgstr ""
+
+#: of telebot.types.ShippingOption:15
+msgid ":class:`telebot.types.ShippingOption`"
+msgstr ""
+
+#: of telebot.types.ShippingOption.add_price:1
+msgid "Add LabeledPrice to ShippingOption"
+msgstr ""
+
+#: of telebot.types.ShippingOption.add_price:3
+msgid "LabeledPrices"
+msgstr ""
+
+#: of telebot.types.ShippingOption.add_price:6
+msgid "None"
+msgstr ""
+
+#: of telebot.types.ShippingQuery:1
+msgid "This object contains information about an incoming shipping query."
+msgstr ""
+
+#: of telebot.types.ShippingQuery:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#shippingquery"
+msgstr ""
+
+#: of telebot.types.ShippingQuery:14
+msgid "User specified shipping address"
+msgstr ""
+
+#: of telebot.types.ShippingQuery:18
+msgid ":class:`telebot.types.ShippingQuery`"
+msgstr ""
+
+#: of telebot.types.Sticker:1
+msgid "This object represents a sticker."
+msgstr ""
+
+#: of telebot.types.Sticker:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#sticker"
+msgstr ""
+
+#: of telebot.types.Sticker:12
+msgid ""
+"Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. "
+"The type of the sticker is independent from its format, which is "
+"determined by the fields is_animated and is_video."
+msgstr ""
+
+#: of telebot.types.Sticker:16
+msgid "Sticker width"
+msgstr ""
+
+#: of telebot.types.Sticker:19
+msgid "Sticker height"
+msgstr ""
+
+#: of telebot.types.Sticker:22
+msgid "True, if the sticker is animated"
+msgstr ""
+
+#: of telebot.types.Sticker:25
+msgid "True, if the sticker is a video sticker"
+msgstr ""
+
+#: of telebot.types.Sticker:28
+msgid "Optional. Sticker thumbnail in the .WEBP or .JPG format"
+msgstr ""
+
+#: of telebot.types.Sticker:31
+msgid "Optional. Emoji associated with the sticker"
+msgstr ""
+
+#: of telebot.types.Sticker:34
+msgid "Optional. Name of the sticker set to which the sticker belongs"
+msgstr ""
+
+#: of telebot.types.Sticker:37
+msgid "Optional. Premium animation for the sticker, if the sticker is premium"
+msgstr ""
+
+#: of telebot.types.Sticker:40
+msgid "Optional. For mask stickers, the position where the mask should be placed"
+msgstr ""
+
+#: of telebot.types.Sticker:43
+msgid "Optional. For custom emoji stickers, unique identifier of the custom emoji"
+msgstr ""
+
+#: of telebot.types.Sticker:46
+msgid ""
+"Optional. True, if the sticker must be repainted to a text color in "
+"messages, the color of the Telegram Premium badge in emoji status, white "
+"color on chat photos, or another appropriate color in other places"
+msgstr ""
+
+#: of telebot.types.Sticker:55
+msgid ":class:`telebot.types.Sticker`"
+msgstr ""
+
+#: of telebot.types.StickerSet:1
+msgid "This object represents a sticker set."
+msgstr ""
+
+#: of telebot.types.StickerSet:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#stickerset"
+msgstr ""
+
+#: of telebot.types.StickerSet:5
+msgid "Sticker set name"
+msgstr ""
+
+#: of telebot.types.StickerSet:8
+msgid "Sticker set title"
+msgstr ""
+
+#: of telebot.types.StickerSet:11
+msgid ""
+"Type of stickers in the set, currently one of “regular”, “mask”, "
+"“custom_emoji”"
+msgstr ""
+
+#: of telebot.types.StickerSet:14
+msgid "True, if the sticker set contains animated stickers"
+msgstr ""
+
+#: of telebot.types.StickerSet:17
+msgid "True, if the sticker set contains video stickers"
+msgstr ""
+
+#: of telebot.types.StickerSet:23
+msgid "List of all set stickers"
+msgstr ""
+
+#: of telebot.types.StickerSet:26
+msgid "Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format"
+msgstr ""
+
+#: of telebot.types.StickerSet:30
+msgid ":class:`telebot.types.StickerSet`"
+msgstr ""
+
+#: of telebot.types.StickerSet.contains_masks:1
+msgid "Deprecated since Bot API 6.2, use sticker_type instead."
+msgstr ""
+
+#: of telebot.types.Story:1
+msgid ""
+"This object represents a message about a forwarded story in the chat. "
+"Currently holds no information."
+msgstr ""
+
+#: of telebot.types.SuccessfulPayment:1
+msgid "This object contains basic information about a successful payment."
+msgstr ""
+
+#: of telebot.types.SuccessfulPayment:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#successfulpayment"
+msgstr ""
+
+#: of telebot.types.SuccessfulPayment:22
+msgid "Telegram payment identifier"
+msgstr ""
+
+#: of telebot.types.SuccessfulPayment:25
+msgid "Provider payment identifier"
+msgstr ""
+
+#: of telebot.types.SuccessfulPayment:29
+msgid ":class:`telebot.types.SuccessfulPayment`"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:1
+msgid ""
+"Represents an inline button that switches the current user to inline mode"
+" in a chosen chat, with an optional default inline query."
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:6
+msgid ""
+"Optional. The default inline query to be inserted in the input field. If "
+"left empty, only the bot's username will be inserted"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:10
+msgid "Optional. True, if private chats with users can be chosen"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:13
+msgid "Optional. True, if private chats with bots can be chosen"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:16
+msgid "Optional. True, if group and supergroup chats can be chosen"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:19
+msgid "Optional. True, if channel chats can be chosen"
+msgstr ""
+
+#: of telebot.types.SwitchInlineQueryChosenChat:23
+msgid ":class:`SwitchInlineQueryChosenChat`"
+msgstr ""
+
+#: of telebot.types.TextQuote:1
+msgid ""
+"This object contains information about the quoted part of a message that "
+"is replied to by the given message."
+msgstr ""
+
+#: of telebot.types.TextQuote:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#textquote"
+msgstr ""
+
+#: of telebot.types.TextQuote:5
+msgid ""
+"Text of the quoted part of a message that is replied to by the given "
+"message"
+msgstr ""
+
+#: of telebot.types.TextQuote:8
+msgid ""
+"Optional. Special entities that appear in the quote. Currently, only "
+"bold, italic, underline, strikethrough, spoiler, and custom_emoji "
+"entities are kept in quotes."
+msgstr ""
+
+#: of telebot.types.TextQuote:11
+msgid ""
+"Approximate quote position in the original message in UTF-16 code units "
+"as specified by the sender"
+msgstr ""
+
+#: of telebot.types.TextQuote:14
+msgid ""
+"Optional. True, if the quote was chosen manually by the message sender. "
+"Otherwise, the quote was added automatically by the server."
+msgstr ""
+
+#: of telebot.types.TextQuote:18
+msgid ":class:`TextQuote`"
+msgstr ""
+
+#: of telebot.types.Update:1
+msgid ""
+"This object represents an incoming update.At most one of the optional "
+"parameters can be present in any given update."
+msgstr ""
+
+#: of telebot.types.Update:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#update"
+msgstr ""
+
+#: of telebot.types.Update:5
+msgid ""
+"The update's unique identifier. Update identifiers start from a certain "
+"positive number and increase sequentially. This ID becomes especially "
+"handy if you're using webhooks, since it allows you to ignore repeated "
+"updates or to restore the correct update sequence, should they get out of"
+" order. If there are no new updates for at least a week, then identifier "
+"of the next update will be chosen randomly instead of sequentially."
+msgstr ""
+
+#: of telebot.types.Update:11
+msgid "Optional. New incoming message of any kind - text, photo, sticker, etc."
+msgstr ""
+
+#: of telebot.types.Update:14
+msgid "Optional. New version of a message that is known to the bot and was edited"
+msgstr ""
+
+#: of telebot.types.Update:17
+msgid ""
+"Optional. New incoming channel post of any kind - text, photo, sticker, "
+"etc."
+msgstr ""
+
+#: of telebot.types.Update:20
+msgid ""
+"Optional. New version of a channel post that is known to the bot and was "
+"edited"
+msgstr ""
+
+#: of telebot.types.Update:23
+msgid ""
+"Optional. A reaction to a message was changed by a user. The bot must be "
+"an administrator in the chat and must explicitly specify "
+"\"message_reaction\" in the list of allowed_updates to receive these "
+"updates. The update isn't received for reactions set by bots."
+msgstr ""
+
+#: of telebot.types.Update:27
+msgid ""
+"Optional. Reactions to a message with anonymous reactions were changed. "
+"The bot must be an administrator in the chat and must explicitly specify "
+"\"message_reaction_count\" in the list of allowed_updates to receive "
+"these updates."
+msgstr ""
+
+#: of telebot.types.Update:31
+msgid "Optional. New incoming inline query"
+msgstr ""
+
+#: of telebot.types.Update:34
+msgid ""
+"Optional. The result of an inline query that was chosen by a user and "
+"sent to their chat partner. Please see our documentation on the feedback "
+"collecting for details on how to enable these updates for your bot."
+msgstr ""
+
+#: of telebot.types.Update:39
+msgid "Optional. New incoming callback query"
+msgstr ""
+
+#: of telebot.types.Update:42
+msgid ""
+"Optional. New incoming shipping query. Only for invoices with flexible "
+"price"
+msgstr ""
+
+#: of telebot.types.Update:45
+msgid ""
+"Optional. New incoming pre-checkout query. Contains full information "
+"about checkout"
+msgstr ""
+
+#: of telebot.types.Update:49
+msgid ""
+"Optional. New poll state. Bots receive only updates about stopped polls "
+"and polls, which are sent by the bot"
+msgstr ""
+
+#: of telebot.types.Update:53
+msgid ""
+"Optional. A user changed their answer in a non-anonymous poll. Bots "
+"receive new votes only in polls that were sent by the bot itself."
+msgstr ""
+
+#: of telebot.types.Update:57
+msgid ""
+"Optional. The bot's chat member status was updated in a chat. For private"
+" chats, this update is received only when the bot is blocked or unblocked"
+" by the user."
+msgstr ""
+
+#: of telebot.types.Update:61
+msgid ""
+"Optional. A chat member's status was updated in a chat. The bot must be "
+"an administrator in the chat and must explicitly specify “chat_member” in"
+" the list of allowed_updates to receive these updates."
+msgstr ""
+
+#: of telebot.types.Update:65
+msgid ""
+"Optional. A request to join the chat has been sent. The bot must have the"
+" can_invite_users administrator right in the chat to receive these "
+"updates."
+msgstr ""
+
+#: of telebot.types.Update:69
+msgid ""
+"Optional. A chat boost was added or changed. The bot must be an "
+"administrator in the chat to receive these updates."
+msgstr ""
+
+#: of telebot.types.Update:72
+msgid ""
+"Optional. A chat boost was removed. The bot must be an administrator in "
+"the chat to receive these updates."
+msgstr ""
+
+#: of telebot.types.Update:76
+msgid ":class:`telebot.types.Update`"
+msgstr ""
+
+#: of telebot.types.User:1
+msgid "This object represents a Telegram user or bot."
+msgstr ""
+
+#: of telebot.types.User:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#user"
+msgstr ""
+
+#: of telebot.types.User:5
+msgid ""
+"Unique identifier for this user or bot. This number may have more than 32"
+" significant bits and some programming languages may have "
+"difficulty/silent defects in interpreting it. But it has at most 52 "
+"significant bits, so a 64-bit integer or double-precision float type are "
+"safe for storing this identifier."
+msgstr ""
+
+#: of telebot.types.User:10
+msgid "True, if this user is a bot"
+msgstr ""
+
+#: of telebot.types.User:13
+msgid "User's or bot's first name"
+msgstr ""
+
+#: of telebot.types.User:16
+msgid "Optional. User's or bot's last name"
+msgstr ""
+
+#: of telebot.types.User:19
+msgid "Optional. User's or bot's username"
+msgstr ""
+
+#: of telebot.types.User:22
+msgid "Optional. IETF language tag of the user's language"
+msgstr ""
+
+#: of telebot.types.User:25
+msgid "Optional. :obj:`bool`, if this user is a Telegram Premium user"
+msgstr ""
+
+#: of telebot.types.User:28
+msgid "Optional. :obj:`bool`, if this user added the bot to the attachment menu"
+msgstr ""
+
+#: of telebot.types.User:31
+msgid ""
+"Optional. True, if the bot can be invited to groups. Returned only in "
+"getMe."
+msgstr ""
+
+#: of telebot.types.User:34
+msgid ""
+"Optional. True, if privacy mode is disabled for the bot. Returned only in"
+" getMe."
+msgstr ""
+
+#: of telebot.types.User:38
+msgid ""
+"Optional. True, if the bot supports inline queries. Returned only in "
+"getMe."
+msgstr ""
+
+#: of telebot.types.User:42
+msgid ":class:`telebot.types.User`"
+msgstr ""
+
+#: of telebot.types.User.full_name:1
+msgid "User's full name"
+msgstr ""
+
+#: of telebot.types.User.full_name
+msgid "type"
+msgstr ""
+
+#: of telebot.types.User.full_name:3
+msgid "return"
+msgstr ""
+
+#: of telebot.types.UserChatBoosts:1
+msgid "This object represents a list of boosts added to a chat by a user."
+msgstr ""
+
+#: of telebot.types.UserChatBoosts:3
+msgid "Telegram documentation: https://core.telegram.org/bots/api#userchatboosts"
+msgstr ""
+
+#: of telebot.types.UserChatBoosts:5
+msgid "The list of boosts added to the chat by the user"
+msgstr ""
+
+#: of telebot.types.UserChatBoosts:9
+msgid ":class:`UserChatBoosts`"
+msgstr ""
+
+#: of telebot.types.UserProfilePhotos:1
+msgid "This object represent a user's profile pictures."
+msgstr ""
+
+#: of telebot.types.UserProfilePhotos:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#userprofilephotos"
+msgstr ""
+
+#: of telebot.types.UserProfilePhotos:5
+msgid "Total number of profile pictures the target user has"
+msgstr ""
+
+#: of telebot.types.UserProfilePhotos:8
+msgid "Requested profile pictures (in up to 4 sizes each)"
+msgstr ""
+
+#: of telebot.types.UserProfilePhotos:12
+msgid ":class:`telebot.types.UserProfilePhotos`"
+msgstr ""
+
+#: of telebot.types.UsersShared:1
+msgid ""
+"This object contains information about the users whose identifiers were "
+"shared with the bot using a KeyboardButtonRequestUsers button."
+msgstr ""
+
+#: of telebot.types.UsersShared:4
+msgid "Telegram documentation: https://core.telegram.org/bots/api#usersshared"
+msgstr ""
+
+#: of telebot.types.UsersShared:6
+msgid "Identifier of the request"
+msgstr ""
+
+#: of telebot.types.UsersShared:9
+msgid ""
+"Identifiers of the shared users. These numbers may have more than 32 "
+"significant bits and some programming languages may have "
+"difficulty/silent defects in interpreting them. But they have at most 52 "
+"significant bits, so 64-bit integers or double-precision float types are "
+"safe for storing these identifiers. The bot may not have access to the "
+"users and could be unable to use these identifiers unless the users are "
+"already known to the bot by some other means."
+msgstr ""
+
+#: of telebot.types.UsersShared:18
+msgid ":class:`UsersShared`"
+msgstr ""
+
+#: of telebot.types.Venue:1
+msgid "This object represents a venue."
+msgstr ""
+
+#: of telebot.types.Venue:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#venue"
+msgstr ""
+
+#: of telebot.types.Venue:5
+msgid "Venue location. Can't be a live location"
+msgstr ""
+
+#: of telebot.types.Venue:14
+msgid "Optional. Foursquare identifier of the venue"
+msgstr ""
+
+#: of telebot.types.Venue:17
+msgid ""
+"Optional. Foursquare type of the venue. (For example, "
+"“arts_entertainment/default”, “arts_entertainment/aquarium” or "
+"“food/icecream”.)"
+msgstr ""
+
+#: of telebot.types.Venue:28
+msgid ":class:`telebot.types.Venue`"
+msgstr ""
+
+#: of telebot.types.Video:1
+msgid "This object represents a video file."
+msgstr ""
+
+#: of telebot.types.Video:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#video"
+msgstr ""
+
+#: of telebot.types.Video:21 telebot.types.VideoNote:18
+msgid "Optional. Video thumbnail"
+msgstr ""
+
+#: of telebot.types.Video:36
+msgid ":class:`telebot.types.Video`"
+msgstr ""
+
+#: of telebot.types.VideoChatEnded:1
+msgid ""
+"This object represents a service message about a video chat ended in the "
+"chat."
+msgstr ""
+
+#: of telebot.types.VideoChatEnded:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#videochatended"
+msgstr ""
+
+#: of telebot.types.VideoChatEnded:5
+msgid "Video chat duration in seconds"
+msgstr ""
+
+#: of telebot.types.VideoChatEnded:9
+msgid ":class:`telebot.types.VideoChatEnded`"
+msgstr ""
+
+#: of telebot.types.VideoChatParticipantsInvited:1
+msgid ""
+"This object represents a service message about new members invited to a "
+"video chat."
+msgstr ""
+
+#: of telebot.types.VideoChatParticipantsInvited:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#videochatparticipantsinvited"
+msgstr ""
+
+#: of telebot.types.VideoChatParticipantsInvited:5
+msgid "New members that were invited to the video chat"
+msgstr ""
+
+#: of telebot.types.VideoChatParticipantsInvited:9
+msgid ":class:`telebot.types.VideoChatParticipantsInvited`"
+msgstr ""
+
+#: of telebot.types.VideoChatScheduled:1
+msgid ""
+"This object represents a service message about a video chat scheduled in "
+"the chat."
+msgstr ""
+
+#: of telebot.types.VideoChatScheduled:3
+msgid ""
+"Telegram Documentation: "
+"https://core.telegram.org/bots/api#videochatscheduled"
+msgstr ""
+
+#: of telebot.types.VideoChatScheduled:5
+msgid ""
+"Point in time (Unix timestamp) when the video chat is supposed to be "
+"started by a chat administrator"
+msgstr ""
+
+#: of telebot.types.VideoChatScheduled:10
+msgid ":class:`telebot.types.VideoChatScheduled`"
+msgstr ""
+
+#: of telebot.types.VideoChatStarted:1
+msgid ""
+"This object represents a service message about a video chat started in "
+"the chat. Currently holds no information."
+msgstr ""
+
+#: of telebot.types.VideoNote:1
+msgid ""
+"This object represents a video message (available in Telegram apps as of "
+"v.4.0)."
+msgstr ""
+
+#: of telebot.types.VideoNote:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#videonote"
+msgstr ""
+
+#: of telebot.types.VideoNote:12
+msgid ""
+"Video width and height (diameter of the video message) as defined by "
+"sender"
+msgstr ""
+
+#: of telebot.types.VideoNote:25
+msgid ":class:`telebot.types.VideoNote`"
+msgstr ""
+
+#: of telebot.types.Voice:1
+msgid "This object represents a voice note."
+msgstr ""
+
+#: of telebot.types.Voice:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#voice"
+msgstr ""
+
+#: of telebot.types.Voice:24
+msgid ":class:`telebot.types.Voice`"
+msgstr ""
+
+#: of telebot.types.VoiceChatEnded:1
+msgid "Bases: :py:class:`telebot.types.VideoChatEnded`"
+msgstr ""
+
+#: of telebot.types.VoiceChatEnded:1
+msgid "Deprecated, use :class:`VideoChatEnded` instead."
+msgstr ""
+
+#: of telebot.types.VoiceChatParticipantsInvited:1
+msgid "Bases: :py:class:`telebot.types.VideoChatParticipantsInvited`"
+msgstr ""
+
+#: of telebot.types.VoiceChatParticipantsInvited:1
+msgid "Deprecated, use :class:`VideoChatParticipantsInvited` instead."
+msgstr ""
+
+#: of telebot.types.VoiceChatScheduled:1
+msgid "Bases: :py:class:`telebot.types.VideoChatScheduled`"
+msgstr ""
+
+#: of telebot.types.VoiceChatScheduled:1
+msgid "Deprecated, use :class:`VideoChatScheduled` instead."
+msgstr ""
+
+#: of telebot.types.VoiceChatStarted:1
+msgid "Bases: :py:class:`telebot.types.VideoChatStarted`"
+msgstr ""
+
+#: of telebot.types.VoiceChatStarted:1
+msgid "Deprecated, use :class:`VideoChatStarted` instead."
+msgstr ""
+
+#: of telebot.types.WebAppData:1
+msgid "Describes data sent from a Web App to the bot."
+msgstr ""
+
+#: of telebot.types.WebAppData:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#webappdata"
+msgstr ""
+
+#: of telebot.types.WebAppData:5
+msgid ""
+"The data. Be aware that a bad client can send arbitrary data in this "
+"field."
+msgstr ""
+
+#: of telebot.types.WebAppData:8
+msgid ""
+"Text of the web_app keyboard button from which the Web App was opened. Be"
+" aware that a bad client can send arbitrary data in this field."
+msgstr ""
+
+#: of telebot.types.WebAppData:13
+msgid ":class:`telebot.types.WebAppData`"
+msgstr ""
+
+#: of telebot.types.WebAppInfo:1
+msgid "Describes a Web App."
+msgstr ""
+
+#: of telebot.types.WebAppInfo:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#webappinfo"
+msgstr ""
+
+#: of telebot.types.WebAppInfo:5
+msgid ""
+"An HTTPS URL of a Web App to be opened with additional data as specified "
+"in Initializing Web Apps"
+msgstr ""
+
+#: of telebot.types.WebAppInfo:9
+msgid ":class:`telebot.types.WebAppInfo`"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:1
+msgid "Describes the current status of a webhook."
+msgstr ""
+
+#: of telebot.types.WebhookInfo:3
+msgid "Telegram Documentation: https://core.telegram.org/bots/api#webhookinfo"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:5
+msgid "Webhook URL, may be empty if webhook is not set up"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:8
+msgid "True, if a custom certificate was provided for webhook certificate checks"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:11
+msgid "Number of updates awaiting delivery"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:14
+msgid "Optional. Currently used webhook IP address"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:17
+msgid ""
+"Optional. Unix time for the most recent error that happened when trying "
+"to deliver an update via webhook"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:21
+msgid ""
+"Optional. Error message in human-readable format for the most recent "
+"error that happened when trying to deliver an update via webhook"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:25
+msgid ""
+"Optional. Unix time of the most recent error that happened when trying to"
+" synchronize available updates with Telegram datacenters"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:29
+msgid ""
+"Optional. The maximum allowed number of simultaneous HTTPS connections to"
+" the webhook for update delivery"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:33
+msgid ""
+"Optional. A list of update types the bot is subscribed to. Defaults to "
+"all update types except chat_member"
+msgstr ""
+
+#: of telebot.types.WebhookInfo:38
+msgid ":class:`telebot.types.WebhookInfo`"
+msgstr ""
+
+#: of telebot.types.WriteAccessAllowed:1
+msgid ""
+"This object represents a service message about a user allowing a bot to "
+"write messages after adding it to the attachment menu, launching a Web "
+"App from a link, or accepting an explicit request from a Web App sent by "
+"the method requestWriteAccess."
+msgstr ""
+
+#: of telebot.types.WriteAccessAllowed:5
+msgid ""
+"Telegram documentation: "
+"https://core.telegram.org/bots/api#writeaccessallowed"
+msgstr ""
+
+#: of telebot.types.WriteAccessAllowed:7
+msgid ""
+"Optional. True, if the access was granted after the user accepted an "
+"explicit request from a Web App sent by the method requestWriteAccess"
+msgstr ""
+
+#: of telebot.types.WriteAccessAllowed:11
+msgid "Optional. Name of the Web App which was launched from a link"
+msgstr ""
+
+#: of telebot.types.WriteAccessAllowed:14
+msgid ""
+"Optional. True, if the access was granted when the bot was added to the "
+"attachment or side menu"
+msgstr ""
+
+#~ msgid "Type of the result, must be animation"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "True, if the user is allowed to"
+#~ " send audios, documents, photos, videos,"
+#~ " video notes and voice notes"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. True, if the user is "
+#~ "allowed to send audios, documents, "
+#~ "photos, videos, video notes and voice"
+#~ " notes, implies can_send_messages"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. True, if the user is "
+#~ "allowed to send animations, games, "
+#~ "stickers and use inline bots, implies"
+#~ " can_send_media_messages"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. True, if the user is "
+#~ "allowed to add web page previews "
+#~ "to their messages, implies "
+#~ "can_send_media_messages"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. Message with the callback "
+#~ "button that originated the query. Note"
+#~ " that message content and message "
+#~ "date will not be available if the"
+#~ " message is too old"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "deprecated. True, if the user is "
+#~ "allowed to send audios, documents, "
+#~ "photos, videos, video notes and voice"
+#~ " notes"
+#~ msgstr ""
+
+#~ msgid "Optional. Disables link previews for links in the sent message"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. If specified, pressing the "
+#~ "button will open a list of "
+#~ "suitable users. Tapping on any user "
+#~ "will send their identifier to the "
+#~ "bot in a “user_shared” service message."
+#~ " Available in private chats only."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Telegram documentation: "
+#~ "https://core.telegram.org/bots/api#keyboardbuttonrequestuser"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Signed 32-bit identifier of the request,"
+#~ " which will be received back in "
+#~ "the UserShared object. Must be unique"
+#~ " within the message"
+#~ msgstr ""
+
+#~ msgid ":class:`telebot.types.KeyboardButtonRequestUser`"
+#~ msgstr ""
+
+#~ msgid "Optional. For forwarded messages, sender of the original message"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. For messages forwarded from "
+#~ "channels or from anonymous administrators, "
+#~ "information about the original sender "
+#~ "chat"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. For messages forwarded from "
+#~ "channels, identifier of the original "
+#~ "message in the channel"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. For forwarded messages that "
+#~ "were originally sent in channels or "
+#~ "by an anonymous chat administrator, "
+#~ "signature of the message sender if "
+#~ "present"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. Sender's name for messages "
+#~ "forwarded from users who disallow adding"
+#~ " a link to their account in "
+#~ "forwarded messages"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Optional. For forwarded messages, date "
+#~ "the original message was sent in "
+#~ "Unix time"
+#~ msgstr ""
+
+#~ msgid "The user, who changed the answer to the poll"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "True, if the sticker set contains "
+#~ "masks. Deprecated since Bot API 6.2, "
+#~ "use sticker_type instead."
+#~ msgstr ""
+
+#~ msgid ""
+#~ "This object contains information about "
+#~ "the user whose identifier was shared "
+#~ "with the bot using a "
+#~ "`telebot.types.KeyboardButtonRequestUser` button."
+#~ msgstr ""
+
+#~ msgid "Telegram documentation: https://core.telegram.org/bots/api#usershared"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "Identifier of the shared user. This "
+#~ "number may have more than 32 "
+#~ "significant bits and some programming "
+#~ "languages may have difficulty/silent defects"
+#~ " in interpreting it. But it has "
+#~ "at most 52 significant bits, so a"
+#~ " 64-bit integer or double-precision "
+#~ "float type are safe for storing "
+#~ "this identifier. The bot may not "
+#~ "have access to the user and could"
+#~ " be unable to use this identifier,"
+#~ " unless the user is already known "
+#~ "to the bot by some other means."
+#~ msgstr ""
+
+#~ msgid ":class:`telebot.types.UserShared`"
+#~ msgstr ""
+
+#~ msgid ""
+#~ "This object represents a service message"
+#~ " about a user allowed to post "
+#~ "messages in the chat. Currently holds"
+#~ " no information."
+#~ msgstr ""
+
diff --git a/docs/source/locales/ru/LC_MESSAGES/util.po b/docs/source/locales/ru/LC_MESSAGES/util.po
new file mode 100644
index 000000000..1ba54df52
--- /dev/null
+++ b/docs/source/locales/ru/LC_MESSAGES/util.po
@@ -0,0 +1,393 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2022, coder2020official
+# This file is distributed under the same license as the pyTelegramBotAPI
+# Documentation package.
+# FIRST AUTHOR , 2022.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pyTelegramBotAPI Documentation \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2023-07-08 23:07+0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: ../../source/util.rst:3
+msgid "Utils"
+msgstr "Утилиты"
+
+#: ../../source/util.rst:5
+msgid "Utils in pyTelegramBotAPI"
+msgstr "Утилиты в pyTelegramBotAPI"
+
+#: ../../source/util.rst:5
+msgid "ptba, pytba, pyTelegramBotAPI, utils, guide"
+msgstr "ptba, pytba, pyTelegramBotAPI, утилиты, гайд"
+
+#: ../../source/util.rst:11
+msgid "util file"
+msgstr "Файл util"
+
+#: of telebot.util.antiflood:1
+msgid ""
+"Use this function inside loops in order to avoid getting TooManyRequests "
+"error. Example:"
+msgstr ""
+"Используйте эту функцию в циклах, чтобы избежать ошибки TooManyRequests. "
+"Пример:"
+
+#: of telebot.service_utils.is_bytes telebot.service_utils.is_dict
+#: telebot.service_utils.is_pil_image telebot.util.antiflood
+#: telebot.util.escape telebot.util.extract_arguments
+#: telebot.util.extract_command telebot.util.is_command
+#: telebot.util.parse_web_app_data telebot.util.quick_markup
+#: telebot.util.smart_split telebot.util.split_string telebot.util.user_link
+#: telebot.util.validate_web_app_data telebot.util.webhook_google_functions
+msgid "Parameters"
+msgstr ""
+
+#: of telebot.util.antiflood:10
+msgid "The function to call"
+msgstr "Вызываемая функция"
+
+#: of telebot.util.antiflood:13
+msgid "Number of retries to send"
+msgstr ""
+
+#: of telebot.util.antiflood:16
+msgid "The arguments to pass to the function"
+msgstr "Аргументы, для передачи в функцию"
+
+#: of telebot.util.antiflood:19
+msgid "The keyword arguments to pass to the function"
+msgstr "Именованные аргументы для передачи в функцию"
+
+#: of telebot.service_utils.generate_random_token
+#: telebot.service_utils.is_bytes telebot.service_utils.is_dict
+#: telebot.service_utils.is_pil_image telebot.util.antiflood
+#: telebot.util.escape telebot.util.extract_arguments
+#: telebot.util.extract_command telebot.util.is_command
+#: telebot.util.parse_web_app_data telebot.util.quick_markup
+#: telebot.util.smart_split telebot.util.split_string telebot.util.user_link
+#: telebot.util.validate_web_app_data telebot.util.webhook_google_functions
+msgid "Returns"
+msgstr ""
+
+#: of telebot.util.antiflood:22
+msgid "None"
+msgstr ""
+
+#: of telebot.service_utils.chunks:1
+msgid "Yield successive n-sized chunks from lst."
+msgstr "Генерирует последовательные части списка, состоящие из n элементов."
+
+#: ../../docstring of telebot.util.content_type_media:1
+msgid "Contains all media content types."
+msgstr "Содержит все виды медиа."
+
+#: ../../docstring of telebot.util.content_type_service:1
+msgid "Contains all service content types such as `User joined the group`."
+msgstr "Содержит все виды сервисных сообщений, такие как `User joined the group`."
+
+#: of telebot.util.escape:1
+msgid ""
+"Replaces the following chars in `text` ('&' with '&', '<' with '<'"
+" and '>' with '>')."
+msgstr ""
+"Заменяет следующие символы в `text` ('&' на '&', '<' на '<' и '>' "
+"на '>')."
+
+#: of telebot.util.escape:3
+msgid "the text to escape"
+msgstr "Текст для замены символов"
+
+#: of telebot.util.escape:4
+msgid "the escaped text"
+msgstr "Отформатированный текст"
+
+#: of telebot.util.extract_arguments:1
+msgid "Returns the argument after the command."
+msgstr "Возвращает аргументы команды."
+
+#: of telebot.util.extract_arguments:3 telebot.util.extract_command:4
+msgid "Examples:"
+msgstr "Примеры:"
+
+#: of telebot.util.extract_arguments:10
+msgid "String to extract the arguments from a command"
+msgstr "Строка для извлечения аргументов команды"
+
+#: of telebot.util.extract_arguments:13
+msgid "the arguments if `text` is a command (according to is_command), else None."
+msgstr ""
+"Аргументы, если `text` является командой (согласно is_command), в "
+"остальных случаях None."
+
+#: of telebot.service_utils.generate_random_token
+#: telebot.service_utils.is_bytes telebot.service_utils.is_dict
+#: telebot.service_utils.is_pil_image telebot.util.extract_arguments
+#: telebot.util.extract_command telebot.util.is_command
+#: telebot.util.quick_markup telebot.util.smart_split telebot.util.split_string
+#: telebot.util.user_link
+msgid "Return type"
+msgstr ""
+
+#: of telebot.util.extract_arguments:14 telebot.util.extract_command:16
+msgid ":obj:`str` or :obj:`None`"
+msgstr ":obj:`str` или :obj:`None`"
+
+#: of telebot.util.extract_command:1
+msgid ""
+"Extracts the command from `text` (minus the '/') if `text` is a command "
+"(see is_command). If `text` is not a command, this function returns None."
+msgstr ""
+"Извлекает команду из `text` (исключает '/') если `text` является командой"
+" (см. is_command). Если `text` не является командой, эта функция "
+"возвращает None."
+
+#: of telebot.util.extract_command:12
+msgid "String to extract the command from"
+msgstr "Строка, из которой нужно извлечь команду"
+
+#: of telebot.util.extract_command:15
+msgid "the command if `text` is a command (according to is_command), else None."
+msgstr ""
+"Команда, если `text` является командой (согласно is_command), в остальных"
+" случаях None."
+
+#: of telebot.service_utils.generate_random_token:1
+msgid ""
+"Generates a random token consisting of letters and digits, 16 characters "
+"long."
+msgstr ""
+"Генерирует рандомный токен, состоящий из латинских букв и цифр длиной 16 "
+"символов."
+
+#: of telebot.service_utils.generate_random_token:3
+msgid "a random token"
+msgstr "Сгенерированный токен"
+
+#: of telebot.service_utils.generate_random_token:4 telebot.util.user_link:22
+msgid ":obj:`str`"
+msgstr ""
+
+#: of telebot.service_utils.is_bytes:1
+msgid "Returns True if the given object is a bytes object."
+msgstr "Возвращает True если полученный объект является bytes."
+
+#: of telebot.service_utils.is_bytes:3 telebot.service_utils.is_dict:3
+#: telebot.service_utils.is_pil_image:3
+msgid "object to be checked"
+msgstr "Объект для проверки"
+
+#: of telebot.service_utils.is_bytes:6
+msgid "True if the given object is a bytes object."
+msgstr "True, если полученный объект является bytes."
+
+#: of telebot.service_utils.is_bytes:7 telebot.service_utils.is_dict:7
+#: telebot.service_utils.is_pil_image:7 telebot.util.is_command:7
+msgid ":obj:`bool`"
+msgstr ""
+
+#: of telebot.util.is_command:1
+msgid ""
+"Checks if `text` is a command. Telegram chat commands start with the '/' "
+"character."
+msgstr ""
+"Проверяет, является ли `text` командой. Команды в Telegram начинаются с "
+"символа '/'."
+
+#: of telebot.util.is_command:3
+msgid "Text to check."
+msgstr "Текст для проверки."
+
+#: of telebot.util.is_command:6
+msgid "True if `text` is a command, else False."
+msgstr "True, если `text` является командой, иначе False."
+
+#: of telebot.service_utils.is_dict:1
+msgid "Returns True if the given object is a dictionary."
+msgstr "Возвращает True, если полученный объект является словарём (dict)."
+
+#: of telebot.service_utils.is_dict:6
+msgid "True if the given object is a dictionary."
+msgstr "True, если полученный объект является словарём (dict)."
+
+#: of telebot.service_utils.is_pil_image:1
+msgid "Returns True if the given object is a PIL.Image.Image object."
+msgstr "Возвращает True, если полученный объект является PIL.Image.Image."
+
+#: of telebot.service_utils.is_pil_image:6
+msgid "True if the given object is a PIL.Image.Image object."
+msgstr "True, если полученный объект является PIL.Image.Image."
+
+#: of telebot.service_utils.is_string:1
+msgid "Returns True if the given object is a string."
+msgstr "Возвращает True, если полученный объект является строкой (str)."
+
+#: of telebot.util.parse_web_app_data:1
+msgid "Parses web app data."
+msgstr "Обрабатывает данные, полученные от web app."
+
+#: of telebot.util.parse_web_app_data:3 telebot.util.validate_web_app_data:3
+msgid "The bot token"
+msgstr "Токен бота"
+
+#: of telebot.util.parse_web_app_data:6 telebot.util.validate_web_app_data:6
+msgid "The raw init data"
+msgstr "Необработанные данные"
+
+#: of telebot.util.parse_web_app_data:9 telebot.util.validate_web_app_data:9
+msgid "The parsed init data"
+msgstr "Обработанные данные"
+
+#: of telebot.util.quick_markup:1
+msgid ""
+"Returns a reply markup from a dict in this format: {'text': kwargs} This "
+"is useful to avoid always typing 'btn1 = InlineKeyboardButton(...)' 'btn2"
+" = InlineKeyboardButton(...)'"
+msgstr ""
+"Возвращает reply markup из словаря следующего формата: {'text': kwargs}. "
+"Удобно использовать вместо постоянного использования 'btn1 = "
+"InlineKeyboardButton(...)' 'btn2 = InlineKeyboardButton(...)'"
+
+#: of telebot.util.quick_markup:4 telebot.util.user_link:5
+msgid "Example:"
+msgstr "Пример:"
+
+#: of telebot.util.quick_markup:6
+msgid "Using quick_markup:"
+msgstr "Используя quick_markup:"
+
+#: of telebot.util.quick_markup:31
+msgid ""
+"a dict containing all buttons to create in this format: {text: kwargs} "
+"{str:}"
+msgstr ""
+"Словарь, содержащий все кнопки для создания reply markup в следующем "
+"формате: {text: kwargs} {str:}"
+
+#: of telebot.util.quick_markup:34
+msgid "number of :class:`telebot.types.InlineKeyboardButton` objects on each row"
+msgstr ""
+
+#: of telebot.util.quick_markup:37
+msgid "InlineKeyboardMarkup"
+msgstr ""
+
+#: of telebot.util.quick_markup:38
+msgid ":obj:`types.InlineKeyboardMarkup`"
+msgstr ""
+
+#: of telebot.util.smart_split:1
+msgid ""
+"Splits one string into multiple strings, with a maximum amount of "
+"`chars_per_string` characters per string. This is very useful for "
+"splitting one giant message into multiples. If `chars_per_string` > 4096:"
+" `chars_per_string` = 4096. Splits by '\\n', '. ' or ' ' in exactly this "
+"priority."
+msgstr ""
+"Разбивает строку на несколько, каждая из которых будет не длиннее "
+"`characters_per_string`. Удобно использовать для разбиения одного "
+"гигантского сообщения на несколько. Если `chars_per_string` > 4096: "
+"`chars_per_string` = 4096. Разбивает строку по '\\n', '. ' или ' ' именно"
+" в таком порядке."
+
+#: of telebot.util.smart_split:6 telebot.util.split_string:4
+msgid "The text to split"
+msgstr "Текст для разбиения"
+
+#: of telebot.util.smart_split:9
+msgid "The number of maximum characters per part the text is split to."
+msgstr ""
+"Максимальное количество символов в части текста, на которые он будет "
+"разбит."
+
+#: of telebot.util.smart_split:12 telebot.util.split_string:10
+msgid "The splitted text as a list of strings."
+msgstr "Список частей разбитого текста."
+
+#: of telebot.util.smart_split:13 telebot.util.split_string:11
+msgid ":obj:`list` of :obj:`str`"
+msgstr ""
+
+#: of telebot.util.split_string:1
+msgid ""
+"Splits one string into multiple strings, with a maximum amount of "
+"`chars_per_string` characters per string. This is very useful for "
+"splitting one giant message into multiples."
+msgstr ""
+"Разбивает одну строку на несколько, каждая из которых будет не длиннее "
+"`characters_per_string`. Удобно использовать для разбиения одного "
+"гигантского сообщения на несколько."
+
+#: of telebot.util.split_string:7
+msgid "The number of characters per line the text is split into."
+msgstr "Количество символов в одной строке, на которые будет разбит текст."
+
+#: ../../docstring of telebot.util.update_types:1
+msgid "All update types, should be used for allowed_updates parameter in polling."
+msgstr ""
+"Все виды апдейтов, рекомендуется использовать в качестве параметра "
+"allowed_updates функции polling."
+
+#: of telebot.util.user_link:1
+msgid ""
+"Returns an HTML user link. This is useful for reports. Attention: Don't "
+"forget to set parse_mode to 'HTML'!"
+msgstr ""
+"Возвращает HTML ссылку на пользователя. Удобно использовать для отчетов. "
+"Важно: Не забудьте установить значение 'HTML' в parse_mode!"
+
+#: of telebot.util.user_link:11
+msgid ""
+"You can use formatting.* for all other formatting options(bold, italic, "
+"links, and etc.) This method is kept for backward compatibility, and it "
+"is recommended to use formatting.* for more options."
+msgstr ""
+"Вы можете использовать formatting.* во всех остальных вариантах "
+"форматирования(bold, italic, links, и прочее). Этот метод сохранён для "
+"обратной совместимости, рекомендуется использовать formatting.* для "
+"большего количества вариантов."
+
+#: of telebot.util.user_link:15
+msgid "the user (not the user_id)"
+msgstr "Пользователь (не id пользователя)"
+
+#: of telebot.util.user_link:18
+msgid "include the user_id"
+msgstr "Добавить id пользователя"
+
+#: of telebot.util.user_link:21
+msgid "HTML user link"
+msgstr "Ссылка на пользователя в формате HTML"
+
+#: of telebot.util.validate_web_app_data:1
+msgid "Validates web app data."
+msgstr "Проверяет данные, полученные от web app."
+
+#: of telebot.util.webhook_google_functions:1
+msgid "A webhook endpoint for Google Cloud Functions FaaS."
+msgstr "Endpoint вебхука для Google Cloud Functions FaaS."
+
+#: of telebot.util.webhook_google_functions:3
+msgid "The bot instance"
+msgstr "Инстанс бота"
+
+#: of telebot.util.webhook_google_functions:6
+msgid "The request object"
+msgstr "HTTP-запрос"
+
+#: of telebot.util.webhook_google_functions:9
+msgid "The response object"
+msgstr "Объект, полученный в качестве ответа"
+
+#~ msgid "int row width"
+#~ msgstr "Количество кнопок в одной строке, int"
+
diff --git a/docs/source/quick_start.rst b/docs/source/quick_start.rst
new file mode 100644
index 000000000..188a70775
--- /dev/null
+++ b/docs/source/quick_start.rst
@@ -0,0 +1,20 @@
+
+===========
+Quick start
+===========
+
+.. meta::
+ :description: Quickstart guide
+ :keywords: ptba, pytba, pyTelegramBotAPI, quickstart, guide
+
+Synchronous TeleBot
+-------------------
+.. literalinclude:: ../../examples/echo_bot.py
+ :language: python
+
+Asynchronous TeleBot
+--------------------
+.. literalinclude:: ../../examples/asynchronous_telebot/echo_bot.py
+ :language: python
+
+
diff --git a/docs/source/sync_version/index.rst b/docs/source/sync_version/index.rst
new file mode 100644
index 000000000..df8ce1a17
--- /dev/null
+++ b/docs/source/sync_version/index.rst
@@ -0,0 +1,41 @@
+===============
+TeleBot version
+===============
+
+.. meta::
+ :description: Synchronous pyTelegramBotAPI documentation
+ :keywords: ptba, pytba, pyTelegramBotAPI, methods, guide, files, sync
+
+TeleBot methods
+---------------
+.. automodule:: telebot
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+custom_filters file
+------------------------------
+
+.. automodule:: telebot.custom_filters
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+handler_backends file
+--------------------------------
+
+.. automodule:: telebot.handler_backends
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+
+Extensions
+------------------------
+
+
+
+.. automodule:: telebot.ext.sync.webhooks
+ :members:
+ :undoc-members:
+ :show-inheritance:
\ No newline at end of file
diff --git a/docs/source/types.rst b/docs/source/types.rst
new file mode 100644
index 000000000..074b12ab9
--- /dev/null
+++ b/docs/source/types.rst
@@ -0,0 +1,10 @@
+============
+Types of API
+============
+
+
+
+.. automodule:: telebot.types
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/source/util.rst b/docs/source/util.rst
new file mode 100644
index 000000000..2986df1b2
--- /dev/null
+++ b/docs/source/util.rst
@@ -0,0 +1,16 @@
+============
+Utils
+============
+
+.. meta::
+ :description: Utils in pyTelegramBotAPI
+ :keywords: ptba, pytba, pyTelegramBotAPI, utils, guide
+
+
+util file
+-------------------
+
+.. automodule:: telebot.util
+ :members:
+ :undoc-members:
+ :show-inheritance:
\ No newline at end of file
diff --git a/examples/anonymous_bot.py b/examples/anonymous_bot.py
new file mode 100644
index 000000000..70c44b90d
--- /dev/null
+++ b/examples/anonymous_bot.py
@@ -0,0 +1,117 @@
+# This bot is needed to connect two people and their subsequent anonymous communication
+#
+# Avaiable commands:
+# `/start` - Just send you a messsage how to start
+# `/find` - Find a person you can contact
+# `/stop` - Stop active conversation
+
+import telebot
+from telebot import types
+
+# Initialize bot with your token
+bot = telebot.TeleBot('TOKEN')
+
+# The `users` variable is needed to contain chat ids that are either in the search or in the active dialog, like {chat_id, chat_id}
+users = {}
+# The `freeid` variable is needed to contain chat id, that want to start conversation
+# Or, in other words: chat id of user in the search
+freeid = None
+
+# `/start` command handler
+#
+# That command only sends you 'Just use /find command!'
+@bot.message_handler(commands=['start'])
+def start(message: types.Message):
+ bot.send_message(message.chat.id, 'Just use /find command!')
+
+# `/find` command handler
+#
+# That command finds opponent for you
+#
+# That command according to the following principle:
+# 1. You have written `/find` command
+# 2. If you are already in the search or have an active dialog, bot sends you 'Shut up!'
+# 3. If not:
+# 3.1. Bot sends you 'Finding...'
+# 3.2. If there is no user in the search:
+# 3.2.2. `freeid` updated with `your_chat_id`
+# 3.3. If there is user in the search:
+# 3.3.1. Both you and the user in the search recieve the message 'Founded!'
+# 3.3.2. `users` updated with a {user_in_the_search_chat_id, your_chat_id}
+# 3.3.3. `users` updated with a {your_chat_id, user_in_the_search_id}
+# 3.3.4. `freeid` updated with `None`
+@bot.message_handler(commands=['find'])
+def find(message: types.Message):
+ global freeid
+
+ if message.chat.id not in users:
+ bot.send_message(message.chat.id, 'Finding...')
+
+ if freeid is None:
+ freeid = message.chat.id
+ else:
+ # Question:
+ # Is there any way to simplify this like `bot.send_message([message.chat.id, freeid], 'Founded!')`?
+ bot.send_message(message.chat.id, 'Founded!')
+ bot.send_message(freeid, 'Founded!')
+
+ users[freeid] = message.chat.id
+ users[message.chat.id] = freeid
+ freeid = None
+
+ print(users, freeid) # Debug purpose, you can remove that line
+ else:
+ bot.send_message(message.chat.id, 'Shut up!')
+
+# `/stop` command handler
+#
+# That command stops your current conversation (if it exist)
+#
+# That command according to the following principle:
+# 1. You have written `/stop` command
+# 2. If you are not have active dialog or you are not in search, bot sends you 'You are not in search!'
+# 3. If you are in active dialog:
+# 3.1. Bot sends you 'Stopping...'
+# 3.2. Bot sends 'Your opponent is leavin`...' to your opponent
+# 3.3. {your_opponent_chat_id, your_chat_id} removes from `users`
+# 3.4. {your_chat_id, your_opponent_chat_id} removes from `users`
+# 4. If you are only in search:
+# 4.1. Bot sends you 'Stopping...'
+# 4.2. `freeid` updated with `None`
+@bot.message_handler(commands=['stop'])
+def stop(message: types.Message):
+ global freeid
+
+ if message.chat.id in users:
+ bot.send_message(message.chat.id, 'Stopping...')
+ bot.send_message(users[message.chat.id], 'Your opponent is leavin`...')
+
+ del users[users[message.chat.id]]
+ del users[message.chat.id]
+
+ print(users, freeid) # Debug purpose, you can remove that line
+ elif message.chat.id == freeid:
+ bot.send_message(message.chat.id, 'Stopping...')
+ freeid = None
+
+ print(users, freeid) # Debug purpose, you can remove that line
+ else:
+ bot.send_message(message.chat.id, 'You are not in search!')
+
+# message handler for conversation
+#
+# That handler needed to send message from one opponent to another
+# If you are not in `users`, you will recieve a message 'No one can hear you...'
+# Otherwise all your messages are sent to your opponent
+#
+# Questions:
+# 1. Is there any way to improve readability like `content_types=['all']`?
+# 2. Is there any way to register this message handler only when i found the opponent?
+@bot.message_handler(content_types=['animation', 'audio', 'contact', 'dice', 'document', 'location', 'photo', 'poll', 'sticker', 'text', 'venue', 'video', 'video_note', 'voice'])
+def chatting(message: types.Message):
+ if message.chat.id in users:
+ bot.copy_message(users[message.chat.id], users[users[message.chat.id]], message.id)
+ else:
+ bot.send_message(message.chat.id, 'No one can hear you...')
+
+bot.infinity_polling(skip_pending=True)
diff --git a/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/filters.py b/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/filters.py
new file mode 100644
index 000000000..7c5c3043b
--- /dev/null
+++ b/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/filters.py
@@ -0,0 +1,26 @@
+from telebot import types
+from telebot.async_telebot import AsyncTeleBot
+from telebot.asyncio_filters import AdvancedCustomFilter
+from telebot.callback_data import CallbackData, CallbackDataFilter
+
+calendar_factory = CallbackData("year", "month", prefix="calendar")
+calendar_zoom = CallbackData("year", prefix="calendar_zoom")
+
+
+class CalendarCallbackFilter(AdvancedCustomFilter):
+ key = 'calendar_config'
+
+ async def check(self, call: types.CallbackQuery, config: CallbackDataFilter):
+ return config.check(query=call)
+
+
+class CalendarZoomCallbackFilter(AdvancedCustomFilter):
+ key = 'calendar_zoom_config'
+
+ async def check(self, call: types.CallbackQuery, config: CallbackDataFilter):
+ return config.check(query=call)
+
+
+def bind_filters(bot: AsyncTeleBot):
+ bot.add_custom_filter(CalendarCallbackFilter())
+ bot.add_custom_filter(CalendarZoomCallbackFilter())
diff --git a/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/keyboards.py b/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/keyboards.py
new file mode 100644
index 000000000..1aee88c24
--- /dev/null
+++ b/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/keyboards.py
@@ -0,0 +1,92 @@
+import calendar
+from datetime import date, timedelta
+
+from filters import calendar_factory, calendar_zoom
+from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton
+
+EMTPY_FIELD = '1'
+WEEK_DAYS = [calendar.day_abbr[i] for i in range(7)]
+MONTHS = [(i, calendar.month_name[i]) for i in range(1, 13)]
+
+
+def generate_calendar_days(year: int, month: int):
+ keyboard = InlineKeyboardMarkup(row_width=7)
+ today = date.today()
+
+ keyboard.add(
+ InlineKeyboardButton(
+ text=date(year=year, month=month, day=1).strftime('%b %Y'),
+ callback_data=EMTPY_FIELD
+ )
+ )
+ keyboard.add(*[
+ InlineKeyboardButton(
+ text=day,
+ callback_data=EMTPY_FIELD
+ )
+ for day in WEEK_DAYS
+ ])
+
+ for week in calendar.Calendar().monthdayscalendar(year=year, month=month):
+ week_buttons = []
+ for day in week:
+ day_name = ' '
+ if day == today.day and today.year == year and today.month == month:
+ day_name = '🔘'
+ elif day != 0:
+ day_name = str(day)
+ week_buttons.append(
+ InlineKeyboardButton(
+ text=day_name,
+ callback_data=EMTPY_FIELD
+ )
+ )
+ keyboard.add(*week_buttons)
+
+ previous_date = date(year=year, month=month, day=1) - timedelta(days=1)
+ next_date = date(year=year, month=month, day=1) + timedelta(days=31)
+
+ keyboard.add(
+ InlineKeyboardButton(
+ text='Previous month',
+ callback_data=calendar_factory.new(year=previous_date.year, month=previous_date.month)
+ ),
+ InlineKeyboardButton(
+ text='Zoom out',
+ callback_data=calendar_zoom.new(year=year)
+ ),
+ InlineKeyboardButton(
+ text='Next month',
+ callback_data=calendar_factory.new(year=next_date.year, month=next_date.month)
+ ),
+ )
+
+ return keyboard
+
+
+def generate_calendar_months(year: int):
+ keyboard = InlineKeyboardMarkup(row_width=3)
+ keyboard.add(
+ InlineKeyboardButton(
+ text=date(year=year, month=1, day=1).strftime('Year %Y'),
+ callback_data=EMTPY_FIELD
+ )
+ )
+ keyboard.add(*[
+ InlineKeyboardButton(
+ text=month,
+ callback_data=calendar_factory.new(year=year, month=month_number)
+ )
+ for month_number, month in MONTHS
+ ])
+ keyboard.add(
+ InlineKeyboardButton(
+ text='Previous year',
+ callback_data=calendar_zoom.new(year=year - 1)
+ ),
+ InlineKeyboardButton(
+ text='Next year',
+ callback_data=calendar_zoom.new(year=year + 1)
+ )
+ )
+ return keyboard
diff --git a/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/main.py b/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/main.py
new file mode 100644
index 000000000..004147434
--- /dev/null
+++ b/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/main.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+"""
+This Example will show you an advanced usage of CallbackData.
+In this example calendar was implemented
+"""
+import asyncio
+from datetime import date
+
+from filters import calendar_factory, calendar_zoom, bind_filters
+from keyboards import generate_calendar_days, generate_calendar_months, EMTPY_FIELD
+from telebot import types
+from telebot.async_telebot import AsyncTeleBot
+
+API_TOKEN = ''
+bot = AsyncTeleBot(API_TOKEN)
+
+
+@bot.message_handler(commands='start')
+async def start_command_handler(message: types.Message):
+ await bot.send_message(message.chat.id,
+ f"Hello {message.from_user.first_name}. This bot is an example of calendar keyboard."
+ "\nPress /calendar to see it.")
+
+
+@bot.message_handler(commands='calendar')
+async def calendar_command_handler(message: types.Message):
+ now = date.today()
+ await bot.send_message(message.chat.id, 'Calendar',
+ reply_markup=generate_calendar_days(year=now.year, month=now.month))
+
+
+@bot.callback_query_handler(func=None, calendar_config=calendar_factory.filter())
+async def calendar_action_handler(call: types.CallbackQuery):
+ callback_data: dict = calendar_factory.parse(callback_data=call.data)
+ year, month = int(callback_data['year']), int(callback_data['month'])
+
+ await bot.edit_message_reply_markup(call.message.chat.id, call.message.id,
+ reply_markup=generate_calendar_days(year=year, month=month))
+
+
+@bot.callback_query_handler(func=None, calendar_zoom_config=calendar_zoom.filter())
+async def calendar_zoom_out_handler(call: types.CallbackQuery):
+ callback_data: dict = calendar_zoom.parse(callback_data=call.data)
+ year = int(callback_data.get('year'))
+
+ await bot.edit_message_reply_markup(call.message.chat.id, call.message.id,
+ reply_markup=generate_calendar_months(year=year))
+
+
+@bot.callback_query_handler(func=lambda call: call.data == EMTPY_FIELD)
+async def callback_empty_field_handler(call: types.CallbackQuery):
+ await bot.answer_callback_query(call.id)
+
+
+if __name__ == '__main__':
+ bind_filters(bot)
+ asyncio.run(bot.infinity_polling())
diff --git a/examples/asynchronous_telebot/callback_data_examples/simple_products_example.py b/examples/asynchronous_telebot/callback_data_examples/simple_products_example.py
new file mode 100644
index 000000000..fad37c173
--- /dev/null
+++ b/examples/asynchronous_telebot/callback_data_examples/simple_products_example.py
@@ -0,0 +1,88 @@
+# -*- coding: utf-8 -*-
+"""
+This Example will show you how to use CallbackData
+"""
+
+from telebot.callback_data import CallbackData, CallbackDataFilter
+from telebot import types
+from telebot.async_telebot import AsyncTeleBot
+from telebot.asyncio_filters import AdvancedCustomFilter
+
+API_TOKEN = 'TOKEN'
+PRODUCTS = [
+ {'id': '0', 'name': 'xiaomi mi 10', 'price': 400},
+ {'id': '1', 'name': 'samsung s20', 'price': 800},
+ {'id': '2', 'name': 'iphone 13', 'price': 1300}
+]
+
+bot = AsyncTeleBot(API_TOKEN)
+products_factory = CallbackData('product_id', prefix='products')
+
+
+def products_keyboard():
+ return types.InlineKeyboardMarkup(
+ keyboard=[
+ [
+ types.InlineKeyboardButton(
+ text=product['name'],
+ callback_data=products_factory.new(product_id=product["id"])
+ )
+ ]
+ for product in PRODUCTS
+ ]
+ )
+
+
+def back_keyboard():
+ return types.InlineKeyboardMarkup(
+ keyboard=[
+ [
+ types.InlineKeyboardButton(
+ text='⬅',
+ callback_data='back'
+ )
+ ]
+ ]
+ )
+
+
+class ProductsCallbackFilter(AdvancedCustomFilter):
+ key = 'config'
+
+ async def check(self, call: types.CallbackQuery, config: CallbackDataFilter):
+ return config.check(query=call)
+
+
+@bot.message_handler(commands=['products'])
+async def products_command_handler(message: types.Message):
+ await bot.send_message(message.chat.id, 'Products:', reply_markup=products_keyboard())
+
+
+# Only product with field - product_id = 2
+@bot.callback_query_handler(func=None, config=products_factory.filter(product_id='2'))
+async def product_one_callback(call: types.CallbackQuery):
+ await bot.answer_callback_query(callback_query_id=call.id, text='Not available :(', show_alert=True)
+
+
+# Any other products
+@bot.callback_query_handler(func=None, config=products_factory.filter())
+async def products_callback(call: types.CallbackQuery):
+ callback_data: dict = products_factory.parse(callback_data=call.data)
+ product_id = int(callback_data['product_id'])
+ product = PRODUCTS[product_id]
+
+ text = f"Product name: {product['name']}\n" \
+ f"Product price: {product['price']}"
+ await bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id,
+ text=text, reply_markup=back_keyboard())
+
+
+@bot.callback_query_handler(func=lambda c: c.data == 'back')
+async def back_callback(call: types.CallbackQuery):
+ await bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id,
+ text='Products:', reply_markup=products_keyboard())
+
+
+bot.add_custom_filter(ProductsCallbackFilter())
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/chat_join_request.py b/examples/asynchronous_telebot/chat_join_request.py
new file mode 100644
index 000000000..85bf8c35c
--- /dev/null
+++ b/examples/asynchronous_telebot/chat_join_request.py
@@ -0,0 +1,12 @@
+from telebot.async_telebot import AsyncTeleBot
+
+import telebot
+bot = AsyncTeleBot('TOKEN')
+
+@bot.chat_join_request_handler()
+async def make_some(message: telebot.types.ChatJoinRequest):
+ await bot.send_message(message.chat.id, 'I accepted a new user!')
+ await bot.approve_chat_join_request(message.chat.id, message.from_user.id)
+
+import asyncio
+asyncio.run(bot.polling())
\ No newline at end of file
diff --git a/examples/asynchronous_telebot/chat_member_example.py b/examples/asynchronous_telebot/chat_member_example.py
new file mode 100644
index 000000000..160c2eb17
--- /dev/null
+++ b/examples/asynchronous_telebot/chat_member_example.py
@@ -0,0 +1,34 @@
+from telebot import types,util
+from telebot.async_telebot import AsyncTeleBot
+
+bot = AsyncTeleBot('TOKEN')
+
+#chat_member_handler. When status changes, telegram gives update. check status from old_chat_member and new_chat_member.
+@bot.chat_member_handler()
+async def chat_m(message: types.ChatMemberUpdated):
+ old = message.old_chat_member
+ new = message.new_chat_member
+ if new.status == "member":
+ await bot.send_message(message.chat.id,"Hello {name}!".format(name=new.user.first_name)) # Welcome message
+
+#if bot is added to group, this handler will work
+@bot.my_chat_member_handler()
+async def my_chat_m(message: types.ChatMemberUpdated):
+ old = message.old_chat_member
+ new = message.new_chat_member
+ if new.status == "member":
+ await bot.send_message(message.chat.id,"Somebody added me to group") # Welcome message, if bot was added to group
+ await bot.leave_chat(message.chat.id)
+
+#content_Type_service is:
+#'new_chat_members', 'left_chat_member', 'new_chat_title', 'new_chat_photo', 'delete_chat_photo', 'group_chat_created',
+#'supergroup_chat_created', 'channel_chat_created', 'migrate_to_chat_id', 'migrate_from_chat_id', 'pinned_message',
+#'proximity_alert_triggered', 'video_chat_scheduled', 'video_chat_started', 'video_chat_ended',
+#'video_chat_participants_invited', 'message_auto_delete_timer_changed'
+# this handler deletes service messages
+
+@bot.message_handler(content_types=util.content_type_service)
+async def delall(message: types.Message):
+ await bot.delete_message(message.chat.id,message.message_id)
+import asyncio
+asyncio.run(bot.polling(allowed_updates=util.update_types))
diff --git a/examples/asynchronous_telebot/continue_handling.py b/examples/asynchronous_telebot/continue_handling.py
new file mode 100644
index 000000000..4781cc45f
--- /dev/null
+++ b/examples/asynchronous_telebot/continue_handling.py
@@ -0,0 +1,27 @@
+from telebot.async_telebot import AsyncTeleBot
+from telebot.asyncio_handler_backends import ContinueHandling
+
+
+bot = AsyncTeleBot('TOKEN')
+
+@bot.message_handler(commands=['start'])
+async def start(message):
+ await bot.send_message(message.chat.id, 'Hello World!')
+ return ContinueHandling()
+
+@bot.message_handler(commands=['start'])
+async def start2(message):
+ """
+ This handler comes after the first one, but it will never be called.
+ But you can call it by returning ContinueHandling() in the first handler.
+
+ If you return ContinueHandling() in the first handler, the next
+ registered handler with appropriate filters will be called.
+ """
+ await bot.send_message(message.chat.id, 'Hello World2!')
+
+import asyncio
+asyncio.run(bot.polling()) # just a reminder that infinity polling
+# wraps polling into try/except block just as sync version,
+# but you can use any of them because neither of them stops if you
+# pass non_stop=True
diff --git a/examples/asynchronous_telebot/custom_filters/admin_filter_example.py b/examples/asynchronous_telebot/custom_filters/admin_filter_example.py
new file mode 100644
index 000000000..7236e4bf3
--- /dev/null
+++ b/examples/asynchronous_telebot/custom_filters/admin_filter_example.py
@@ -0,0 +1,14 @@
+from telebot.async_telebot import AsyncTeleBot
+from telebot import asyncio_filters
+bot = AsyncTeleBot('TOKEN')
+
+# Handler
+@bot.message_handler(chat_types=['supergroup'], is_chat_admin=True)
+async def answer_for_admin(message):
+ await bot.send_message(message.chat.id,"hello my admin")
+
+# Register filter
+bot.add_custom_filter(asyncio_filters.IsAdminFilter(bot))
+
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/custom_filters/advanced_text_filter.py b/examples/asynchronous_telebot/custom_filters/advanced_text_filter.py
new file mode 100644
index 000000000..1200a6cb2
--- /dev/null
+++ b/examples/asynchronous_telebot/custom_filters/advanced_text_filter.py
@@ -0,0 +1,127 @@
+# -*- coding: utf-8 -*-
+"""
+This Example will show you usage of TextFilter
+In this example you will see how to use TextFilter
+with (message_handler, callback_query_handler, poll_handler)
+"""
+import asyncio
+
+from telebot import types
+from telebot.async_telebot import AsyncTeleBot
+from telebot.asyncio_filters import TextMatchFilter, TextFilter, IsReplyFilter
+
+bot = AsyncTeleBot("")
+
+
+@bot.message_handler(text=TextFilter(equals='hello'))
+async def hello_handler(message: types.Message):
+ await bot.send_message(message.chat.id, message.text)
+
+
+@bot.message_handler(text=TextFilter(equals='hello', ignore_case=True))
+async def hello_handler_ignore_case(message: types.Message):
+ await bot.send_message(message.chat.id, message.text + ' ignore case')
+
+
+@bot.message_handler(text=TextFilter(contains=['good', 'bad']))
+async def contains_handler(message: types.Message):
+ await bot.send_message(message.chat.id, message.text)
+
+
+@bot.message_handler(text=TextFilter(contains=['good', 'bad'], ignore_case=True))
+async def contains_handler_ignore_case(message: types.Message):
+ await bot.send_message(message.chat.id, message.text + ' ignore case')
+
+
+@bot.message_handler(text=TextFilter(starts_with='st')) # stArk, steve, stONE
+async def starts_with_handler(message: types.Message):
+ await bot.send_message(message.chat.id, message.text)
+
+
+@bot.message_handler(text=TextFilter(starts_with='st', ignore_case=True)) # STark, sTeve, stONE
+async def starts_with_handler_ignore_case(message: types.Message):
+ await bot.send_message(message.chat.id, message.text + ' ignore case')
+
+
+@bot.message_handler(text=TextFilter(ends_with='ay')) # wednesday, SUNday, WeekDay
+async def ends_with_handler(message: types.Message):
+ await bot.send_message(message.chat.id, message.text)
+
+
+@bot.message_handler(text=TextFilter(ends_with='ay', ignore_case=True)) # wednesdAY, sundAy, WeekdaY
+async def ends_with_handler_ignore_case(message: types.Message):
+ await bot.send_message(message.chat.id, message.text + ' ignore case')
+
+
+@bot.message_handler(text=TextFilter(equals='/callback'))
+async def send_callback(message: types.Message):
+ keyboard = types.InlineKeyboardMarkup(
+ keyboard=[
+ [types.InlineKeyboardButton(text='callback data', callback_data='example')],
+ [types.InlineKeyboardButton(text='ignore case callback data', callback_data='ExAmPLe')]
+ ]
+ )
+ await bot.send_message(message.chat.id, message.text, reply_markup=keyboard)
+
+
+@bot.callback_query_handler(func=None, text=TextFilter(equals='example'))
+async def callback_query_handler(call: types.CallbackQuery):
+ await bot.answer_callback_query(call.id, call.data, show_alert=True)
+
+
+@bot.callback_query_handler(func=None, text=TextFilter(equals='example', ignore_case=True))
+async def callback_query_handler_ignore_case(call: types.CallbackQuery):
+ await bot.answer_callback_query(call.id, call.data + " ignore case", show_alert=True)
+
+
+@bot.message_handler(text=TextFilter(equals='/poll'))
+async def send_poll(message: types.Message):
+ await bot.send_poll(message.chat.id, question='When do you prefer to work?', options=['Morning', 'Night'])
+ await bot.send_poll(message.chat.id, question='WHEN DO you pRefeR to worK?', options=['Morning', 'Night'])
+
+
+@bot.poll_handler(func=None, text=TextFilter(equals='When do you prefer to work?'))
+async def poll_question_handler(poll: types.Poll):
+ print(poll.question)
+
+
+@bot.poll_handler(func=None, text=TextFilter(equals='When do you prefer to work?', ignore_case=True))
+async def poll_question_handler_ignore_case(poll: types.Poll):
+ print(poll.question + ' ignore case')
+
+
+# either hi or contains one of (привет, salom)
+@bot.message_handler(text=TextFilter(equals="hi", contains=('привет', 'salom'), ignore_case=True))
+async def multiple_patterns_handler(message: types.Message):
+ await bot.send_message(message.chat.id, message.text)
+
+
+# starts with one of (mi, mea) for ex. minor, milk, meal, meat
+@bot.message_handler(text=TextFilter(starts_with=['mi', 'mea'], ignore_case=True))
+async def multiple_starts_with_handler(message: types.Message):
+ await bot.send_message(message.chat.id, message.text)
+
+
+# ends with one of (es, on) for ex. Jones, Davies, Johnson, Wilson
+@bot.message_handler(text=TextFilter(ends_with=['es', 'on'], ignore_case=True))
+async def multiple_ends_with_handler(message: types.Message):
+ await bot.send_message(message.chat.id, message.text)
+
+
+# !ban /ban .ban !бан /бан .бан
+@bot.message_handler(is_reply=True,
+ text=TextFilter(starts_with=('!', '/', '.'), ends_with=['ban', 'бан'], ignore_case=True))
+async def ban_command_handler(message: types.Message):
+ if len(message.text) == 4 and message.chat.type != 'private':
+ try:
+ await bot.ban_chat_member(message.chat.id, message.reply_to_message.from_user.id)
+ await bot.reply_to(message.reply_to_message, 'Banned.')
+ except Exception as err:
+ print(err.args)
+ return
+
+
+if __name__ == '__main__':
+ bot.add_custom_filter(TextMatchFilter())
+ bot.add_custom_filter(IsReplyFilter())
+ asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/custom_filters/general_custom_filters.py b/examples/asynchronous_telebot/custom_filters/general_custom_filters.py
new file mode 100644
index 000000000..dfeeb880c
--- /dev/null
+++ b/examples/asynchronous_telebot/custom_filters/general_custom_filters.py
@@ -0,0 +1,44 @@
+from telebot.async_telebot import AsyncTeleBot
+import telebot
+bot = AsyncTeleBot('TOKEN')
+
+
+# AdvancedCustomFilter is for list, string filter values
+class MainFilter(telebot.asyncio_filters.AdvancedCustomFilter):
+ key='text'
+ @staticmethod
+ async def check(message, text):
+ return message.text in text
+
+# SimpleCustomFilter is for boolean values, such as is_admin=True
+class IsAdmin(telebot.asyncio_filters.SimpleCustomFilter):
+ key='is_admin'
+ @staticmethod
+ async def check(message: telebot.types.Message):
+ result = await bot.get_chat_member(message.chat.id,message.from_user.id)
+ return result.status in ['administrator','creator']
+
+
+@bot.message_handler(is_admin=True, commands=['admin']) # Check if user is admin
+async def admin_rep(message):
+ await bot.send_message(message.chat.id, "Hi admin")
+
+@bot.message_handler(is_admin=False, commands=['admin']) # If user is not admin
+async def not_admin(message):
+ await bot.send_message(message.chat.id, "You are not admin")
+
+@bot.message_handler(text=['hi']) # Response to hi message
+async def welcome_hi(message):
+ await bot.send_message(message.chat.id, 'You said hi')
+
+@bot.message_handler(text=['bye']) # Response to bye message
+async def bye_user(message):
+ await bot.send_message(message.chat.id, 'You said bye')
+
+
+# Do not forget to register filters
+bot.add_custom_filter(MainFilter())
+bot.add_custom_filter(IsAdmin())
+
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/custom_filters/id_filter_example.py b/examples/asynchronous_telebot/custom_filters/id_filter_example.py
new file mode 100644
index 000000000..85e909b19
--- /dev/null
+++ b/examples/asynchronous_telebot/custom_filters/id_filter_example.py
@@ -0,0 +1,18 @@
+from telebot.async_telebot import AsyncTeleBot
+import telebot
+bot = AsyncTeleBot('TOKEN')
+
+
+# Chat id can be private or supergroups.
+@bot.message_handler(chat_id=[12345678], commands=['admin']) # chat_id checks id corresponds to your list or not.
+async def admin_rep(message):
+ await bot.send_message(message.chat.id, "You are allowed to use this command.")
+
+@bot.message_handler(commands=['admin'])
+async def not_admin(message):
+ await bot.send_message(message.chat.id, "You are not allowed to use this command")
+
+# Do not forget to register
+bot.add_custom_filter(telebot.asyncio_filters.ChatFilter())
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/custom_filters/is_filter_example.py b/examples/asynchronous_telebot/custom_filters/is_filter_example.py
new file mode 100644
index 000000000..46a798832
--- /dev/null
+++ b/examples/asynchronous_telebot/custom_filters/is_filter_example.py
@@ -0,0 +1,23 @@
+from telebot.async_telebot import AsyncTeleBot
+import telebot
+
+bot = AsyncTeleBot('TOKEN')
+
+
+
+# Check if message is a reply
+@bot.message_handler(is_reply=True)
+async def start_filter(message):
+ await bot.send_message(message.chat.id, "Looks like you replied to my message.")
+
+# Check if message was forwarded
+@bot.message_handler(is_forwarded=True)
+async def text_filter(message):
+ await bot.send_message(message.chat.id, "I do not accept forwarded messages!")
+
+# Do not forget to register filters
+bot.add_custom_filter(telebot.asyncio_filters.IsReplyFilter())
+bot.add_custom_filter(telebot.asyncio_filters.ForwardFilter())
+
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/custom_filters/text_filter_example.py b/examples/asynchronous_telebot/custom_filters/text_filter_example.py
new file mode 100644
index 000000000..e2b756405
--- /dev/null
+++ b/examples/asynchronous_telebot/custom_filters/text_filter_example.py
@@ -0,0 +1,21 @@
+from telebot.async_telebot import AsyncTeleBot
+import telebot
+bot = AsyncTeleBot('TOKEN')
+
+
+# Check if message starts with @admin tag
+@bot.message_handler(text_startswith="@admin")
+async def start_filter(message):
+ await bot.send_message(message.chat.id, "Looks like you are calling admin, wait...")
+
+# Check if text is hi or hello
+@bot.message_handler(text=['hi','hello'])
+async def text_filter(message):
+ await bot.send_message(message.chat.id, "Hi, {name}!".format(name=message.from_user.first_name))
+
+# Do not forget to register filters
+bot.add_custom_filter(telebot.asyncio_filters.TextMatchFilter())
+bot.add_custom_filter(telebot.asyncio_filters.TextStartsFilter())
+
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/custom_states.py b/examples/asynchronous_telebot/custom_states.py
new file mode 100644
index 000000000..f3437660f
--- /dev/null
+++ b/examples/asynchronous_telebot/custom_states.py
@@ -0,0 +1,157 @@
+from telebot import async_telebot, asyncio_filters, types
+from telebot.asyncio_storage import StateMemoryStorage
+from telebot.states import State, StatesGroup
+from telebot.states.asyncio.context import StateContext
+from telebot.types import ReplyParameters
+
+# Initialize the bot
+state_storage = StateMemoryStorage() # don't use this in production; switch to redis
+bot = async_telebot.AsyncTeleBot("TOKEN", state_storage=state_storage)
+
+
+# Define states
+class MyStates(StatesGroup):
+ name = State()
+ age = State()
+ color = State()
+ hobby = State()
+
+
+# Start command handler
+@bot.message_handler(commands=["start"])
+async def start_ex(message: types.Message, state: StateContext):
+ await state.set(MyStates.name)
+ await bot.send_message(
+ message.chat.id,
+ "Hello! What is your first name?",
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+
+
+# Cancel command handler
+@bot.message_handler(state="*", commands=["cancel"])
+async def any_state(message: types.Message, state: StateContext):
+ await state.delete()
+ await bot.send_message(
+ message.chat.id,
+ "Your information has been cleared. Type /start to begin again.",
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+
+
+# Handler for name input
+@bot.message_handler(state=MyStates.name)
+async def name_get(message: types.Message, state: StateContext):
+ await state.set(MyStates.age)
+ await bot.send_message(
+ message.chat.id, "How old are you?",
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+ await state.add_data(name=message.text)
+
+
+# Handler for age input
+@bot.message_handler(state=MyStates.age, is_digit=True)
+async def ask_color(message: types.Message, state: StateContext):
+ await state.set(MyStates.color)
+ await state.add_data(age=message.text)
+
+ # Define reply keyboard for color selection
+ keyboard = types.ReplyKeyboardMarkup(row_width=2)
+ colors = ["Red", "Green", "Blue", "Yellow", "Purple", "Orange", "Other"]
+ buttons = [types.KeyboardButton(color) for color in colors]
+ keyboard.add(*buttons)
+
+ await bot.send_message(
+ message.chat.id,
+ "What is your favorite color? Choose from the options below.",
+ reply_markup=keyboard,
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+
+
+# Handler for color input
+@bot.message_handler(state=MyStates.color)
+async def ask_hobby(message: types.Message, state: StateContext):
+ await state.set(MyStates.hobby)
+ await state.add_data(color=message.text)
+
+ # Define reply keyboard for hobby selection
+ keyboard = types.ReplyKeyboardMarkup(row_width=2)
+ hobbies = ["Reading", "Traveling", "Gaming", "Cooking"]
+ buttons = [types.KeyboardButton(hobby) for hobby in hobbies]
+ keyboard.add(*buttons)
+
+ await bot.send_message(
+ message.chat.id,
+ "What is one of your hobbies? Choose from the options below.",
+ reply_markup=keyboard,
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+
+
+# Handler for hobby input; use filters to ease validation
+@bot.message_handler(
+ state=MyStates.hobby, text=["Reading", "Traveling", "Gaming", "Cooking"]
+)
+async def finish(message: types.Message, state: StateContext):
+ async with state.data() as data:
+ name = data.get("name")
+ age = data.get("age")
+ color = data.get("color")
+ hobby = message.text # Get the hobby from the message text
+
+ # Provide a fun fact based on color
+ color_facts = {
+ "Red": "Red is often associated with excitement and passion.",
+ "Green": "Green is the color of nature and tranquility.",
+ "Blue": "Blue is known for its calming and serene effects.",
+ "Yellow": "Yellow is a cheerful color often associated with happiness.",
+ "Purple": "Purple signifies royalty and luxury.",
+ "Orange": "Orange is a vibrant color that stimulates enthusiasm.",
+ "Other": "Colors have various meanings depending on context.",
+ }
+ color_fact = color_facts.get(
+ color, "Colors have diverse meanings, and yours is unique!"
+ )
+
+ msg = (
+ f"Thank you for sharing! Here is a summary of your information:\n"
+ f"First Name: {name}\n"
+ f"Age: {age}\n"
+ f"Favorite Color: {color}\n"
+ f"Fun Fact about your color: {color_fact}\n"
+ f"Favorite Hobby: {hobby}"
+ )
+
+ await bot.send_message(
+ message.chat.id, msg, parse_mode="html",
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+ await state.delete()
+
+
+# Handler for incorrect age input
+@bot.message_handler(state=MyStates.age, is_digit=False)
+async def age_incorrect(message: types.Message):
+ await bot.send_message(
+ message.chat.id,
+ "Please enter a valid number for age.",
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+
+
+# Add custom filters
+bot.add_custom_filter(asyncio_filters.StateFilter(bot))
+bot.add_custom_filter(asyncio_filters.IsDigitFilter())
+bot.add_custom_filter(asyncio_filters.TextMatchFilter())
+
+# necessary for state parameter in handlers.
+from telebot.states.asyncio.middleware import StateMiddleware
+
+bot.setup_middleware(StateMiddleware(bot))
+
+# Start polling
+import asyncio
+
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/detect_changes.py b/examples/asynchronous_telebot/detect_changes.py
new file mode 100644
index 000000000..7fb202bd4
--- /dev/null
+++ b/examples/asynchronous_telebot/detect_changes.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+# This is a simple echo bot using the decorator mechanism.
+# It echoes any incoming text messages.
+
+from telebot.async_telebot import AsyncTeleBot
+bot = AsyncTeleBot('TOKEN')
+
+
+
+# Handle '/start' and '/help'
+@bot.message_handler(commands=['help', 'start'])
+async def send_welcome(message):
+ await bot.reply_to(message, """\
+Hi there, I am EchoBot.
+I am here to echo your kind words back to you. Just say anything nice and I'll say the exact same thing to you!\
+""")
+
+
+# Handle all other messages with content_type 'text' (content_types defaults to ['text'])
+@bot.message_handler(func=lambda message: True)
+async def echo_message(message):
+ await bot.reply_to(message, message.text)
+
+
+import asyncio
+# only for versions 4.7.0+
+asyncio.run(bot.polling(restart_on_change=True))
diff --git a/examples/asynchronous_telebot/download_file_example.py b/examples/asynchronous_telebot/download_file_example.py
new file mode 100644
index 000000000..695258618
--- /dev/null
+++ b/examples/asynchronous_telebot/download_file_example.py
@@ -0,0 +1,21 @@
+
+import telebot
+from telebot.async_telebot import AsyncTeleBot
+
+
+
+bot = AsyncTeleBot('TOKEN')
+
+
+@bot.message_handler(content_types=['photo'])
+async def new_message(message: telebot.types.Message):
+ result_message = await bot.send_message(message.chat.id, 'Downloading your photo...', parse_mode='HTML', disable_web_page_preview=True)
+ file_path = await bot.get_file(message.photo[-1].file_id)
+ downloaded_file = await bot.download_file(file_path.file_path)
+ with open('file.jpg', 'wb') as new_file:
+ new_file.write(downloaded_file)
+ await bot.edit_message_text(chat_id=message.chat.id, message_id=result_message.id, text='Done!', parse_mode='HTML')
+
+
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/echo_bot.py b/examples/asynchronous_telebot/echo_bot.py
new file mode 100644
index 000000000..aed26675e
--- /dev/null
+++ b/examples/asynchronous_telebot/echo_bot.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+
+# This is a simple echo bot using the decorator mechanism.
+# It echoes any incoming text messages.
+import asyncio
+
+from telebot.async_telebot import AsyncTeleBot
+
+bot = AsyncTeleBot('TOKEN')
+
+
+# Handle '/start' and '/help'
+@bot.message_handler(commands=['help', 'start'])
+async def send_welcome(message):
+ text = 'Hi, I am EchoBot.\nJust write me something and I will repeat it!'
+ await bot.reply_to(message, text)
+
+
+# Handle all other messages with content_type 'text' (content_types defaults to ['text'])
+@bot.message_handler(func=lambda message: True)
+async def echo_message(message):
+ await bot.reply_to(message, message.text)
+
+
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/exception_handler.py b/examples/asynchronous_telebot/exception_handler.py
new file mode 100644
index 000000000..cbf1540a9
--- /dev/null
+++ b/examples/asynchronous_telebot/exception_handler.py
@@ -0,0 +1,25 @@
+import logging
+
+import telebot
+from telebot.async_telebot import AsyncTeleBot, ExceptionHandler
+
+logger = telebot.logger
+telebot.logger.setLevel(logging.DEBUG) # Outputs debug messages to console.
+
+
+class MyExceptionHandler(ExceptionHandler):
+ async def handle(self, exception):
+ logger.error(exception)
+
+
+bot = AsyncTeleBot('TOKEN', exception_handler=MyExceptionHandler())
+
+
+@bot.message_handler(commands=['photo'])
+async def photo_send(message: telebot.types.Message):
+ await bot.send_message(message.chat.id, 'Hi, this is an example of exception handlers.')
+ raise Exception('test') # Exception goes to ExceptionHandler if it is set
+
+
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/formatting_example.py b/examples/asynchronous_telebot/formatting_example.py
new file mode 100644
index 000000000..687daea0d
--- /dev/null
+++ b/examples/asynchronous_telebot/formatting_example.py
@@ -0,0 +1,54 @@
+from telebot.async_telebot import AsyncTeleBot
+from telebot import formatting
+
+bot = AsyncTeleBot('token')
+
+
+@bot.message_handler(commands=['start'])
+async def start_message(message):
+ await bot.send_message(
+ message.chat.id,
+ # function which connects all strings
+ formatting.format_text(
+ formatting.mbold(message.from_user.first_name),
+ formatting.mitalic(message.from_user.first_name),
+ formatting.munderline(message.from_user.first_name),
+ formatting.mstrikethrough(message.from_user.first_name),
+ formatting.mcode(message.from_user.first_name),
+ separator=" " # separator separates all strings
+ ),
+ parse_mode='MarkdownV2'
+ )
+
+ # just a bold text using markdownv2
+ await bot.send_message(
+ message.chat.id,
+ formatting.mbold(message.from_user.first_name),
+ parse_mode='MarkdownV2'
+ )
+
+ # html
+ await bot.send_message(
+ message.chat.id,
+ formatting.format_text(
+ formatting.hbold(message.from_user.first_name),
+ formatting.hitalic(message.from_user.first_name),
+ formatting.hunderline(message.from_user.first_name),
+ formatting.hstrikethrough(message.from_user.first_name),
+ formatting.hcode(message.from_user.first_name),
+ # hide_link is only for html
+ formatting.hide_link('https://telegra.ph/file/c158e3a6e2a26a160b253.jpg'),
+ separator=" "
+ ),
+ parse_mode='HTML'
+ )
+
+ # just a bold text in html
+ await bot.send_message(
+ message.chat.id,
+ formatting.hbold(message.from_user.first_name),
+ parse_mode='HTML'
+ )
+
+import asyncio
+asyncio.run(bot.polling())
\ No newline at end of file
diff --git a/examples/asynchronous_telebot/message_reaction_example.py b/examples/asynchronous_telebot/message_reaction_example.py
new file mode 100644
index 000000000..a3e078f60
--- /dev/null
+++ b/examples/asynchronous_telebot/message_reaction_example.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python3
+
+# This is a simple bot using message reactions (emoji)
+# https://core.telegram.org/bots/api#reactiontype
+# https://core.telegram.org/bots/api#update
+# allowed_updates: Specify an empty list to receive all update types except, chat_member, message_reaction, and message_reaction_count.
+# If you want to receive message_reaction events, you cannot simply leave the allowed_updates=None default value.
+# The default list of events does not include chat_member, message_reaction, and message_reaction_count events.
+# You must explicitly specify all the events you wish to receive and add message_reaction to this list.
+# It’s also important to note that after using allowed_updates=[...], in the future, using allowed_updates=None will mean
+# that the list of events you will receive will consist of the events you last explicitly specified.
+
+import random
+from telebot.async_telebot import AsyncTeleBot
+from telebot.types import ReactionTypeEmoji
+
+API_TOKEN = ''
+bot = AsyncTeleBot(API_TOKEN)
+
+
+
+# Send a reactions to all messages with content_type 'text' (content_types defaults to ['text'])
+@bot.message_handler(func=lambda message: True)
+async def send_reaction(message):
+ emo = ["\U0001F525", "\U0001F917", "\U0001F60E"] # or use ["🔥", "🤗", "😎"]
+ await bot.set_message_reaction(message.chat.id, message.id, [ReactionTypeEmoji(random.choice(emo))], is_big=False)
+
+
+@bot.message_reaction_handler(func=lambda message: True)
+async def get_reactions(message):
+ await bot.reply_to(message, f"You changed the reaction from {[r.emoji for r in message.old_reaction]} to {[r.emoji for r in message.new_reaction]}")
+
+
+import asyncio
+asyncio.run(bot.infinity_polling(allowed_updates=['message', 'message_reaction']))
diff --git a/examples/asynchronous_telebot/middleware/flooding_middleware.py b/examples/asynchronous_telebot/middleware/flooding_middleware.py
new file mode 100644
index 000000000..cc9d9f859
--- /dev/null
+++ b/examples/asynchronous_telebot/middleware/flooding_middleware.py
@@ -0,0 +1,38 @@
+# Just a little example of middleware handlers
+
+from telebot.asyncio_handler_backends import BaseMiddleware, CancelUpdate
+from telebot.async_telebot import AsyncTeleBot
+bot = AsyncTeleBot('TOKEN')
+
+
+class SimpleMiddleware(BaseMiddleware):
+ def __init__(self, limit) -> None:
+ self.last_time = {}
+ self.limit = limit
+ self.update_types = ['message']
+ # Always specify update types, otherwise middlewares won't work
+
+
+ async def pre_process(self, message, data):
+ if not message.from_user.id in self.last_time:
+ # User is not in a dict, so lets add and cancel this function
+ self.last_time[message.from_user.id] = message.date
+ return
+ if message.date - self.last_time[message.from_user.id] < self.limit:
+ # User is flooding
+ await bot.send_message(message.chat.id, 'You are making request too often')
+ return CancelUpdate()
+ self.last_time[message.from_user.id] = message.date
+
+
+ async def post_process(self, message, data, exception):
+ pass
+
+bot.setup_middleware(SimpleMiddleware(2))
+
+@bot.message_handler(commands=['start'])
+async def start(message):
+ await bot.send_message(message.chat.id, 'Hello!')
+
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/middleware/i18n.py b/examples/asynchronous_telebot/middleware/i18n.py
new file mode 100644
index 000000000..81281bc44
--- /dev/null
+++ b/examples/asynchronous_telebot/middleware/i18n.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+
+# This example shows how to implement i18n (internationalization) l10n (localization) to create
+# multi-language bots with middleware handler.
+#
+# Also, you could check language code in handler itself too.
+# But this example just to show the work of middlewares.
+
+import telebot
+from telebot.async_telebot import AsyncTeleBot
+from telebot import asyncio_handler_backends
+import logging
+
+logger = telebot.logger
+telebot.logger.setLevel(logging.DEBUG) # Outputs debug messages to console.
+
+TRANSLATIONS = {
+ 'hello': {
+ 'en': 'hello',
+ 'ru': 'привет',
+ 'uz': 'salom'
+ }
+}
+
+
+
+bot = AsyncTeleBot('TOKEN')
+
+
+class LanguageMiddleware(asyncio_handler_backends.BaseMiddleware):
+ def __init__(self):
+ self.update_types = ['message'] # Update types that will be handled by this middleware.
+ async def pre_process(self, message, data):
+ data['response'] = TRANSLATIONS['hello'][message.from_user.language_code]
+ async def post_process(self, message, data, exception):
+ if exception: # You can get exception occured in handler.
+ logger.exception(str(exception))
+
+bot.setup_middleware(LanguageMiddleware()) # do not forget to setup
+
+@bot.message_handler(commands=['start'])
+async def start(message, data: dict):
+ # you can get the data in handler too.
+ # Not necessary to create data parameter in handler function.
+ await bot.send_message(message.chat.id, data['response'])
+
+
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/middleware/i18n_middleware_example/i18n_base_midddleware.py b/examples/asynchronous_telebot/middleware/i18n_middleware_example/i18n_base_midddleware.py
new file mode 100644
index 000000000..c8502881f
--- /dev/null
+++ b/examples/asynchronous_telebot/middleware/i18n_middleware_example/i18n_base_midddleware.py
@@ -0,0 +1,120 @@
+import contextvars
+import gettext
+import os
+
+from telebot.asyncio_handler_backends import BaseMiddleware
+
+try:
+ from babel.support import LazyProxy
+
+ babel_imported = True
+except ImportError:
+ babel_imported = False
+
+
+class I18N(BaseMiddleware):
+ """
+ This middleware provides high-level tool for internationalization
+ It is based on gettext util.
+ """
+
+ context_lang = contextvars.ContextVar('language', default=None)
+
+ def __init__(self, translations_path, domain_name: str):
+ super().__init__()
+ self.update_types = self.process_update_types()
+
+ self.path = translations_path
+ self.domain = domain_name
+ self.translations = self.find_translations()
+
+ @property
+ def available_translations(self):
+ return list(self.translations)
+
+ def gettext(self, text: str, lang: str = None):
+ """
+ Singular translations
+ """
+
+ if lang is None:
+ lang = self.context_lang.get()
+
+ if lang not in self.translations:
+ return text
+
+ translator = self.translations[lang]
+ return translator.gettext(text)
+
+ def ngettext(self, singular: str, plural: str, lang: str = None, n=1):
+ """
+ Plural translations
+ """
+ if lang is None:
+ lang = self.context_lang.get()
+
+ if lang not in self.translations:
+ if n == 1:
+ return singular
+ return plural
+
+ translator = self.translations[lang]
+ return translator.ngettext(singular, plural, n)
+
+ def lazy_gettext(self, text: str, lang: str = None):
+ if not babel_imported:
+ raise RuntimeError('babel module is not imported. Check that you installed it.')
+ return LazyProxy(self.gettext, text, lang, enable_cache=False)
+
+ def lazy_ngettext(self, singular: str, plural: str, lang: str = None, n=1):
+ if not babel_imported:
+ raise RuntimeError('babel module is not imported. Check that you installed it.')
+ return LazyProxy(self.ngettext, singular, plural, lang, n, enable_cache=False)
+
+ async def get_user_language(self, obj):
+ """
+ You need to override this method and return user language
+ """
+ raise NotImplementedError
+
+ def process_update_types(self) -> list:
+ """
+ You need to override this method and return any update types which you want to be processed
+ """
+ raise NotImplementedError
+
+ async def pre_process(self, message, data):
+ """
+ context language variable will be set each time when update from 'process_update_types' comes
+ value is the result of 'get_user_language' method
+ """
+ self.context_lang.set(await self.get_user_language(obj=message))
+
+ async def post_process(self, message, data, exception):
+ pass
+
+ def find_translations(self):
+ """
+ Looks for translations with passed 'domain' in passed 'path'
+ """
+ if not os.path.exists(self.path):
+ raise RuntimeError(f"Translations directory by path: {self.path!r} was not found")
+
+ result = {}
+
+ for name in os.listdir(self.path):
+ translations_path = os.path.join(self.path, name, 'LC_MESSAGES')
+
+ if not os.path.isdir(translations_path):
+ continue
+
+ po_file = os.path.join(translations_path, self.domain + '.po')
+ mo_file = po_file[:-2] + 'mo'
+
+ if os.path.isfile(po_file) and not os.path.isfile(mo_file):
+ raise FileNotFoundError(f"Translations for: {name!r} were not compiled!")
+
+ with open(mo_file, 'rb') as file:
+ result[name] = gettext.GNUTranslations(file)
+
+ return result
diff --git a/examples/asynchronous_telebot/middleware/i18n_middleware_example/keyboards.py b/examples/asynchronous_telebot/middleware/i18n_middleware_example/keyboards.py
new file mode 100644
index 000000000..14d0473d0
--- /dev/null
+++ b/examples/asynchronous_telebot/middleware/i18n_middleware_example/keyboards.py
@@ -0,0 +1,34 @@
+from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton, ReplyKeyboardMarkup, KeyboardButton
+
+
+def languages_keyboard():
+ return InlineKeyboardMarkup(
+ keyboard=[
+ [
+ InlineKeyboardButton(text="English", callback_data='en'),
+ InlineKeyboardButton(text="Русский", callback_data='ru'),
+ InlineKeyboardButton(text="O'zbekcha", callback_data='uz_Latn')
+ ]
+ ]
+ )
+
+
+def clicker_keyboard(_):
+ return InlineKeyboardMarkup(
+ keyboard=[
+ [
+ InlineKeyboardButton(text=_("click"), callback_data='click'),
+ ]
+ ]
+ )
+
+
+def menu_keyboard(_):
+ keyboard = ReplyKeyboardMarkup(resize_keyboard=True)
+ keyboard.add(
+ KeyboardButton(text=_("My user id")),
+ KeyboardButton(text=_("My user name")),
+ KeyboardButton(text=_("My first name"))
+ )
+
+ return keyboard
diff --git a/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/en/LC_MESSAGES/messages.po b/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/en/LC_MESSAGES/messages.po
new file mode 100644
index 000000000..2cf8eef5d
--- /dev/null
+++ b/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/en/LC_MESSAGES/messages.po
@@ -0,0 +1,81 @@
+# English translations for PROJECT.
+# Copyright (C) 2022 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2022-02-19 18:37+0500\n"
+"PO-Revision-Date: 2022-02-18 16:22+0500\n"
+"Last-Translator: FULL NAME \n"
+"Language: en\n"
+"Language-Team: en \n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: keyboards.py:20
+msgid "click"
+msgstr ""
+
+#: keyboards.py:29
+msgid "My user id"
+msgstr ""
+
+#: keyboards.py:30
+msgid "My user name"
+msgstr ""
+
+#: keyboards.py:31
+msgid "My first name"
+msgstr ""
+
+#: main.py:97
+msgid ""
+"Hello, {user_fist_name}!\n"
+"This is the example of multilanguage bot.\n"
+"Available commands:\n"
+"\n"
+"/lang - change your language\n"
+"/plural - pluralization example\n"
+"/menu - text menu example"
+msgstr ""
+
+#: main.py:121
+msgid "Language has been changed"
+msgstr ""
+
+#: main.py:130 main.py:150
+#, fuzzy
+msgid "You have {number} click"
+msgid_plural "You have {number} clicks"
+msgstr[0] ""
+msgstr[1] ""
+
+#: main.py:135 main.py:155
+msgid ""
+"This is clicker.\n"
+"\n"
+msgstr ""
+
+#: main.py:163
+msgid "This is ReplyKeyboardMarkup menu example in multilanguage bot."
+msgstr ""
+
+#: main.py:203
+msgid "Seems you confused language"
+msgstr ""
+
+#~ msgid ""
+#~ "Hello, {user_fist_name}!\n"
+#~ "This is the example of multilanguage bot.\n"
+#~ "Available commands:\n"
+#~ "\n"
+#~ "/lang - change your language\n"
+#~ "/plural - pluralization example"
+#~ msgstr ""
+
diff --git a/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/ru/LC_MESSAGES/messages.po b/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/ru/LC_MESSAGES/messages.po
new file mode 100644
index 000000000..6d330b059
--- /dev/null
+++ b/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/ru/LC_MESSAGES/messages.po
@@ -0,0 +1,82 @@
+# Russian translations for PROJECT.
+# Copyright (C) 2022 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2022-02-19 18:37+0500\n"
+"PO-Revision-Date: 2022-02-18 16:22+0500\n"
+"Last-Translator: FULL NAME \n"
+"Language: ru\n"
+"Language-Team: ru \n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
+"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: keyboards.py:20
+msgid "click"
+msgstr "Клик"
+
+#: keyboards.py:29
+msgid "My user id"
+msgstr "Мой user id"
+
+#: keyboards.py:30
+msgid "My user name"
+msgstr "Мой user name"
+
+#: keyboards.py:31
+msgid "My first name"
+msgstr "Мой first name"
+
+#: main.py:97
+msgid ""
+"Hello, {user_fist_name}!\n"
+"This is the example of multilanguage bot.\n"
+"Available commands:\n"
+"\n"
+"/lang - change your language\n"
+"/plural - pluralization example\n"
+"/menu - text menu example"
+msgstr ""
+"Привет, {user_fist_name}!\n"
+"Это пример мультиязычного бота.\n"
+"Доступные команды:\n"
+"\n"
+"/lang - изменить язык\n"
+"/plural - пример плюрализации\n"
+"/menu - Пример текстового меню"
+
+#: main.py:121
+msgid "Language has been changed"
+msgstr "Язык был сменён"
+
+#: main.py:130 main.py:150
+msgid "You have {number} click"
+msgid_plural "You have {number} clicks"
+msgstr[0] "У вас {number} клик"
+msgstr[1] "У вас {number} клика"
+msgstr[2] "У вас {number} кликов"
+
+#: main.py:135 main.py:155
+msgid ""
+"This is clicker.\n"
+"\n"
+msgstr ""
+"Это кликер.\n"
+"\n"
+
+#: main.py:163
+msgid "This is ReplyKeyboardMarkup menu example in multilanguage bot."
+msgstr "Это пример ReplyKeyboardMarkup меню в мультиязычном боте."
+
+#: main.py:203
+msgid "Seems you confused language"
+msgstr "Кажется, вы перепутали язык"
+
diff --git a/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/uz_Latn/LC_MESSAGES/messages.po b/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/uz_Latn/LC_MESSAGES/messages.po
new file mode 100644
index 000000000..c5bd0004e
--- /dev/null
+++ b/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/uz_Latn/LC_MESSAGES/messages.po
@@ -0,0 +1,80 @@
+# Uzbek (Latin) translations for PROJECT.
+# Copyright (C) 2022 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2022-02-19 18:37+0500\n"
+"PO-Revision-Date: 2022-02-18 16:22+0500\n"
+"Last-Translator: FULL NAME \n"
+"Language: uz_Latn\n"
+"Language-Team: uz_Latn \n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: keyboards.py:20
+msgid "click"
+msgstr "clik"
+
+#: keyboards.py:29
+msgid "My user id"
+msgstr "Mani user id"
+
+#: keyboards.py:30
+msgid "My user name"
+msgstr "Mani user name"
+
+#: keyboards.py:31
+msgid "My first name"
+msgstr "Mani first name"
+
+#: main.py:97
+msgid ""
+"Hello, {user_fist_name}!\n"
+"This is the example of multilanguage bot.\n"
+"Available commands:\n"
+"\n"
+"/lang - change your language\n"
+"/plural - pluralization example\n"
+"/menu - text menu example"
+msgstr ""
+"Salom, {user_fist_name}!\n"
+"Bu multilanguage bot misoli.\n"
+"Mavjud buyruqlar:\n"
+"\n"
+"/lang - tilni ozgartirish\n"
+"/plural - pluralizatsiya misoli\n"
+"/menu - text menu misoli"
+
+#: main.py:121
+msgid "Language has been changed"
+msgstr "Til ozgartirildi"
+
+#: main.py:130 main.py:150
+msgid "You have {number} click"
+msgid_plural "You have {number} clicks"
+msgstr[0] "Sizda {number}ta clik"
+msgstr[1] "Sizda {number}ta clik"
+
+#: main.py:135 main.py:155
+msgid ""
+"This is clicker.\n"
+"\n"
+msgstr ""
+"Bu clicker.\n"
+"\n"
+
+#: main.py:163
+msgid "This is ReplyKeyboardMarkup menu example in multilanguage bot."
+msgstr "Bu multilanguage bot da replykeyboardmarkup menyu misoli."
+
+#: main.py:203
+msgid "Seems you confused language"
+msgstr "Tilni adashtirdiz"
+
diff --git a/examples/asynchronous_telebot/middleware/i18n_middleware_example/main.py b/examples/asynchronous_telebot/middleware/i18n_middleware_example/main.py
new file mode 100644
index 000000000..675c14071
--- /dev/null
+++ b/examples/asynchronous_telebot/middleware/i18n_middleware_example/main.py
@@ -0,0 +1,214 @@
+"""
+In this example you will learn how to adapt your bot to different languages
+Using built-in middleware I18N.
+
+You need to install babel package 'https://pypi.org/project/Babel/'
+Babel provides a command-line interface for working with message catalogs
+After installing babel package you have a script called 'pybabel'
+Too see all the commands open terminal and type 'pybabel --help'
+Full description for pybabel commands can be found here: 'https://babel.pocoo.org/en/latest/cmdline.html'
+
+Create a directory 'locales' where our translations will be stored
+
+First we need to extract texts:
+ pybabel extract -o locales/{domain_name}.pot --input-dirs .
+{domain_name}.pot - is the file where all translations are saved
+The name of this file should be the same as domain which you pass to I18N class
+In this example domain_name will be 'messages'
+
+For gettext (singular texts) we use '_' alias and it works perfect
+You may also you some alias for ngettext (plural texts) but you can face with a problem that
+your plural texts are not being extracted
+That is because by default 'pybabel extract' recognizes the following keywords:
+ _, gettext, ngettext, ugettext, ungettext, dgettext, dngettext, N_
+To add your own keyword you can use '-k' flag
+In this example for 'ngettext' i will assign double underscore alias '__'
+
+Full command with pluralization support will look so:
+ pybabel extract -o locales/{domain_name}.pot -k __:1,2 --input-dirs .
+
+Then create directories with translations (get list of all locales: 'pybabel --list-locales'):
+ pybabel init -i locales/{domain_name}.pot -d locales -l en
+ pybabel init -i locales/{domain_name}.pot -d locales -l ru
+ pybabel init -i locales/{domain_name}.pot -d locales -l uz_Latn
+
+Now you can translate the texts located in locales/{language}/LC_MESSAGES/{domain_name}.po
+After you translated all the texts you need to compile .po files:
+ pybabel compile -d locales
+
+When you delete/update your texts you also need to update them in .po files:
+ pybabel extract -o locales/{domain_name}.pot -k __:1,2 --input-dirs .
+ pybabel update -i locales/{domain_name}.pot -d locales
+ - translate
+ pybabel compile -d locales
+
+If you have any exceptions check:
+ - you have installed babel
+ - translations are ready, so you just compiled it
+ - in the commands above you replaced {domain_name} to messages
+ - you are writing commands from correct path in terminal
+"""
+
+import asyncio
+from typing import Union
+
+import keyboards
+from telebot import types
+from telebot.async_telebot import AsyncTeleBot
+from telebot.asyncio_filters import TextMatchFilter, TextFilter
+from i18n_base_middleware import I18N
+from telebot.asyncio_storage.memory_storage import StateMemoryStorage
+
+
+class I18NMiddleware(I18N):
+
+ def process_update_types(self) -> list:
+ """
+ Here you need to return a list of update types which you want to be processed
+ """
+ return ['message', 'callback_query']
+
+ async def get_user_language(self, obj: Union[types.Message, types.CallbackQuery]):
+ """
+ This method is called when new update comes (only updates which you return in 'process_update_types' method)
+ Returned language will be used in 'pre_process' method of parent class
+ Returned language will be set to context language variable.
+ If you need to get translation with user's actual language you don't have to pass it manually
+ It will be automatically passed from context language value.
+ However if you need some other language you can always pass it.
+ """
+
+ user_id = obj.from_user.id
+
+ if user_id not in users_lang:
+ users_lang[user_id] = 'en'
+
+ return users_lang[user_id]
+
+
+storage = StateMemoryStorage()
+bot = AsyncTeleBot("", state_storage=storage)
+
+i18n = I18NMiddleware(translations_path='locales', domain_name='messages')
+_ = i18n.gettext # for singular translations
+__ = i18n.ngettext # for plural translations
+
+# These are example storages, do not use it in a production development
+users_lang = {}
+users_clicks = {}
+
+
+@bot.message_handler(commands='start')
+async def start_handler(message: types.Message):
+ text = _("Hello, {user_fist_name}!\n"
+ "This is the example of multilanguage bot.\n"
+ "Available commands:\n\n"
+ "/lang - change your language\n"
+ "/plural - pluralization example\n"
+ "/menu - text menu example")
+
+ # remember don't use f string for interpolation, use .format method instead
+ text = text.format(user_fist_name=message.from_user.first_name)
+ await bot.send_message(message.from_user.id, text)
+
+
+@bot.message_handler(commands='lang')
+async def change_language_handler(message: types.Message):
+ await bot.send_message(message.chat.id, "Choose language\nВыберите язык\nTilni tanlang",
+ reply_markup=keyboards.languages_keyboard())
+
+
+@bot.callback_query_handler(func=None, text=TextFilter(contains=['en', 'ru', 'uz_Latn']))
+async def language_handler(call: types.CallbackQuery):
+ lang = call.data
+ users_lang[call.from_user.id] = lang
+
+ # When you changed user language, you have to pass it manually beacause it is not changed in context
+ await bot.edit_message_text(_("Language has been changed", lang=lang), call.from_user.id, call.message.id)
+
+
+@bot.message_handler(commands='plural')
+async def pluralization_handler(message: types.Message):
+ if not users_clicks.get(message.from_user.id):
+ users_clicks[message.from_user.id] = 0
+ clicks = users_clicks[message.from_user.id]
+
+ text = __(
+ singular="You have {number} click",
+ plural="You have {number} clicks",
+ n=clicks
+ )
+ text = _("This is clicker.\n\n") + text.format(number=clicks)
+
+ await bot.send_message(message.chat.id, text, reply_markup=keyboards.clicker_keyboard(_))
+
+
+@bot.callback_query_handler(func=None, text=TextFilter(equals='click'))
+async def click_handler(call: types.CallbackQuery):
+ if not users_clicks.get(call.from_user.id):
+ users_clicks[call.from_user.id] = 1
+ else:
+ users_clicks[call.from_user.id] += 1
+
+ clicks = users_clicks[call.from_user.id]
+
+ text = __(
+ singular="You have {number} click",
+ plural="You have {number} clicks",
+ n=clicks
+ )
+ text = _("This is clicker.\n\n") + text.format(number=clicks)
+
+ await bot.edit_message_text(text, call.from_user.id, call.message.message_id,
+ reply_markup=keyboards.clicker_keyboard(_))
+
+
+@bot.message_handler(commands='menu')
+async def menu_handler(message: types.Message):
+ text = _("This is ReplyKeyboardMarkup menu example in multilanguage bot.")
+ await bot.send_message(message.chat.id, text, reply_markup=keyboards.menu_keyboard(_))
+
+
+# For lazy tranlations
+# lazy gettext is used when you don't know user's locale
+# It can be used for example to handle text buttons in multilanguage bot
+# The actual translation will be delayed until update comes and context language is set
+l_ = i18n.lazy_gettext
+
+
+# Handlers below will handle text according to user's language
+@bot.message_handler(text=l_("My user id"))
+async def return_user_id(message: types.Message):
+ await bot.send_message(message.chat.id, str(message.from_user.id))
+
+
+@bot.message_handler(text=l_("My user name"))
+async def return_user_id(message: types.Message):
+ username = message.from_user.username
+ if not username:
+ username = '-'
+ await bot.send_message(message.chat.id, username)
+
+
+# You can make it case insensitive
+@bot.message_handler(text=TextFilter(equals=l_("My first name"), ignore_case=True))
+async def return_user_id(message: types.Message):
+ await bot.send_message(message.chat.id, message.from_user.first_name)
+
+
+all_menu_texts = []
+for language in i18n.available_translations:
+ for menu_text in ("My user id", "My user name", "My first name"):
+ all_menu_texts.append(_(menu_text, language))
+
+
+# When user confused language. (handles all menu buttons texts)
+@bot.message_handler(text=TextFilter(contains=all_menu_texts, ignore_case=True))
+async def missed_message(message: types.Message):
+ await bot.send_message(message.chat.id, _("Seems you confused language"), reply_markup=keyboards.menu_keyboard(_))
+
+
+if __name__ == '__main__':
+ bot.setup_middleware(i18n)
+ bot.add_custom_filter(TextMatchFilter())
+ asyncio.run(bot.infinity_polling())
diff --git a/examples/asynchronous_telebot/mini_app.py b/examples/asynchronous_telebot/mini_app.py
new file mode 100644
index 000000000..3cdb811cb
--- /dev/null
+++ b/examples/asynchronous_telebot/mini_app.py
@@ -0,0 +1,33 @@
+# The source of the "https://pytelegrambotminiapp.vercel.app" can be found in https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples/mini_app_web
+
+import asyncio
+from telebot.async_telebot import AsyncTeleBot
+from telebot.types import (
+ ReplyKeyboardMarkup,
+ KeyboardButton,
+ WebAppInfo,
+ InlineKeyboardMarkup,
+ InlineKeyboardButton
+)
+
+BOT_TOKEN = ""
+WEB_URL = "https://pytelegrambotminiapp.vercel.app"
+
+bot = AsyncTeleBot(BOT_TOKEN)
+
+@bot.message_handler(commands=["start"])
+async def start(message):
+ reply_keyboard_markup = ReplyKeyboardMarkup(resize_keyboard=True)
+ reply_keyboard_markup.row(KeyboardButton("Start MiniApp", web_app=WebAppInfo(WEB_URL)))
+
+ inline_keyboard_markup = InlineKeyboardMarkup()
+ inline_keyboard_markup.row(InlineKeyboardButton('Start MiniApp', web_app=WebAppInfo(WEB_URL)))
+
+ await bot.reply_to(message, "Click the bottom inline button to start MiniApp", reply_markup=inline_keyboard_markup)
+ await bot.reply_to(message, "Click keyboard button to start MiniApp", reply_markup=reply_keyboard_markup)
+
+@bot.message_handler(content_types=['web_app_data'])
+async def web_app(message):
+ await bot.reply_to(message, f'Your message is "{message.web_app_data.data}"')
+
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/multibot/README.MD b/examples/asynchronous_telebot/multibot/README.MD
new file mode 100644
index 000000000..3693d363f
--- /dev/null
+++ b/examples/asynchronous_telebot/multibot/README.MD
@@ -0,0 +1,17 @@
+You probably have seen bots which allow you to send them token of your bot and then handle updates providing some functionality for your bot.
+
+This type of bots are called multibots. They are created using webhooks.
+
+
+This is the example of simple multibot.
+In order to reproduce this example you need to have domain and ssl connection.
+
+If you have, go to config.py and specify your data.
+
+There is also file called nginx_conf.conf, we will use nginx as proxy-server and this file is example nginx.conf file.
+
+Make sure that server_name and port are the same in both config and nginx_conf
+
+(nginx_conf.conf IS NOT complete, you would probably use tools like certbot to add ssl connection to it)
+
+Also, in this example I used dictionary as tokens storage, but in production you should use database so that you can re-set webhooks in case bot restarts.
\ No newline at end of file
diff --git a/examples/asynchronous_telebot/multibot/config.py b/examples/asynchronous_telebot/multibot/config.py
new file mode 100644
index 000000000..17e7141e3
--- /dev/null
+++ b/examples/asynchronous_telebot/multibot/config.py
@@ -0,0 +1,6 @@
+MAIN_BOT_TOKEN = "your_main_bot_token"
+
+WEBHOOK_HOST = "your_domain.com"
+WEBHOOK_PATH = "telegram_webhook"
+WEBAPP_HOST = "0.0.0.0"
+WEBAPP_PORT = 3500
diff --git a/examples/asynchronous_telebot/multibot/handlers.py b/examples/asynchronous_telebot/multibot/handlers.py
new file mode 100644
index 000000000..c98a6de00
--- /dev/null
+++ b/examples/asynchronous_telebot/multibot/handlers.py
@@ -0,0 +1,15 @@
+from telebot.async_telebot import AsyncTeleBot
+from telebot import types
+
+
+async def hello_handler(message: types.Message, bot: AsyncTeleBot):
+ await bot.send_message(message.chat.id, "Hi :)")
+
+
+async def echo_handler(message: types.Message, bot: AsyncTeleBot):
+ await bot.send_message(message.chat.id, message.text)
+
+
+def register_handlers(bot: AsyncTeleBot):
+ bot.register_message_handler(hello_handler, func=lambda message: message.text == 'Hello', pass_bot=True)
+ bot.register_message_handler(echo_handler, pass_bot=True)
diff --git a/examples/asynchronous_telebot/multibot/main.py b/examples/asynchronous_telebot/multibot/main.py
new file mode 100644
index 000000000..19d6666fd
--- /dev/null
+++ b/examples/asynchronous_telebot/multibot/main.py
@@ -0,0 +1,56 @@
+import asyncio
+
+from aiohttp import web
+from telebot import types, util
+from telebot.async_telebot import AsyncTeleBot
+from handlers import register_handlers
+
+import config
+
+main_bot = AsyncTeleBot(config.MAIN_BOT_TOKEN)
+app = web.Application()
+tokens = {config.MAIN_BOT_TOKEN: True}
+
+
+async def webhook(request):
+ token = request.match_info.get('token')
+ if not tokens.get(token):
+ return web.Response(status=404)
+
+ if request.headers.get('content-type') != 'application/json':
+ return web.Response(status=403)
+
+ json_string = await request.json()
+ update = types.Update.de_json(json_string)
+ if token == main_bot.token:
+ await main_bot.process_new_updates([update])
+ return web.Response()
+
+ from_update_bot = AsyncTeleBot(token)
+ register_handlers(from_update_bot)
+ await from_update_bot.process_new_updates([update])
+ return web.Response()
+
+
+app.router.add_post("/" + config.WEBHOOK_PATH + "/{token}", webhook)
+
+
+@main_bot.message_handler(commands=['add_bot'])
+async def add_bot(message: types.Message):
+ token = util.extract_arguments(message.text)
+ tokens[token] = True
+
+ new_bot = AsyncTeleBot(token)
+ await new_bot.delete_webhook()
+ await new_bot.set_webhook(f"{config.WEBHOOK_HOST}/{config.WEBHOOK_PATH}/{token}")
+
+ await new_bot.send_message(message.chat.id, "Webhook was set.")
+
+
+async def main():
+ await main_bot.delete_webhook()
+ await main_bot.set_webhook(f"{config.WEBHOOK_HOST}/{config.WEBHOOK_PATH}/{config.MAIN_BOT_TOKEN}")
+ web.run_app(app, host=config.WEBAPP_HOST, port=config.WEBAPP_PORT)
+
+if __name__ == '__main__':
+ asyncio.run(main())
diff --git a/examples/asynchronous_telebot/multibot/nginx_conf.conf b/examples/asynchronous_telebot/multibot/nginx_conf.conf
new file mode 100644
index 000000000..776fa4c77
--- /dev/null
+++ b/examples/asynchronous_telebot/multibot/nginx_conf.conf
@@ -0,0 +1,8 @@
+server {
+ server_name your_domain.com;
+
+ location /telegram_webhook/ {
+ proxy_pass http://localhost:3500;
+ }
+
+}
\ No newline at end of file
diff --git a/examples/asynchronous_telebot/register_handler.py b/examples/asynchronous_telebot/register_handler.py
new file mode 100644
index 000000000..f78c5d381
--- /dev/null
+++ b/examples/asynchronous_telebot/register_handler.py
@@ -0,0 +1,20 @@
+from telebot.async_telebot import AsyncTeleBot
+bot = AsyncTeleBot('TOKEN')
+
+async def start_executor(message):
+ await bot.send_message(message.chat.id, 'Hello!')
+
+bot.register_message_handler(start_executor, commands=['start']) # Start command executor
+
+# See also
+# bot.register_callback_query_handler(*args, **kwargs)
+# bot.register_channel_post_handler(*args, **kwargs)
+# bot.register_chat_member_handler(*args, **kwargs)
+# bot.register_inline_handler(*args, **kwargs)
+# bot.register_my_chat_member_handler(*args, **kwargs)
+# bot.register_edited_message_handler(*args, **kwargs)
+# And other functions..
+
+
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/send_file_example.py b/examples/asynchronous_telebot/send_file_example.py
new file mode 100644
index 000000000..974ae8eeb
--- /dev/null
+++ b/examples/asynchronous_telebot/send_file_example.py
@@ -0,0 +1,29 @@
+
+import telebot
+from telebot.async_telebot import AsyncTeleBot
+
+
+
+bot = AsyncTeleBot('TOKEN')
+
+
+@bot.message_handler(commands=['photo'])
+async def photo_send(message: telebot.types.Message):
+ with open('test.png', 'rb') as new_file:
+ await bot.send_photo(message.chat.id, new_file)
+
+@bot.message_handler(commands=['document'])
+async def document_send(message: telebot.types.Message):
+ with open('test.docx', 'rb') as new_file:
+ await bot.send_document(message.chat.id, new_file)
+
+@bot.message_handler(commands=['photos'])
+async def photos_send(message: telebot.types.Message):
+ with open('test.png', 'rb') as new_file, open('test2.png', 'rb') as new_file2:
+ await bot.send_media_group(message.chat.id, [telebot.types.InputMediaPhoto(new_file), telebot.types.InputMediaPhoto(new_file2)])
+
+
+
+
+import asyncio
+asyncio.run(bot.polling())
diff --git a/examples/asynchronous_telebot/set_command_example.py b/examples/asynchronous_telebot/set_command_example.py
new file mode 100644
index 000000000..2de53f427
--- /dev/null
+++ b/examples/asynchronous_telebot/set_command_example.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+
+# This is a set_my_commands example.
+# Press on [/] button in telegram client.
+# Important, to update the command menu, be sure to exit the chat with the bot and log in again
+# Important, command for chat_id and for group have a higher priority than for all
+
+import asyncio
+import telebot
+from telebot.async_telebot import AsyncTeleBot
+
+
+API_TOKEN = ''
+bot = AsyncTeleBot(API_TOKEN)
+
+
+async def main():
+ # use in for delete with the necessary scope and language_code if necessary
+ await bot.delete_my_commands(scope=None, language_code=None)
+
+ await bot.set_my_commands(
+ commands=[
+ telebot.types.BotCommand("command1", "command1 description"),
+ telebot.types.BotCommand("command2", "command2 description")
+ ],
+ # scope=telebot.types.BotCommandScopeChat(12345678) # use for personal command menu for users
+ # scope=telebot.types.BotCommandScopeAllPrivateChats() # use for all private chats
+ )
+
+ cmd = await bot.get_my_commands(scope=None, language_code=None)
+ print([c.to_json() for c in cmd])
+
+
+if __name__ == '__main__':
+ asyncio.run(main())
diff --git a/examples/asynchronous_telebot/skip_updates_example.py b/examples/asynchronous_telebot/skip_updates_example.py
new file mode 100644
index 000000000..89ff7970e
--- /dev/null
+++ b/examples/asynchronous_telebot/skip_updates_example.py
@@ -0,0 +1,15 @@
+from telebot.async_telebot import AsyncTeleBot
+
+bot = AsyncTeleBot('TOKEN')
+
+@bot.message_handler(commands=['start', 'help'])
+async def send_welcome(message):
+ await bot.reply_to(message, "Howdy, how are you doing?")
+
+@bot.message_handler(func=lambda message: True)
+async def echo_all(message):
+ await bot.reply_to(message, message.text)
+
+
+import asyncio
+asyncio.run(bot.polling(skip_pending=True)) # to skip updates
diff --git a/examples/asynchronous_telebot/timer_bot_async.py b/examples/asynchronous_telebot/timer_bot_async.py
new file mode 100644
index 000000000..c263dcbac
--- /dev/null
+++ b/examples/asynchronous_telebot/timer_bot_async.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python3
+
+# This is a simple bot with schedule timer
+# https://github.com/ibrb/python-aioschedule
+# https://schedule.readthedocs.io
+
+import asyncio
+import aioschedule
+from telebot.async_telebot import AsyncTeleBot
+
+API_TOKEN = ''
+bot = AsyncTeleBot(API_TOKEN)
+
+
+async def beep(chat_id) -> None:
+ """Send the beep message."""
+ await bot.send_message(chat_id, text='Beep!')
+ aioschedule.clear(chat_id) # return schedule.CancelJob not working in aioschedule use tag for delete
+
+
+@bot.message_handler(commands=['help', 'start'])
+async def send_welcome(message):
+ await bot.reply_to(message, "Hi! Use /set to set a timer")
+
+
+@bot.message_handler(commands=['set'])
+async def set_timer(message):
+ args = message.text.split()
+ if len(args) > 1 and args[1].isdigit():
+ sec = int(args[1])
+ aioschedule.every(sec).seconds.do(beep, message.chat.id).tag(message.chat.id)
+ else:
+ await bot.reply_to(message, 'Usage: /set ')
+
+
+@bot.message_handler(commands=['unset'])
+def unset_timer(message):
+ aioschedule.clean(message.chat.id)
+
+
+async def scheduler():
+ while True:
+ await aioschedule.run_pending()
+ await asyncio.sleep(1)
+
+
+async def main():
+ await asyncio.gather(bot.infinity_polling(), scheduler())
+
+
+if __name__ == '__main__':
+ asyncio.run(main())
diff --git a/examples/asynchronous_telebot/update_listener.py b/examples/asynchronous_telebot/update_listener.py
new file mode 100644
index 000000000..5e41cc414
--- /dev/null
+++ b/examples/asynchronous_telebot/update_listener.py
@@ -0,0 +1,16 @@
+from telebot.async_telebot import AsyncTeleBot
+
+# Update listeners are functions that are called when any update is received.
+
+bot = AsyncTeleBot(token='TOKEN')
+
+async def update_listener(messages):
+ for message in messages:
+ if message.text == '/start':
+ await bot.send_message(message.chat.id, 'Hello!')
+
+bot.set_update_listener(update_listener)
+
+
+import asyncio
+asyncio.run(bot.polling())
\ No newline at end of file
diff --git a/examples/asynchronous_telebot/webhooks/async_webhook_aiohttp_echo_bot.py b/examples/asynchronous_telebot/webhooks/async_webhook_aiohttp_echo_bot.py
new file mode 100644
index 000000000..457a2abf3
--- /dev/null
+++ b/examples/asynchronous_telebot/webhooks/async_webhook_aiohttp_echo_bot.py
@@ -0,0 +1,93 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# This is an async echo bot using decorators and webhook with aiohttp
+# It echoes any incoming text messages and does not use the polling method.
+
+import logging
+import ssl
+import asyncio
+from aiohttp import web
+import telebot
+from telebot.async_telebot import AsyncTeleBot
+
+API_TOKEN = ''
+WEBHOOK_HOST = ''
+WEBHOOK_PORT = 8443 # 443, 80, 88 or 8443 (port need to be 'open')
+WEBHOOK_LISTEN = '0.0.0.0' # In some VPS you may need to put here the IP addr
+WEBHOOK_SSL_CERT = './webhook_cert.pem' # Path to the ssl certificate
+WEBHOOK_SSL_PRIV = './webhook_pkey.pem' # Path to the ssl private key
+WEBHOOK_URL_BASE = "https://{}:{}".format(WEBHOOK_HOST, WEBHOOK_PORT)
+WEBHOOK_URL_PATH = "/{}/".format(API_TOKEN)
+
+# Quick'n'dirty SSL certificate generation:
+#
+# openssl genrsa -out webhook_pkey.pem 2048
+# openssl req -new -x509 -days 3650 -key webhook_pkey.pem -out webhook_cert.pem
+#
+# When asked for "Common Name (e.g. server FQDN or YOUR name)" you should reply
+# with the same value in you put in WEBHOOK_HOST
+
+logger = telebot.logger
+telebot.logger.setLevel(logging.INFO)
+bot = AsyncTeleBot(API_TOKEN)
+
+
+# Process webhook calls
+async def handle(request):
+ if request.match_info.get('token') == bot.token:
+ request_body_dict = await request.json()
+ update = telebot.types.Update.de_json(request_body_dict)
+ asyncio.ensure_future(bot.process_new_updates([update]))
+ return web.Response()
+ else:
+ return web.Response(status=403)
+
+
+# Handle '/start' and '/help'
+@bot.message_handler(commands=['help', 'start'])
+async def send_welcome(message):
+ await bot.reply_to(message,
+ ("Hi there, I am EchoBot.\n"
+ "I am here to echo your kind words back to you."))
+
+
+# Handle all other messages
+@bot.message_handler(func=lambda message: True, content_types=['text'])
+async def echo_message(message):
+ await bot.reply_to(message, message.text)
+
+
+# Remove webhook and closing session before exiting
+async def shutdown(app):
+ logger.info('Shutting down: removing webhook')
+ await bot.remove_webhook()
+ logger.info('Shutting down: closing session')
+ await bot.close_session()
+
+
+async def setup():
+ # Remove webhook, it fails sometimes the set if there is a previous webhook
+ logger.info('Starting up: removing old webhook')
+ await bot.remove_webhook()
+ # Set webhook
+ logger.info('Starting up: setting webhook')
+ await bot.set_webhook(url=WEBHOOK_URL_BASE + WEBHOOK_URL_PATH,
+ certificate=open(WEBHOOK_SSL_CERT, 'r'))
+ app = web.Application()
+ app.router.add_post('/{token}/', handle)
+ app.on_cleanup.append(shutdown)
+ return app
+
+
+if __name__ == '__main__':
+ # Build ssl context
+ context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
+ context.load_cert_chain(WEBHOOK_SSL_CERT, WEBHOOK_SSL_PRIV)
+ # Start aiohttp server
+ web.run_app(
+ setup(),
+ host=WEBHOOK_LISTEN,
+ port=WEBHOOK_PORT,
+ ssl_context=context,
+ )
diff --git a/examples/asynchronous_telebot/webhooks/run_webhooks.py b/examples/asynchronous_telebot/webhooks/run_webhooks.py
new file mode 100644
index 000000000..3b74c33d1
--- /dev/null
+++ b/examples/asynchronous_telebot/webhooks/run_webhooks.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+
+# This is a simple echo bot using the decorator mechanism.
+# It echoes any incoming text messages.
+# Example on built-in function to receive and process webhooks.
+
+from telebot.async_telebot import AsyncTeleBot
+import asyncio
+bot = AsyncTeleBot('TOKEN')
+
+
+WEBHOOK_SSL_CERT = './webhook_cert.pem' # Path to the ssl certificate
+WEBHOOK_SSL_PRIV = './webhook_pkey.pem' # Path to the ssl private key
+DOMAIN = '1.2.3.4' # either domain, or ip address of vps
+
+# Quick'n'dirty SSL certificate generation:
+#
+# openssl genrsa -out webhook_pkey.pem 2048
+# openssl req -new -x509 -days 3650 -key webhook_pkey.pem -out webhook_cert.pem
+#
+# When asked for "Common Name (e.g. server FQDN or YOUR name)" you should reply
+# with the same value in you put in WEBHOOK_HOST
+
+
+# Handle '/start' and '/help'
+@bot.message_handler(commands=['help', 'start'])
+async def send_welcome(message):
+ await bot.reply_to(message, """\
+Hi there, I am EchoBot.
+I am here to echo your kind words back to you. Just say anything nice and I'll say the exact same thing to you!\
+""")
+
+
+# Handle all other messages with content_type 'text' (content_types defaults to ['text'])
+@bot.message_handler(func=lambda message: True)
+async def echo_message(message):
+ await bot.reply_to(message, message.text)
+
+
+# it uses fastapi + uvicorn
+asyncio.run(bot.run_webhooks(
+ listen=DOMAIN,
+ certificate=WEBHOOK_SSL_CERT,
+ certificate_key=WEBHOOK_SSL_PRIV
+))
\ No newline at end of file
diff --git a/examples/asynchronous_telebot/webhooks/webhook_starlette_echo_bot.py b/examples/asynchronous_telebot/webhooks/webhook_starlette_echo_bot.py
new file mode 100644
index 000000000..bcb440cf8
--- /dev/null
+++ b/examples/asynchronous_telebot/webhooks/webhook_starlette_echo_bot.py
@@ -0,0 +1,89 @@
+#!/usr/bin/env python
+"""
+Asynchronous Telegram Echo Bot example.
+
+This is a simple bot that echoes each message that is received onto the chat.
+It uses the Starlette ASGI framework to receive updates via webhook requests.
+"""
+
+import uvicorn
+from starlette.applications import Starlette
+from starlette.requests import Request
+from starlette.responses import PlainTextResponse, Response
+from starlette.routing import Route
+from telebot.async_telebot import AsyncTeleBot
+from telebot.types import Message, Update
+
+API_TOKEN = "TOKEN"
+
+WEBHOOK_HOST = ""
+WEBHOOK_PORT = 8443 # 443, 80, 88 or 8443 (port need to be 'open')
+WEBHOOK_LISTEN = "0.0.0.0"
+WEBHOOK_SSL_CERT = "./webhook_cert.pem" # Path to the ssl certificate
+WEBHOOK_SSL_PRIV = "./webhook_pkey.pem" # Path to the ssl private key
+WEBHOOK_URL = f"https://{WEBHOOK_HOST}:{WEBHOOK_PORT}/telegram"
+WEBHOOK_SECRET_TOKEN = "SECRET_TOKEN"
+
+logger = telebot.logger
+telebot.logger.setLevel(logging.INFO)
+
+bot = AsyncTeleBot(token=API_TOKEN)
+
+# BOT HANDLERS
+@bot.message_handler(commands=["help", "start"])
+async def send_welcome(message: Message):
+ """
+ Handle '/start' and '/help'
+ """
+ await bot.reply_to(
+ message,
+ ("Hi there, I am EchoBot.\n" "I am here to echo your kind words back to you."),
+ )
+
+
+@bot.message_handler(func=lambda _: True, content_types=["text"])
+async def echo_message(message: Message):
+ """
+ Handle all other messages
+ """
+ await bot.reply_to(message, message.text)
+
+
+# WEBSERVER HANDLERS
+async def telegram(request: Request) -> Response:
+ """Handle incoming Telegram updates."""
+ token_header_name = "X-Telegram-Bot-Api-Secret-Token"
+ if request.headers.get(token_header_name) != WEBHOOK_SECRET_TOKEN:
+ return PlainTextResponse("Forbidden", status_code=403)
+ await bot.process_new_updates([Update.de_json(await request.json())])
+ return Response()
+
+
+async def startup() -> None:
+ """Register webhook for telegram updates."""
+ webhook_info = await bot.get_webhook_info(30)
+ if WEBHOOK_URL != webhook_info.url:
+ logger.debug(
+ f"updating webhook url, old: {webhook_info.url}, new: {WEBHOOK_URL}"
+ )
+ if not await bot.set_webhook(
+ url=WEBHOOK_URL, secret_token=WEBHOOK_SECRET_TOKEN
+ ):
+ raise RuntimeError("unable to set webhook")
+
+
+app = Starlette(
+ routes=[
+ Route("/telegram", telegram, methods=["POST"]),
+ ],
+ on_startup=[startup],
+)
+
+
+uvicorn.run(
+ app,
+ host=WEBHOOK_HOST,
+ port=WEBHOOK_LISTEN,
+ ssl_certfile=WEBHOOK_SSL_CERT,
+ ssl_keyfile=WEBHOOK_SSL_PRIV,
+)
diff --git a/examples/callback_data_examples/advanced_calendar_example/filters.py b/examples/callback_data_examples/advanced_calendar_example/filters.py
new file mode 100644
index 000000000..e48f406a7
--- /dev/null
+++ b/examples/callback_data_examples/advanced_calendar_example/filters.py
@@ -0,0 +1,25 @@
+import telebot
+from telebot import types, AdvancedCustomFilter
+from telebot.callback_data import CallbackData, CallbackDataFilter
+
+calendar_factory = CallbackData("year", "month", prefix="calendar")
+calendar_zoom = CallbackData("year", prefix="calendar_zoom")
+
+
+class CalendarCallbackFilter(AdvancedCustomFilter):
+ key = 'calendar_config'
+
+ def check(self, call: types.CallbackQuery, config: CallbackDataFilter):
+ return config.check(query=call)
+
+
+class CalendarZoomCallbackFilter(AdvancedCustomFilter):
+ key = 'calendar_zoom_config'
+
+ def check(self, call: types.CallbackQuery, config: CallbackDataFilter):
+ return config.check(query=call)
+
+
+def bind_filters(bot: telebot.TeleBot):
+ bot.add_custom_filter(CalendarCallbackFilter())
+ bot.add_custom_filter(CalendarZoomCallbackFilter())
diff --git a/examples/callback_data_examples/advanced_calendar_example/keyboards.py b/examples/callback_data_examples/advanced_calendar_example/keyboards.py
new file mode 100644
index 000000000..46ffde157
--- /dev/null
+++ b/examples/callback_data_examples/advanced_calendar_example/keyboards.py
@@ -0,0 +1,92 @@
+import calendar
+from datetime import date, timedelta
+
+from examples.callback_data_examples.advanced_calendar_example.filters import calendar_factory, calendar_zoom
+from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton
+
+EMTPY_FIELD = '1'
+WEEK_DAYS = [calendar.day_abbr[i] for i in range(7)]
+MONTHS = [(i, calendar.month_name[i]) for i in range(1, 13)]
+
+
+def generate_calendar_days(year: int, month: int):
+ keyboard = InlineKeyboardMarkup(row_width=7)
+ today = date.today()
+
+ keyboard.add(
+ InlineKeyboardButton(
+ text=date(year=year, month=month, day=1).strftime('%b %Y'),
+ callback_data=EMTPY_FIELD
+ )
+ )
+ keyboard.add(*[
+ InlineKeyboardButton(
+ text=day,
+ callback_data=EMTPY_FIELD
+ )
+ for day in WEEK_DAYS
+ ])
+
+ for week in calendar.Calendar().monthdayscalendar(year=year, month=month):
+ week_buttons = []
+ for day in week:
+ day_name = ' '
+ if day == today.day and today.year == year and today.month == month:
+ day_name = '🔘'
+ elif day != 0:
+ day_name = str(day)
+ week_buttons.append(
+ InlineKeyboardButton(
+ text=day_name,
+ callback_data=EMTPY_FIELD
+ )
+ )
+ keyboard.add(*week_buttons)
+
+ previous_date = date(year=year, month=month, day=1) - timedelta(days=1)
+ next_date = date(year=year, month=month, day=1) + timedelta(days=31)
+
+ keyboard.add(
+ InlineKeyboardButton(
+ text='Previous month',
+ callback_data=calendar_factory.new(year=previous_date.year, month=previous_date.month)
+ ),
+ InlineKeyboardButton(
+ text='Zoom out',
+ callback_data=calendar_zoom.new(year=year)
+ ),
+ InlineKeyboardButton(
+ text='Next month',
+ callback_data=calendar_factory.new(year=next_date.year, month=next_date.month)
+ ),
+ )
+
+ return keyboard
+
+
+def generate_calendar_months(year: int):
+ keyboard = InlineKeyboardMarkup(row_width=3)
+ keyboard.add(
+ InlineKeyboardButton(
+ text=date(year=year, month=1, day=1).strftime('Year %Y'),
+ callback_data=EMTPY_FIELD
+ )
+ )
+ keyboard.add(*[
+ InlineKeyboardButton(
+ text=month,
+ callback_data=calendar_factory.new(year=year, month=month_number)
+ )
+ for month_number, month in MONTHS
+ ])
+ keyboard.add(
+ InlineKeyboardButton(
+ text='Previous year',
+ callback_data=calendar_zoom.new(year=year - 1)
+ ),
+ InlineKeyboardButton(
+ text='Next year',
+ callback_data=calendar_zoom.new(year=year + 1)
+ )
+ )
+ return keyboard
diff --git a/examples/callback_data_examples/advanced_calendar_example/main.py b/examples/callback_data_examples/advanced_calendar_example/main.py
new file mode 100644
index 000000000..8ccf4698d
--- /dev/null
+++ b/examples/callback_data_examples/advanced_calendar_example/main.py
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+"""
+This Example will show you an advanced usage of CallbackData.
+In this example calendar was implemented
+"""
+
+from datetime import date
+
+from examples.callback_data_examples.advanced_calendar_example.keyboards import generate_calendar_days, \
+ generate_calendar_months, EMTPY_FIELD
+from filters import calendar_factory, calendar_zoom, bind_filters
+from telebot import types, TeleBot
+
+API_TOKEN = ''
+bot = TeleBot(API_TOKEN)
+
+
+@bot.message_handler(commands='start')
+def start_command_handler(message: types.Message):
+ bot.send_message(message.chat.id,
+ f"Hello {message.from_user.first_name}. This bot is an example of calendar keyboard."
+ "\nPress /calendar to see it.")
+
+
+@bot.message_handler(commands='calendar')
+def calendar_command_handler(message: types.Message):
+ now = date.today()
+ bot.send_message(message.chat.id, 'Calendar', reply_markup=generate_calendar_days(year=now.year, month=now.month))
+
+
+@bot.callback_query_handler(func=None, calendar_config=calendar_factory.filter())
+def calendar_action_handler(call: types.CallbackQuery):
+ callback_data: dict = calendar_factory.parse(callback_data=call.data)
+ year, month = int(callback_data['year']), int(callback_data['month'])
+
+ bot.edit_message_reply_markup(call.message.chat.id, call.message.id,
+ reply_markup=generate_calendar_days(year=year, month=month))
+
+
+@bot.callback_query_handler(func=None, calendar_zoom_config=calendar_zoom.filter())
+def calendar_zoom_out_handler(call: types.CallbackQuery):
+ callback_data: dict = calendar_zoom.parse(callback_data=call.data)
+ year = int(callback_data.get('year'))
+
+ bot.edit_message_reply_markup(call.message.chat.id, call.message.id,
+ reply_markup=generate_calendar_months(year=year))
+
+
+@bot.callback_query_handler(func=lambda call: call.data == EMTPY_FIELD)
+def callback_empty_field_handler(call: types.CallbackQuery):
+ bot.answer_callback_query(call.id)
+
+
+if __name__ == '__main__':
+ bind_filters(bot)
+ bot.infinity_polling()
diff --git a/examples/callback_data_examples/simple_products_example.py b/examples/callback_data_examples/simple_products_example.py
new file mode 100644
index 000000000..5f4c0eb74
--- /dev/null
+++ b/examples/callback_data_examples/simple_products_example.py
@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+"""
+This Example will show you how to use CallbackData
+"""
+
+from telebot.callback_data import CallbackData, CallbackDataFilter
+from telebot import types, TeleBot
+from telebot.custom_filters import AdvancedCustomFilter
+
+API_TOKEN = ''
+PRODUCTS = [
+ {'id': '0', 'name': 'xiaomi mi 10', 'price': 400},
+ {'id': '1', 'name': 'samsung s20', 'price': 800},
+ {'id': '2', 'name': 'iphone 13', 'price': 1300}
+]
+
+bot = TeleBot(API_TOKEN)
+products_factory = CallbackData('product_id', prefix='products')
+
+
+def products_keyboard():
+ return types.InlineKeyboardMarkup(
+ keyboard=[
+ [
+ types.InlineKeyboardButton(
+ text=product['name'],
+ callback_data=products_factory.new(product_id=product["id"])
+ )
+ ]
+ for product in PRODUCTS
+ ]
+ )
+
+
+def back_keyboard():
+ return types.InlineKeyboardMarkup(
+ keyboard=[
+ [
+ types.InlineKeyboardButton(
+ text='⬅',
+ callback_data='back'
+ )
+ ]
+ ]
+ )
+
+
+class ProductsCallbackFilter(AdvancedCustomFilter):
+ key = 'config'
+
+ def check(self, call: types.CallbackQuery, config: CallbackDataFilter):
+ return config.check(query=call)
+
+
+@bot.message_handler(commands=['products'])
+def products_command_handler(message: types.Message):
+ bot.send_message(message.chat.id, 'Products:', reply_markup=products_keyboard())
+
+
+# Only product with field - product_id = 2
+@bot.callback_query_handler(func=None, config=products_factory.filter(product_id='2'))
+def product_one_callback(call: types.CallbackQuery):
+ bot.answer_callback_query(callback_query_id=call.id, text='Not available :(', show_alert=True)
+
+
+# Any other products
+@bot.callback_query_handler(func=None, config=products_factory.filter())
+def products_callback(call: types.CallbackQuery):
+ callback_data: dict = products_factory.parse(callback_data=call.data)
+ product_id = int(callback_data['product_id'])
+ product = PRODUCTS[product_id]
+
+ text = f"Product name: {product['name']}\n" \
+ f"Product price: {product['price']}"
+ bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id,
+ text=text, reply_markup=back_keyboard())
+
+
+@bot.callback_query_handler(func=lambda c: c.data == 'back')
+def back_callback(call: types.CallbackQuery):
+ bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id,
+ text='Products:', reply_markup=products_keyboard())
+
+
+bot.add_custom_filter(ProductsCallbackFilter())
+bot.infinity_polling()
diff --git a/examples/chat_join_request.py b/examples/chat_join_request.py
new file mode 100644
index 000000000..6ab29ed9f
--- /dev/null
+++ b/examples/chat_join_request.py
@@ -0,0 +1,11 @@
+import telebot
+
+
+bot = telebot.TeleBot('TOKEN')
+
+@bot.chat_join_request_handler()
+def make_some(message: telebot.types.ChatJoinRequest):
+ bot.send_message(message.chat.id, 'I accepted a new user!')
+ bot.approve_chat_join_request(message.chat.id, message.from_user.id)
+
+bot.infinity_polling(allowed_updates=telebot.util.update_types)
\ No newline at end of file
diff --git a/examples/chat_member_example.py b/examples/chat_member_example.py
new file mode 100644
index 000000000..675d956ed
--- /dev/null
+++ b/examples/chat_member_example.py
@@ -0,0 +1,33 @@
+import telebot
+from telebot import types,util
+
+bot = telebot.TeleBot("token")
+
+#chat_member_handler. When status changes, telegram gives update. check status from old_chat_member and new_chat_member.
+@bot.chat_member_handler()
+def chat_m(message: types.ChatMemberUpdated):
+ old = message.old_chat_member
+ new = message.new_chat_member
+ if new.status == "member":
+ bot.send_message(message.chat.id,"Hello {name}!".format(name=new.user.first_name)) # Welcome message
+
+#if bot is added to group, this handler will work
+@bot.my_chat_member_handler()
+def my_chat_m(message: types.ChatMemberUpdated):
+ old = message.old_chat_member
+ new = message.new_chat_member
+ if new.status == "member":
+ bot.send_message(message.chat.id,"Somebody added me to group") # Welcome message, if bot was added to group
+ bot.leave_chat(message.chat.id)
+
+#content_Type_service is:
+#'new_chat_members', 'left_chat_member', 'new_chat_title', 'new_chat_photo', 'delete_chat_photo', 'group_chat_created',
+#'supergroup_chat_created', 'channel_chat_created', 'migrate_to_chat_id', 'migrate_from_chat_id', 'pinned_message',
+#'proximity_alert_triggered', 'video_chat_scheduled', 'video_chat_started', 'video_chat_ended',
+#'video_chat_participants_invited', 'message_auto_delete_timer_changed'
+# this handler deletes service messages
+
+@bot.message_handler(content_types=util.content_type_service)
+def delall(message: types.Message):
+ bot.delete_message(message.chat.id,message.message_id)
+bot.infinity_polling(allowed_updates=util.update_types)
diff --git a/examples/continue_handling.py b/examples/continue_handling.py
new file mode 100644
index 000000000..68e26f137
--- /dev/null
+++ b/examples/continue_handling.py
@@ -0,0 +1,23 @@
+from telebot import TeleBot
+from telebot.handler_backends import ContinueHandling
+
+
+bot = TeleBot('TOKEN')
+
+@bot.message_handler(commands=['start'])
+def start(message):
+ bot.send_message(message.chat.id, 'Hello World!')
+ return ContinueHandling()
+
+@bot.message_handler(commands=['start'])
+def start2(message):
+ """
+ This handler comes after the first one, but it will never be called.
+ But you can call it by returning ContinueHandling() in the first handler.
+
+ If you return ContinueHandling() in the first handler, the next
+ registered handler with appropriate filters will be called.
+ """
+ bot.send_message(message.chat.id, 'Hello World2!')
+
+bot.infinity_polling()
diff --git a/examples/create_invite_link.py b/examples/create_invite_link.py
new file mode 100644
index 000000000..eb8cebf89
--- /dev/null
+++ b/examples/create_invite_link.py
@@ -0,0 +1,33 @@
+import telebot
+from time import sleep, time
+from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton #Only for creating Inline Buttons, not necessary for creating Invite Links
+
+Token = "api_token" #Your Bot Access Token
+Group_ID = -1234567890 #Group ID for which invite link is to be created
+
+bot = telebot.TeleBot(Token, parse_mode="HTML")
+
+#/start command message
+@bot.message_handler(commands=['start'])
+def startmsg(msg):
+ bot.reply_to(msg, "Hey there, I'm a bot made by pyTelegramBotAPI!")
+
+#Get notified of incoming members in group
+@bot.message_handler(content_types=['new_chat_members'])
+def newmember(msg):
+ #Create an invite link class that contains info about the created invite link using create_chat_invite_link() with parameters
+ invite = bot.create_chat_invite_link(Group_ID, member_limit=1, expire_date=int(time())+45) #Here, the link will auto-expire in 45 seconds
+ InviteLink = invite.invite_link #Get the actual invite link from 'invite' class
+
+ mrkplink = InlineKeyboardMarkup() #Created Inline Keyboard Markup
+ mrkplink.add(InlineKeyboardButton("Join our group 🚀", url=InviteLink)) #Added Invite Link to Inline Keyboard
+
+ bot.send_message(msg.chat.id, f"Hey there {msg.from_user.first_name}, Click the link below to join our Official Group.", reply_markup=mrkplink)
+
+ #This will send a message with the newly-created invite link as markup button.
+ #The member limit will be 1 and expiring time will be 45 sec.
+
+
+
+
+bot.infinity_polling()
diff --git a/examples/custom_filters/admin_filter_example.py b/examples/custom_filters/admin_filter_example.py
new file mode 100644
index 000000000..2aa683e4a
--- /dev/null
+++ b/examples/custom_filters/admin_filter_example.py
@@ -0,0 +1,12 @@
+import telebot
+from telebot import custom_filters
+bot = telebot.TeleBot('TOKEN')
+
+# Handler
+@bot.message_handler(chat_types=['supergroup'], is_chat_admin=True)
+def answer_for_admin(message):
+ bot.send_message(message.chat.id,"hello my admin")
+
+# Register filter
+bot.add_custom_filter(custom_filters.IsAdminFilter(bot))
+bot.infinity_polling()
diff --git a/examples/custom_filters/advanced_text_filter.py b/examples/custom_filters/advanced_text_filter.py
new file mode 100644
index 000000000..2b01685c0
--- /dev/null
+++ b/examples/custom_filters/advanced_text_filter.py
@@ -0,0 +1,125 @@
+# -*- coding: utf-8 -*-
+"""
+This Example will show you usage of TextFilter
+In this example you will see how to use TextFilter
+with (message_handler, callback_query_handler, poll_handler)
+"""
+
+from telebot import TeleBot, types
+from telebot.custom_filters import TextFilter, TextMatchFilter, IsReplyFilter
+
+bot = TeleBot("")
+
+
+@bot.message_handler(text=TextFilter(equals='hello'))
+def hello_handler(message: types.Message):
+ bot.send_message(message.chat.id, message.text)
+
+
+@bot.message_handler(text=TextFilter(equals='hello', ignore_case=True))
+def hello_handler_ignore_case(message: types.Message):
+ bot.send_message(message.chat.id, message.text + ' ignore case')
+
+
+@bot.message_handler(text=TextFilter(contains=['good', 'bad']))
+def contains_handler(message: types.Message):
+ bot.send_message(message.chat.id, message.text)
+
+
+@bot.message_handler(text=TextFilter(contains=['good', 'bad'], ignore_case=True))
+def contains_handler_ignore_case(message: types.Message):
+ bot.send_message(message.chat.id, message.text + ' ignore case')
+
+
+@bot.message_handler(text=TextFilter(starts_with='st')) # stArk, steve, stONE
+def starts_with_handler(message: types.Message):
+ bot.send_message(message.chat.id, message.text)
+
+
+@bot.message_handler(text=TextFilter(starts_with='st', ignore_case=True)) # STark, sTeve, stONE
+def starts_with_handler_ignore_case(message: types.Message):
+ bot.send_message(message.chat.id, message.text + ' ignore case')
+
+
+@bot.message_handler(text=TextFilter(ends_with='ay')) # wednesday, SUNday, WeekDay
+def ends_with_handler(message: types.Message):
+ bot.send_message(message.chat.id, message.text)
+
+
+@bot.message_handler(text=TextFilter(ends_with='ay', ignore_case=True)) # wednesdAY, sundAy, WeekdaY
+def ends_with_handler_ignore_case(message: types.Message):
+ bot.send_message(message.chat.id, message.text + ' ignore case')
+
+
+@bot.message_handler(text=TextFilter(equals='/callback'))
+def send_callback(message: types.Message):
+ keyboard = types.InlineKeyboardMarkup(
+ keyboard=[
+ [types.InlineKeyboardButton(text='callback data', callback_data='example')],
+ [types.InlineKeyboardButton(text='ignore case callback data', callback_data='ExAmPLe')]
+ ]
+ )
+ bot.send_message(message.chat.id, message.text, reply_markup=keyboard)
+
+
+@bot.callback_query_handler(func=None, text=TextFilter(equals='example'))
+def callback_query_handler(call: types.CallbackQuery):
+ bot.answer_callback_query(call.id, call.data, show_alert=True)
+
+
+@bot.callback_query_handler(func=None, text=TextFilter(equals='example', ignore_case=True))
+def callback_query_handler_ignore_case(call: types.CallbackQuery):
+ bot.answer_callback_query(call.id, call.data + " ignore case", show_alert=True)
+
+
+@bot.message_handler(text=TextFilter(equals='/poll'))
+def send_poll(message: types.Message):
+ bot.send_poll(message.chat.id, question='When do you prefer to work?', options=['Morning', 'Night'])
+ bot.send_poll(message.chat.id, question='WHEN DO you pRefeR to worK?', options=['Morning', 'Night'])
+
+
+@bot.poll_handler(func=None, text=TextFilter(equals='When do you prefer to work?'))
+def poll_question_handler(poll: types.Poll):
+ print(poll.question)
+
+
+@bot.poll_handler(func=None, text=TextFilter(equals='When do you prefer to work?', ignore_case=True))
+def poll_question_handler_ignore_case(poll: types.Poll):
+ print(poll.question + ' ignore case')
+
+
+# either hi or contains one of (привет, salom)
+@bot.message_handler(text=TextFilter(equals="hi", contains=('привет', 'salom'), ignore_case=True))
+def multiple_patterns_handler(message: types.Message):
+ bot.send_message(message.chat.id, message.text)
+
+
+# starts with one of (mi, mea) for ex. minor, milk, meal, meat
+@bot.message_handler(text=TextFilter(starts_with=['mi', 'mea'], ignore_case=True))
+def multiple_starts_with_handler(message: types.Message):
+ bot.send_message(message.chat.id, message.text)
+
+
+# ends with one of (es, on) for ex. Jones, Davies, Johnson, Wilson
+@bot.message_handler(text=TextFilter(ends_with=['es', 'on'], ignore_case=True))
+def multiple_ends_with_handler(message: types.Message):
+ bot.send_message(message.chat.id, message.text)
+
+
+# !ban /ban .ban !бан /бан .бан
+@bot.message_handler(is_reply=True,
+ text=TextFilter(starts_with=('!', '/', '.'), ends_with=['ban', 'бан'], ignore_case=True))
+def ban_command_handler(message: types.Message):
+ if len(message.text) == 4 and message.chat.type != 'private':
+ try:
+ bot.ban_chat_member(message.chat.id, message.reply_to_message.from_user.id)
+ bot.reply_to(message.reply_to_message, 'Banned.')
+ except Exception as err:
+ print(err.args)
+ return
+
+
+if __name__ == '__main__':
+ bot.add_custom_filter(TextMatchFilter())
+ bot.add_custom_filter(IsReplyFilter())
+ bot.infinity_polling()
diff --git a/examples/custom_filters/general_custom_filters.py b/examples/custom_filters/general_custom_filters.py
new file mode 100644
index 000000000..5eab56971
--- /dev/null
+++ b/examples/custom_filters/general_custom_filters.py
@@ -0,0 +1,42 @@
+import telebot
+
+bot = telebot.TeleBot('TOKEN')
+
+
+# AdvancedCustomFilter is for list, string filter values
+class MainFilter(telebot.custom_filters.AdvancedCustomFilter):
+ key='text'
+ @staticmethod
+ def check(message, text):
+ return message.text in text
+
+# SimpleCustomFilter is for boolean values, such as is_admin=True
+class IsAdmin(telebot.custom_filters.SimpleCustomFilter):
+ key='is_admin'
+ @staticmethod
+ def check(message: telebot.types.Message):
+ return bot.get_chat_member(message.chat.id,message.from_user.id).status in ['administrator','creator']
+
+
+@bot.message_handler(is_admin=True, commands=['admin']) # Check if user is admin
+def admin_rep(message):
+ bot.send_message(message.chat.id, "Hi admin")
+
+@bot.message_handler(is_admin=False, commands=['admin']) # If user is not admin
+def not_admin(message):
+ bot.send_message(message.chat.id, "You are not admin")
+
+@bot.message_handler(text=['hi']) # Response to hi message
+def welcome_hi(message):
+ bot.send_message(message.chat.id, 'You said hi')
+
+@bot.message_handler(text=['bye']) # Response to bye message
+def bye_user(message):
+ bot.send_message(message.chat.id, 'You said bye')
+
+
+# Do not forget to register filters
+bot.add_custom_filter(MainFilter())
+bot.add_custom_filter(IsAdmin())
+
+bot.infinity_polling(skip_pending=True) # Skip old updates
diff --git a/examples/custom_filters/id_filter_example.py b/examples/custom_filters/id_filter_example.py
new file mode 100644
index 000000000..4a5b8834d
--- /dev/null
+++ b/examples/custom_filters/id_filter_example.py
@@ -0,0 +1,19 @@
+import telebot
+from telebot import custom_filters
+
+bot = telebot.TeleBot('token')
+
+
+# Chat id can be private or supergroups.
+@bot.message_handler(chat_id=[12345678], commands=['admin']) # chat_id checks id corresponds to your list or not.
+def admin_rep(message):
+ bot.send_message(message.chat.id, "You are allowed to use this command.")
+
+@bot.message_handler(commands=['admin'])
+def not_admin(message):
+ bot.send_message(message.chat.id, "You are not allowed to use this command")
+
+# Do not forget to register
+bot.add_custom_filter(custom_filters.ChatFilter())
+
+bot.infinity_polling()
diff --git a/examples/custom_filters/is_filter_example.py b/examples/custom_filters/is_filter_example.py
new file mode 100644
index 000000000..414ac0db1
--- /dev/null
+++ b/examples/custom_filters/is_filter_example.py
@@ -0,0 +1,21 @@
+import telebot
+from telebot import custom_filters
+
+bot = telebot.TeleBot('TOKEN')
+
+
+# Check if message is a reply
+@bot.message_handler(is_reply=True)
+def start_filter(message):
+ bot.send_message(message.chat.id, "Looks like you replied to my message.")
+
+# Check if message was forwarded
+@bot.message_handler(is_forwarded=True)
+def text_filter(message):
+ bot.send_message(message.chat.id, "I do not accept forwarded messages!")
+
+# Do not forget to register filters
+bot.add_custom_filter(custom_filters.IsReplyFilter())
+bot.add_custom_filter(custom_filters.ForwardFilter())
+
+bot.infinity_polling()
diff --git a/examples/custom_filters/text_filter_example.py b/examples/custom_filters/text_filter_example.py
new file mode 100644
index 000000000..73b6682e3
--- /dev/null
+++ b/examples/custom_filters/text_filter_example.py
@@ -0,0 +1,21 @@
+import telebot
+from telebot import custom_filters
+
+bot = telebot.TeleBot('TOKEN')
+
+
+# Check if message starts with @admin tag
+@bot.message_handler(text_startswith="@admin")
+def start_filter(message):
+ bot.send_message(message.chat.id, "Looks like you are calling admin, wait...")
+
+# Check if text is hi or hello
+@bot.message_handler(text=['hi','hello'])
+def text_filter(message):
+ bot.send_message(message.chat.id, "Hi, {name}!".format(name=message.from_user.first_name))
+
+# Do not forget to register filters
+bot.add_custom_filter(custom_filters.TextMatchFilter())
+bot.add_custom_filter(custom_filters.TextStartsFilter())
+
+bot.infinity_polling()
diff --git a/examples/custom_states.py b/examples/custom_states.py
new file mode 100644
index 000000000..e1bf13295
--- /dev/null
+++ b/examples/custom_states.py
@@ -0,0 +1,156 @@
+import telebot
+from telebot import custom_filters, types
+from telebot.states import State, StatesGroup
+from telebot.states.sync.context import StateContext
+from telebot.storage import StateMemoryStorage
+from telebot.types import ReplyParameters
+
+# Initialize the bot
+state_storage = StateMemoryStorage() # don't use this in production; switch to redis
+bot = telebot.TeleBot("TOKEN", state_storage=state_storage, use_class_middlewares=True)
+
+
+# Define states
+class MyStates(StatesGroup):
+ name = State()
+ age = State()
+ color = State()
+ hobby = State()
+
+
+# Start command handler
+@bot.message_handler(commands=["start"])
+def start_ex(message: types.Message, state: StateContext):
+ state.set(MyStates.name)
+ bot.send_message(
+ message.chat.id,
+ "Hello! What is your first name?",
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+
+
+# Cancel command handler
+@bot.message_handler(state="*", commands=["cancel"])
+def any_state(message: types.Message, state: StateContext):
+ state.delete()
+ bot.send_message(
+ message.chat.id,
+ "Your information has been cleared. Type /start to begin again.",
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+
+
+# Handler for name input
+@bot.message_handler(state=MyStates.name)
+def name_get(message: types.Message, state: StateContext):
+ state.set(MyStates.age)
+ bot.send_message(
+ message.chat.id, "How old are you?",
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+ state.add_data(name=message.text)
+
+
+# Handler for age input
+@bot.message_handler(state=MyStates.age, is_digit=True)
+def ask_color(message: types.Message, state: StateContext):
+ state.set(MyStates.color)
+ state.add_data(age=message.text)
+
+ # Define reply keyboard for color selection
+ keyboard = types.ReplyKeyboardMarkup(row_width=2)
+ colors = ["Red", "Green", "Blue", "Yellow", "Purple", "Orange", "Other"]
+ buttons = [types.KeyboardButton(color) for color in colors]
+ keyboard.add(*buttons)
+
+ bot.send_message(
+ message.chat.id,
+ "What is your favorite color? Choose from the options below.",
+ reply_markup=keyboard,
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+
+
+# Handler for color input
+@bot.message_handler(state=MyStates.color)
+def ask_hobby(message: types.Message, state: StateContext):
+ state.set(MyStates.hobby)
+ state.add_data(color=message.text)
+
+ # Define reply keyboard for hobby selection
+ keyboard = types.ReplyKeyboardMarkup(row_width=2)
+ hobbies = ["Reading", "Traveling", "Gaming", "Cooking"]
+ buttons = [types.KeyboardButton(hobby) for hobby in hobbies]
+ keyboard.add(*buttons)
+
+ bot.send_message(
+ message.chat.id,
+ "What is one of your hobbies? Choose from the options below.",
+ reply_markup=keyboard,
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+
+
+# Handler for hobby input
+@bot.message_handler(
+ state=MyStates.hobby, text=["Reading", "Traveling", "Gaming", "Cooking"]
+)
+def finish(message: types.Message, state: StateContext):
+ with state.data() as data:
+ name = data.get("name")
+ age = data.get("age")
+ color = data.get("color")
+ hobby = message.text # Get the hobby from the message text
+
+ # Provide a fun fact based on color
+ color_facts = {
+ "Red": "Red is often associated with excitement and passion.",
+ "Green": "Green is the color of nature and tranquility.",
+ "Blue": "Blue is known for its calming and serene effects.",
+ "Yellow": "Yellow is a cheerful color often associated with happiness.",
+ "Purple": "Purple signifies royalty and luxury.",
+ "Orange": "Orange is a vibrant color that stimulates enthusiasm.",
+ "Other": "Colors have various meanings depending on context.",
+ }
+ color_fact = color_facts.get(
+ color, "Colors have diverse meanings, and yours is unique!"
+ )
+
+ msg = (
+ f"Thank you for sharing! Here is a summary of your information:\n"
+ f"First Name: {name}\n"
+ f"Age: {age}\n"
+ f"Favorite Color: {color}\n"
+ f"Fun Fact about your color: {color_fact}\n"
+ f"Favorite Hobby: {hobby}"
+ )
+
+ bot.send_message(
+ message.chat.id, msg, parse_mode="html",
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+ state.delete()
+
+
+# Handler for incorrect age input
+@bot.message_handler(state=MyStates.age, is_digit=False)
+def age_incorrect(message: types.Message):
+ bot.send_message(
+ message.chat.id,
+ "Please enter a valid number for age.",
+ reply_parameters=ReplyParameters(message_id=message.message_id),
+ )
+
+
+# Add custom filters
+bot.add_custom_filter(custom_filters.StateFilter(bot))
+bot.add_custom_filter(custom_filters.IsDigitFilter())
+bot.add_custom_filter(custom_filters.TextMatchFilter())
+
+# necessary for state parameter in handlers.
+from telebot.states.sync.middleware import StateMiddleware
+
+bot.setup_middleware(StateMiddleware(bot))
+
+# Start polling
+bot.infinity_polling()
diff --git a/examples/deep_linking.py b/examples/deep_linking.py
index f5ea506c2..039e3a76a 100644
--- a/examples/deep_linking.py
+++ b/examples/deep_linking.py
@@ -74,4 +74,4 @@ def send_welcome(message):
bot.reply_to(message, reply)
-bot.polling()
+bot.infinity_polling()
diff --git a/examples/detailed_example/detailed_example.py b/examples/detailed_example/detailed_example.py
index f481832a0..76359cfb9 100644
--- a/examples/detailed_example/detailed_example.py
+++ b/examples/detailed_example/detailed_example.py
@@ -20,7 +20,7 @@
}
imageSelect = types.ReplyKeyboardMarkup(one_time_keyboard=True) # create the image selection keyboard
-imageSelect.add('cock', 'pussy')
+imageSelect.add('Mickey', 'Minnie')
hideBoard = types.ReplyKeyboardRemove() # if sent as reply_markup, will hide the keyboard
@@ -105,15 +105,15 @@ def msg_image_select(m):
# for some reason the 'upload_photo' status isn't quite working (doesn't show at all)
bot.send_chat_action(cid, 'typing')
- if text == "cock": # send the appropriate image based on the reply to the "/getImage" command
+ if text == 'Mickey': # send the appropriate image based on the reply to the "/getImage" command
bot.send_photo(cid, open('rooster.jpg', 'rb'),
reply_markup=hideBoard) # send file and hide keyboard, after image is sent
userStep[cid] = 0 # reset the users step back to 0
- elif text == "pussy":
+ elif text == 'Minnie':
bot.send_photo(cid, open('kitten.jpg', 'rb'), reply_markup=hideBoard)
userStep[cid] = 0
else:
- bot.send_message(cid, "Don't type bullsh*t, if I give you a predefined keyboard!")
+ bot.send_message(cid, "Please, use the predefined keyboard!")
bot.send_message(cid, "Please try again")
@@ -130,4 +130,4 @@ def command_default(m):
bot.send_message(m.chat.id, "I don't understand \"" + m.text + "\"\nMaybe try the help page at /help")
-bot.polling()
+bot.infinity_polling()
diff --git a/examples/detect_changes.py b/examples/detect_changes.py
new file mode 100644
index 000000000..58eeb8f2d
--- /dev/null
+++ b/examples/detect_changes.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+# This is a simple echo bot using the decorator mechanism.
+# It echoes any incoming text messages.
+
+import telebot
+
+API_TOKEN = ''
+
+bot = telebot.TeleBot(API_TOKEN)
+
+
+# Handle '/start' and '/help'
+@bot.message_handler(commands=['help', 'start'])
+def send_welcome(message):
+ bot.reply_to(message, """\
+Hi there, I am EchoBot.
+I am here to echo your kind words back to you. Just say anything nice and I'll say the exact same thing to you!\
+""")
+
+
+# Handle all other messages with content_type 'text' (content_types defaults to ['text'])
+@bot.message_handler(func=lambda message: True)
+def echo_message(message):
+ bot.reply_to(message, message.text)
+
+# only for versions 4.7.0+
+bot.infinity_polling(restart_on_change=True)
diff --git a/examples/echo_bot.py b/examples/echo_bot.py
index b66eb3442..c55a0045b 100644
--- a/examples/echo_bot.py
+++ b/examples/echo_bot.py
@@ -25,4 +25,4 @@ def echo_message(message):
bot.reply_to(message, message.text)
-bot.polling()
+bot.infinity_polling()
diff --git a/examples/formatting_example.py b/examples/formatting_example.py
new file mode 100644
index 000000000..ae92252bf
--- /dev/null
+++ b/examples/formatting_example.py
@@ -0,0 +1,53 @@
+from telebot import TeleBot
+from telebot import formatting
+
+bot = TeleBot('TOKEN')
+
+
+@bot.message_handler(commands=['start'])
+def start_message(message):
+ bot.send_message(
+ message.chat.id,
+ # function which connects all strings
+ formatting.format_text(
+ formatting.mbold(message.from_user.first_name),
+ formatting.mitalic(message.from_user.first_name),
+ formatting.munderline(message.from_user.first_name),
+ formatting.mstrikethrough(message.from_user.first_name),
+ formatting.mcode(message.from_user.first_name),
+ separator=" " # separator separates all strings
+ ),
+ parse_mode='MarkdownV2'
+ )
+
+ # just a bold text using markdownv2
+ bot.send_message(
+ message.chat.id,
+ formatting.mbold(message.from_user.first_name),
+ parse_mode='MarkdownV2'
+ )
+
+ # html
+ bot.send_message(
+ message.chat.id,
+ formatting.format_text(
+ formatting.hbold(message.from_user.first_name),
+ formatting.hitalic(message.from_user.first_name),
+ formatting.hunderline(message.from_user.first_name),
+ formatting.hstrikethrough(message.from_user.first_name),
+ formatting.hcode(message.from_user.first_name),
+ # hide_link is only for html
+ formatting.hide_link('https://telegra.ph/file/c158e3a6e2a26a160b253.jpg'),
+ separator=" "
+ ),
+ parse_mode='HTML'
+ )
+
+ # just a bold text in html
+ bot.send_message(
+ message.chat.id,
+ formatting.hbold(message.from_user.first_name),
+ parse_mode='HTML'
+ )
+
+bot.infinity_polling()
\ No newline at end of file
diff --git a/examples/inline_example.py b/examples/inline_example.py
index e36932dd6..be927c82a 100644
--- a/examples/inline_example.py
+++ b/examples/inline_example.py
@@ -42,7 +42,7 @@ def query_video(inline_query):
try:
r = types.InlineQueryResultVideo('1',
'https://github.com/eternnoir/pyTelegramBotAPI/blob/master/tests/test_data/test_video.mp4?raw=true',
- 'video/mp4', 'Video',
+ 'video/mp4',
'https://raw.githubusercontent.com/eternnoir/pyTelegramBotAPI/master/examples/detailed_example/rooster.jpg',
'Title'
)
@@ -51,7 +51,7 @@ def query_video(inline_query):
print(e)
-@bot.inline_handler(lambda query: len(query.query) is 0)
+@bot.inline_handler(lambda query: len(query.query) == 0)
def default_query(inline_query):
try:
r = types.InlineQueryResultArticle('1', 'default', types.InputTextMessageContent('default'))
@@ -61,7 +61,7 @@ def default_query(inline_query):
def main_loop():
- bot.polling(True)
+ bot.infinity_polling()
while 1:
time.sleep(3)
diff --git a/examples/inline_keyboard_example.py b/examples/inline_keyboard_example.py
index 0618eee2c..41f088adc 100644
--- a/examples/inline_keyboard_example.py
+++ b/examples/inline_keyboard_example.py
@@ -9,8 +9,8 @@
def gen_markup():
markup = InlineKeyboardMarkup()
markup.row_width = 2
- markup.add(InlineKeyboardButton("Yes", callback_data=f"cb_yes"),
- InlineKeyboardButton("No", callback_data=f"cb_no"))
+ markup.add(InlineKeyboardButton("Yes", callback_data="cb_yes"),
+ InlineKeyboardButton("No", callback_data="cb_no"))
return markup
@bot.callback_query_handler(func=lambda call: True)
@@ -24,4 +24,4 @@ def callback_query(call):
def message_handler(message):
bot.send_message(message.chat.id, "Yes/no?", reply_markup=gen_markup())
-bot.polling(none_stop=True)
+bot.infinity_polling()
diff --git a/examples/message_reaction_example.py b/examples/message_reaction_example.py
new file mode 100644
index 000000000..65178d25a
--- /dev/null
+++ b/examples/message_reaction_example.py
@@ -0,0 +1,33 @@
+#!/usr/bin/python3
+
+# This is a simple bot using message reactions (emoji)
+# https://core.telegram.org/bots/api#reactiontype
+# https://core.telegram.org/bots/api#update
+# allowed_updates: Specify an empty list to receive all update types except, chat_member, message_reaction, and message_reaction_count.
+# If you want to receive message_reaction events, you cannot simply leave the allowed_updates=None default value.
+# The default list of events does not include chat_member, message_reaction, and message_reaction_count events.
+# You must explicitly specify all the events you wish to receive and add message_reaction to this list.
+# It’s also important to note that after using allowed_updates=[...], in the future, using allowed_updates=None will mean
+# that the list of events you will receive will consist of the events you last explicitly specified.
+
+import random
+import telebot
+from telebot.types import ReactionTypeEmoji
+
+API_TOKEN = ''
+bot = telebot.TeleBot(API_TOKEN)
+
+
+# Send a reactions to all messages with content_type 'text' (content_types defaults to ['text'])
+@bot.message_handler(func=lambda message: True)
+def send_reaction(message):
+ emo = ["\U0001F525", "\U0001F917", "\U0001F60E"] # or use ["🔥", "🤗", "😎"]
+ bot.set_message_reaction(message.chat.id, message.id, [ReactionTypeEmoji(random.choice(emo))], is_big=False)
+
+
+@bot.message_reaction_handler(func=lambda message: True)
+def get_reactions(message):
+ bot.reply_to(message, f"You changed the reaction from {[r.emoji for r in message.old_reaction]} to {[r.emoji for r in message.new_reaction]}")
+
+
+bot.infinity_polling(allowed_updates=['message', 'message_reaction'])
diff --git a/examples/middleware/README.md b/examples/middleware/README.md
new file mode 100644
index 000000000..23ef1bf8e
--- /dev/null
+++ b/examples/middleware/README.md
@@ -0,0 +1,35 @@
+# Middlewares
+
+## Type of middlewares in pyTelegramBotAPI
+Currently, synchronous version of pyTelegramBotAPI has two types of middlewares:
+
+- Class-based middlewares
+- Function-based middlewares
+
+## Purpose of middlewares
+Middlewares are designed to get update before handler's execution.
+
+## Class-based middlewares
+This type of middleware has more functionality compared to function-based one.
+
+Class based middleware should be instance of `telebot.handler_backends.BaseMiddleware.`
+
+Each middleware should have 2 main functions:
+
+`pre_process` -> is a method of class which receives update, and data.
+
+Data - is a dictionary, which could be passed right to handler, and `post_process` function.
+
+`post_process` -> is a function of class which receives update, data, and exception, that happened in handler. If handler was executed correctly - then exception will equal to None.
+
+## Function-based middlewares
+To use function-based middleware, you should set `apihelper.ENABLE_MIDDLEWARE = True`.
+This type of middleware is created by using a decorator for middleware.
+With this type middleware, you can retrieve update immediately after update came. You should set update_types as well.
+
+## Why class-based middlewares are better?
+- You can pass data between post, pre_process functions, and handler.
+- If there is an exception in handler, you will get exception parameter with exception class in post_process.
+- Has post_process -> method which works after the handler's execution.
+
+## Take a look at examples for more.
diff --git a/examples/middleware/class_based/antiflood_middleware.py b/examples/middleware/class_based/antiflood_middleware.py
new file mode 100644
index 000000000..3743f097d
--- /dev/null
+++ b/examples/middleware/class_based/antiflood_middleware.py
@@ -0,0 +1,39 @@
+# Just a little example of middleware handlers
+
+from telebot.handler_backends import BaseMiddleware
+from telebot import TeleBot
+from telebot.handler_backends import CancelUpdate
+bot = TeleBot('TOKEN',
+ use_class_middlewares=True) # if you don't set it to true, middlewares won't work
+
+
+class SimpleMiddleware(BaseMiddleware):
+ def __init__(self, limit) -> None:
+ self.last_time = {}
+ self.limit = limit
+ self.update_types = ['message']
+ # Always specify update types, otherwise middlewares won't work
+
+
+ def pre_process(self, message, data):
+ if not message.from_user.id in self.last_time:
+ # User is not in a dict, so lets add and cancel this function
+ self.last_time[message.from_user.id] = message.date
+ return
+ if message.date - self.last_time[message.from_user.id] < self.limit:
+ # User is flooding
+ bot.send_message(message.chat.id, 'You are making request too often')
+ return CancelUpdate()
+ self.last_time[message.from_user.id] = message.date
+
+
+ def post_process(self, message, data, exception):
+ pass
+
+bot.setup_middleware(SimpleMiddleware(2))
+
+@bot.message_handler(commands=['start'])
+def start(message): # you don't have to put data in handler.
+ bot.send_message(message.chat.id, 'Hello!')
+
+bot.infinity_polling()
diff --git a/examples/middleware/class_based/basic_example.py b/examples/middleware/class_based/basic_example.py
new file mode 100644
index 000000000..353bebdc9
--- /dev/null
+++ b/examples/middleware/class_based/basic_example.py
@@ -0,0 +1,32 @@
+from telebot import TeleBot
+from telebot.handler_backends import BaseMiddleware
+
+bot = TeleBot('TOKEN', use_class_middlewares=True) # set use_class_middlewares to True!
+# otherwise, class-based middlewares won't execute.
+
+# You can use this classes for cancelling update or skipping handler:
+# from telebot.handler_backends import CancelUpdate, SkipHandler
+
+class Middleware(BaseMiddleware):
+ def __init__(self):
+ self.update_types = ['message']
+ def pre_process(self, message, data):
+ data['foo'] = 'Hello' # just for example
+ # we edited the data. now, this data is passed to handler.
+ # return SkipHandler() -> this will skip handler
+ # return CancelUpdate() -> this will cancel update
+ def post_process(self, message, data, exception=None):
+ print(data['foo'])
+ if exception: # check for exception
+ print(exception)
+
+@bot.message_handler(commands=['start'])
+def start(message, data: dict): # you don't have to put data parameter in handler if you don't need it.
+ bot.send_message(message.chat.id, data['foo'])
+ data['foo'] = 'Processed' # we changed value of data.. this data is now passed to post_process.
+
+
+# Setup middleware
+bot.setup_middleware(Middleware())
+
+bot.infinity_polling()
diff --git a/examples/middleware/class_based/i18n_middleware/i18n_base_middleware.py b/examples/middleware/class_based/i18n_middleware/i18n_base_middleware.py
new file mode 100644
index 000000000..43d7b65f8
--- /dev/null
+++ b/examples/middleware/class_based/i18n_middleware/i18n_base_middleware.py
@@ -0,0 +1,121 @@
+import gettext
+import os
+import threading
+
+from telebot.handler_backends import BaseMiddleware
+
+try:
+ from babel.support import LazyProxy
+
+ babel_imported = True
+except ImportError:
+ babel_imported = False
+
+
+class I18N(BaseMiddleware):
+ """
+ This middleware provides high-level tool for internationalization
+ It is based on gettext util.
+ """
+
+ context_lang = threading.local()
+
+ def __init__(self, translations_path, domain_name: str):
+ super().__init__()
+ self.update_types = self.process_update_types()
+
+ self.path = translations_path
+ self.domain = domain_name
+ self.translations = self.find_translations()
+
+ @property
+ def available_translations(self):
+ return list(self.translations)
+
+ def gettext(self, text: str, lang: str = None):
+ """
+ Singular translations
+ """
+
+ if lang is None:
+ lang = self.context_lang.language
+
+ if lang not in self.translations:
+ return text
+
+ translator = self.translations[lang]
+ return translator.gettext(text)
+
+ def ngettext(self, singular: str, plural: str, lang: str = None, n=1):
+ """
+ Plural translations
+ """
+ if lang is None:
+ lang = self.context_lang.language
+
+ if lang not in self.translations:
+ if n == 1:
+ return singular
+ return plural
+
+ translator = self.translations[lang]
+ return translator.ngettext(singular, plural, n)
+
+ def lazy_gettext(self, text: str, lang: str = None):
+ if not babel_imported:
+ raise RuntimeError('babel module is not imported. Check that you installed it.')
+ return LazyProxy(self.gettext, text, lang, enable_cache=False)
+
+ def lazy_ngettext(self, singular: str, plural: str, lang: str = None, n=1):
+ if not babel_imported:
+ raise RuntimeError('babel module is not imported. Check that you installed it.')
+ return LazyProxy(self.ngettext, singular, plural, lang, n, enable_cache=False)
+
+ def get_user_language(self, obj):
+ """
+ You need to override this method and return user language
+ """
+ raise NotImplementedError
+
+ def process_update_types(self) -> list:
+ """
+ You need to override this method and return any update types which you want to be processed
+ """
+ raise NotImplementedError
+
+ def pre_process(self, message, data):
+ """
+ context language variable will be set each time when update from 'process_update_types' comes
+ value is the result of 'get_user_language' method
+ """
+
+ self.context_lang.language = self.get_user_language(obj=message)
+
+ def post_process(self, message, data, exception):
+ pass
+
+ def find_translations(self):
+ """
+ Looks for translations with passed 'domain' in passed 'path'
+ """
+ if not os.path.exists(self.path):
+ raise RuntimeError(f"Translations directory by path: {self.path!r} was not found")
+
+ result = {}
+
+ for name in os.listdir(self.path):
+ translations_path = os.path.join(self.path, name, 'LC_MESSAGES')
+
+ if not os.path.isdir(translations_path):
+ continue
+
+ po_file = os.path.join(translations_path, self.domain + '.po')
+ mo_file = po_file[:-2] + 'mo'
+
+ if os.path.isfile(po_file) and not os.path.isfile(mo_file):
+ raise FileNotFoundError(f"Translations for: {name!r} were not compiled!")
+
+ with open(mo_file, 'rb') as file:
+ result[name] = gettext.GNUTranslations(file)
+
+ return result
diff --git a/examples/middleware/class_based/i18n_middleware/keyboards.py b/examples/middleware/class_based/i18n_middleware/keyboards.py
new file mode 100644
index 000000000..14d0473d0
--- /dev/null
+++ b/examples/middleware/class_based/i18n_middleware/keyboards.py
@@ -0,0 +1,34 @@
+from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton, ReplyKeyboardMarkup, KeyboardButton
+
+
+def languages_keyboard():
+ return InlineKeyboardMarkup(
+ keyboard=[
+ [
+ InlineKeyboardButton(text="English", callback_data='en'),
+ InlineKeyboardButton(text="Русский", callback_data='ru'),
+ InlineKeyboardButton(text="O'zbekcha", callback_data='uz_Latn')
+ ]
+ ]
+ )
+
+
+def clicker_keyboard(_):
+ return InlineKeyboardMarkup(
+ keyboard=[
+ [
+ InlineKeyboardButton(text=_("click"), callback_data='click'),
+ ]
+ ]
+ )
+
+
+def menu_keyboard(_):
+ keyboard = ReplyKeyboardMarkup(resize_keyboard=True)
+ keyboard.add(
+ KeyboardButton(text=_("My user id")),
+ KeyboardButton(text=_("My user name")),
+ KeyboardButton(text=_("My first name"))
+ )
+
+ return keyboard
diff --git a/examples/middleware/class_based/i18n_middleware/locales/en/LC_MESSAGES/messages.po b/examples/middleware/class_based/i18n_middleware/locales/en/LC_MESSAGES/messages.po
new file mode 100644
index 000000000..2cf8eef5d
--- /dev/null
+++ b/examples/middleware/class_based/i18n_middleware/locales/en/LC_MESSAGES/messages.po
@@ -0,0 +1,81 @@
+# English translations for PROJECT.
+# Copyright (C) 2022 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2022-02-19 18:37+0500\n"
+"PO-Revision-Date: 2022-02-18 16:22+0500\n"
+"Last-Translator: FULL NAME \n"
+"Language: en\n"
+"Language-Team: en \n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: keyboards.py:20
+msgid "click"
+msgstr ""
+
+#: keyboards.py:29
+msgid "My user id"
+msgstr ""
+
+#: keyboards.py:30
+msgid "My user name"
+msgstr ""
+
+#: keyboards.py:31
+msgid "My first name"
+msgstr ""
+
+#: main.py:97
+msgid ""
+"Hello, {user_fist_name}!\n"
+"This is the example of multilanguage bot.\n"
+"Available commands:\n"
+"\n"
+"/lang - change your language\n"
+"/plural - pluralization example\n"
+"/menu - text menu example"
+msgstr ""
+
+#: main.py:121
+msgid "Language has been changed"
+msgstr ""
+
+#: main.py:130 main.py:150
+#, fuzzy
+msgid "You have {number} click"
+msgid_plural "You have {number} clicks"
+msgstr[0] ""
+msgstr[1] ""
+
+#: main.py:135 main.py:155
+msgid ""
+"This is clicker.\n"
+"\n"
+msgstr ""
+
+#: main.py:163
+msgid "This is ReplyKeyboardMarkup menu example in multilanguage bot."
+msgstr ""
+
+#: main.py:203
+msgid "Seems you confused language"
+msgstr ""
+
+#~ msgid ""
+#~ "Hello, {user_fist_name}!\n"
+#~ "This is the example of multilanguage bot.\n"
+#~ "Available commands:\n"
+#~ "\n"
+#~ "/lang - change your language\n"
+#~ "/plural - pluralization example"
+#~ msgstr ""
+
diff --git a/examples/middleware/class_based/i18n_middleware/locales/ru/LC_MESSAGES/messages.po b/examples/middleware/class_based/i18n_middleware/locales/ru/LC_MESSAGES/messages.po
new file mode 100644
index 000000000..6d330b059
--- /dev/null
+++ b/examples/middleware/class_based/i18n_middleware/locales/ru/LC_MESSAGES/messages.po
@@ -0,0 +1,82 @@
+# Russian translations for PROJECT.
+# Copyright (C) 2022 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2022-02-19 18:37+0500\n"
+"PO-Revision-Date: 2022-02-18 16:22+0500\n"
+"Last-Translator: FULL NAME \n"
+"Language: ru\n"
+"Language-Team: ru \n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
+"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: keyboards.py:20
+msgid "click"
+msgstr "Клик"
+
+#: keyboards.py:29
+msgid "My user id"
+msgstr "Мой user id"
+
+#: keyboards.py:30
+msgid "My user name"
+msgstr "Мой user name"
+
+#: keyboards.py:31
+msgid "My first name"
+msgstr "Мой first name"
+
+#: main.py:97
+msgid ""
+"Hello, {user_fist_name}!\n"
+"This is the example of multilanguage bot.\n"
+"Available commands:\n"
+"\n"
+"/lang - change your language\n"
+"/plural - pluralization example\n"
+"/menu - text menu example"
+msgstr ""
+"Привет, {user_fist_name}!\n"
+"Это пример мультиязычного бота.\n"
+"Доступные команды:\n"
+"\n"
+"/lang - изменить язык\n"
+"/plural - пример плюрализации\n"
+"/menu - Пример текстового меню"
+
+#: main.py:121
+msgid "Language has been changed"
+msgstr "Язык был сменён"
+
+#: main.py:130 main.py:150
+msgid "You have {number} click"
+msgid_plural "You have {number} clicks"
+msgstr[0] "У вас {number} клик"
+msgstr[1] "У вас {number} клика"
+msgstr[2] "У вас {number} кликов"
+
+#: main.py:135 main.py:155
+msgid ""
+"This is clicker.\n"
+"\n"
+msgstr ""
+"Это кликер.\n"
+"\n"
+
+#: main.py:163
+msgid "This is ReplyKeyboardMarkup menu example in multilanguage bot."
+msgstr "Это пример ReplyKeyboardMarkup меню в мультиязычном боте."
+
+#: main.py:203
+msgid "Seems you confused language"
+msgstr "Кажется, вы перепутали язык"
+
diff --git a/examples/middleware/class_based/i18n_middleware/locales/uz_Latn/LC_MESSAGES/messages.po b/examples/middleware/class_based/i18n_middleware/locales/uz_Latn/LC_MESSAGES/messages.po
new file mode 100644
index 000000000..c5bd0004e
--- /dev/null
+++ b/examples/middleware/class_based/i18n_middleware/locales/uz_Latn/LC_MESSAGES/messages.po
@@ -0,0 +1,80 @@
+# Uzbek (Latin) translations for PROJECT.
+# Copyright (C) 2022 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2022-02-19 18:37+0500\n"
+"PO-Revision-Date: 2022-02-18 16:22+0500\n"
+"Last-Translator: FULL NAME \n"
+"Language: uz_Latn\n"
+"Language-Team: uz_Latn \n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: keyboards.py:20
+msgid "click"
+msgstr "clik"
+
+#: keyboards.py:29
+msgid "My user id"
+msgstr "Mani user id"
+
+#: keyboards.py:30
+msgid "My user name"
+msgstr "Mani user name"
+
+#: keyboards.py:31
+msgid "My first name"
+msgstr "Mani first name"
+
+#: main.py:97
+msgid ""
+"Hello, {user_fist_name}!\n"
+"This is the example of multilanguage bot.\n"
+"Available commands:\n"
+"\n"
+"/lang - change your language\n"
+"/plural - pluralization example\n"
+"/menu - text menu example"
+msgstr ""
+"Salom, {user_fist_name}!\n"
+"Bu multilanguage bot misoli.\n"
+"Mavjud buyruqlar:\n"
+"\n"
+"/lang - tilni ozgartirish\n"
+"/plural - pluralizatsiya misoli\n"
+"/menu - text menu misoli"
+
+#: main.py:121
+msgid "Language has been changed"
+msgstr "Til ozgartirildi"
+
+#: main.py:130 main.py:150
+msgid "You have {number} click"
+msgid_plural "You have {number} clicks"
+msgstr[0] "Sizda {number}ta clik"
+msgstr[1] "Sizda {number}ta clik"
+
+#: main.py:135 main.py:155
+msgid ""
+"This is clicker.\n"
+"\n"
+msgstr ""
+"Bu clicker.\n"
+"\n"
+
+#: main.py:163
+msgid "This is ReplyKeyboardMarkup menu example in multilanguage bot."
+msgstr "Bu multilanguage bot da replykeyboardmarkup menyu misoli."
+
+#: main.py:203
+msgid "Seems you confused language"
+msgstr "Tilni adashtirdiz"
+
diff --git a/examples/middleware/class_based/i18n_middleware/main.py b/examples/middleware/class_based/i18n_middleware/main.py
new file mode 100644
index 000000000..161f1a55f
--- /dev/null
+++ b/examples/middleware/class_based/i18n_middleware/main.py
@@ -0,0 +1,211 @@
+"""
+In this example you will learn how to adapt your bot to different languages
+Using built-in middleware I18N.
+
+You need to install babel package 'https://pypi.org/project/Babel/'
+Babel provides a command-line interface for working with message catalogs
+After installing babel package you have a script called 'pybabel'
+Too see all the commands open terminal and type 'pybabel --help'
+Full description for pybabel commands can be found here: 'https://babel.pocoo.org/en/latest/cmdline.html'
+
+Create a directory 'locales' where our translations will be stored
+
+First we need to extract texts:
+ pybabel extract -o locales/{domain_name}.pot --input-dirs .
+{domain_name}.pot - is the file where all translations are saved
+The name of this file should be the same as domain which you pass to I18N class
+In this example domain_name will be 'messages'
+
+For gettext (singular texts) we use '_' alias and it works perfect
+You may also you some alias for ngettext (plural texts) but you can face with a problem that
+your plural texts are not being extracted
+That is because by default 'pybabel extract' recognizes the following keywords:
+ _, gettext, ngettext, ugettext, ungettext, dgettext, dngettext, N_
+To add your own keyword you can use '-k' flag
+In this example for 'ngettext' i will assign double underscore alias '__'
+
+Full command with pluralization support will look so:
+ pybabel extract -o locales/{domain_name}.pot -k __:1,2 --input-dirs .
+
+Then create directories with translations (get list of all locales: 'pybabel --list-locales'):
+ pybabel init -i locales/{domain_name}.pot -d locales -l en
+ pybabel init -i locales/{domain_name}.pot -d locales -l ru
+ pybabel init -i locales/{domain_name}.pot -d locales -l uz_Latn
+
+Now you can translate the texts located in locales/{language}/LC_MESSAGES/{domain_name}.po
+After you translated all the texts you need to compile .po files:
+ pybabel compile -d locales
+
+When you delete/update your texts you also need to update them in .po files:
+ pybabel extract -o locales/{domain_name}.pot -k __:1,2 --input-dirs .
+ pybabel update -i locales/{domain_name}.pot -d locales
+ - translate
+ pybabel compile -d locales
+
+If you have any exceptions check:
+ - you have installed babel
+ - translations are ready, so you just compiled it
+ - in the commands above you replaced {domain_name} to messages
+ - you are writing commands from correct path in terminal
+"""
+
+import asyncio
+from typing import Union
+
+import keyboards
+from i18n_base_middleware import I18N
+from telebot import TeleBot
+from telebot import types, StateMemoryStorage
+from telebot.custom_filters import TextMatchFilter, TextFilter
+
+class I18NMiddleware(I18N):
+
+ def process_update_types(self) -> list:
+ """
+ Here you need to return a list of update types which you want to be processed
+ """
+ return ['message', 'callback_query']
+
+ def get_user_language(self, obj: Union[types.Message, types.CallbackQuery]):
+ """
+ This method is called when new update comes (only updates which you return in 'process_update_types' method)
+ Returned language will be used in 'pre_process' method of parent class
+ Returned language will be set to context language variable.
+ If you need to get translation with user's actual language you don't have to pass it manually
+ It will be automatically passed from context language value.
+ However if you need some other language you can always pass it.
+ """
+
+ user_id = obj.from_user.id
+
+ if user_id not in users_lang:
+ users_lang[user_id] = 'en'
+
+ return users_lang[user_id]
+
+
+storage = StateMemoryStorage()
+bot = TeleBot("", state_storage=storage, use_class_middlewares=True)
+
+i18n = I18NMiddleware(translations_path='locales', domain_name='messages')
+_ = i18n.gettext # for singular translations
+__ = i18n.ngettext # for plural translations
+
+# These are example storages, do not use it in a production development
+users_lang = {}
+users_clicks = {}
+
+@bot.message_handler(commands=['start'])
+def start_handler(message: types.Message):
+ text = _("Hello, {user_fist_name}!\n"
+ "This is the example of multilanguage bot.\n"
+ "Available commands:\n\n"
+ "/lang - change your language\n"
+ "/plural - pluralization example\n"
+ "/menu - text menu example")
+
+ # remember don't use f string for interpolation, use .format method instead
+ text = text.format(user_fist_name=message.from_user.first_name)
+ bot.send_message(message.from_user.id, text)
+
+
+@bot.message_handler(commands=['lang'])
+def change_language_handler(message: types.Message):
+ bot.send_message(message.chat.id, "Choose language\nВыберите язык\nTilni tanlang",
+ reply_markup=keyboards.languages_keyboard())
+
+
+@bot.callback_query_handler(func=None, text=TextFilter(contains=['en', 'ru', 'uz_Latn']))
+def language_handler(call: types.CallbackQuery):
+ lang = call.data
+ users_lang[call.from_user.id] = lang
+
+ # When you changed user language, you have to pass it manually beacause it is not changed in context
+ bot.edit_message_text(_("Language has been changed", lang=lang), call.from_user.id, call.message.id)
+
+
+@bot.message_handler(commands=['plural'])
+def pluralization_handler(message: types.Message):
+ if not users_clicks.get(message.from_user.id):
+ users_clicks[message.from_user.id] = 0
+ clicks = users_clicks[message.from_user.id]
+
+ text = __(
+ singular="You have {number} click",
+ plural="You have {number} clicks",
+ n=clicks
+ )
+ text = _("This is clicker.\n\n") + text.format(number=clicks)
+
+ bot.send_message(message.chat.id, text, reply_markup=keyboards.clicker_keyboard(_))
+
+
+@bot.callback_query_handler(func=None, text=TextFilter(equals='click'))
+def click_handler(call: types.CallbackQuery):
+ if not users_clicks.get(call.from_user.id):
+ users_clicks[call.from_user.id] = 1
+ else:
+ users_clicks[call.from_user.id] += 1
+
+ clicks = users_clicks[call.from_user.id]
+
+ text = __(
+ singular="You have {number} click",
+ plural="You have {number} clicks",
+ n=clicks
+ )
+ text = _("This is clicker.\n\n") + text.format(number=clicks)
+
+ bot.edit_message_text(text, call.from_user.id, call.message.message_id,
+ reply_markup=keyboards.clicker_keyboard(_))
+
+
+@bot.message_handler(commands=['menu'])
+def menu_handler(message: types.Message):
+ text = _("This is ReplyKeyboardMarkup menu example in multilanguage bot.")
+ bot.send_message(message.chat.id, text, reply_markup=keyboards.menu_keyboard(_))
+
+
+# For lazy tranlations
+# lazy gettext is used when you don't know user's locale
+# It can be used for example to handle text buttons in multilanguage bot
+# The actual translation will be delayed until update comes and context language is set
+l_ = i18n.lazy_gettext
+
+
+# Handlers below will handle text according to user's language
+@bot.message_handler(text=l_("My user id"))
+def return_user_id(message: types.Message):
+ bot.send_message(message.chat.id, str(message.from_user.id))
+
+
+@bot.message_handler(text=l_("My user name"))
+def return_user_id(message: types.Message):
+ username = message.from_user.username
+ if not username:
+ username = '-'
+ bot.send_message(message.chat.id, username)
+
+
+# You can make it case-insensitive
+@bot.message_handler(text=TextFilter(equals=l_("My first name"), ignore_case=True))
+def return_user_id(message: types.Message):
+ bot.send_message(message.chat.id, message.from_user.first_name)
+
+
+all_menu_texts = []
+for language in i18n.available_translations:
+ for menu_text in ("My user id", "My user name", "My first name"):
+ all_menu_texts.append(_(menu_text, language))
+
+
+# When user confused language. (handles all menu buttons texts)
+@bot.message_handler(text=TextFilter(contains=all_menu_texts, ignore_case=True))
+def missed_message(message: types.Message):
+ bot.send_message(message.chat.id, _("Seems you confused language"), reply_markup=keyboards.menu_keyboard(_))
+
+
+if __name__ == '__main__':
+ bot.setup_middleware(i18n)
+ bot.add_custom_filter(TextMatchFilter())
+ asyncio.run(bot.infinity_polling())
diff --git a/examples/middleware/function_based/i18n.py b/examples/middleware/function_based/i18n.py
new file mode 100644
index 000000000..aafbdd064
--- /dev/null
+++ b/examples/middleware/function_based/i18n.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+# This example shows how to implement i18n (internationalization) l10n (localization) to create
+# multi-language bots with middleware handler.
+#
+# Note: For the sake of simplicity of this example no extra library is used. However, it is recommended to use
+# better i18n systems (gettext and etc) for handling multilingual translations.
+# This is not a working, production-ready sample and it is highly recommended not to use it in production.
+#
+# In this example let's imagine we want to introduce localization or internationalization into our project and
+# we need some global function to activate the language once and to use that language in all other message
+# handler functions for not repeatedly activating it.
+# The middleware (i18n and l10n) is explained:
+
+import telebot
+from telebot import apihelper
+
+apihelper.ENABLE_MIDDLEWARE = True
+
+TRANSLATIONS = {
+ 'hello': {
+ 'en': 'hello',
+ 'ru': 'привет',
+ 'uz': 'salom'
+ }
+}
+
+_lang = 'en'
+
+
+def activate(lang):
+ global _lang
+ _lang = lang
+
+
+def _(string):
+ return TRANSLATIONS[string][_lang]
+
+
+bot = telebot.TeleBot('TOKEN')
+
+
+@bot.middleware_handler(update_types=['message'])
+def activate_language(bot_instance, message):
+ activate(message.from_user.language_code)
+
+
+@bot.message_handler(commands=['start'])
+def start(message):
+ bot.send_message(message.chat.id, _('hello'))
+
+
+bot.infinity_polling()
diff --git a/examples/middleware/function_based/i18n_gettext/i18n_class.py b/examples/middleware/function_based/i18n_gettext/i18n_class.py
new file mode 100644
index 000000000..68b3ffd4c
--- /dev/null
+++ b/examples/middleware/function_based/i18n_gettext/i18n_class.py
@@ -0,0 +1,77 @@
+import gettext
+import os
+import threading
+
+
+class I18N:
+ """
+ This class provides high-level tool for internationalization
+ It is based on gettext util.
+ """
+
+ context_lang = threading.local()
+
+ def __init__(self, translations_path, domain_name: str):
+ self.path = translations_path
+ self.domain = domain_name
+ self.translations = self.find_translations()
+
+ @property
+ def available_translations(self):
+ return list(self.translations)
+
+ def gettext(self, text: str, lang: str = None):
+ """
+ Singular translations
+ """
+
+ if lang is None:
+ lang = self.context_lang.language
+
+ if lang not in self.translations:
+ return text
+
+ translator = self.translations[lang]
+ return translator.gettext(text)
+
+ def ngettext(self, singular: str, plural: str, lang: str = None, n=1):
+ """
+ Plural translations
+ """
+ if lang is None:
+ lang = self.context_lang.language
+
+ if lang not in self.translations:
+ if n == 1:
+ return singular
+ return plural
+
+ translator = self.translations[lang]
+ return translator.ngettext(singular, plural, n)
+
+
+ def find_translations(self):
+ """
+ Looks for translations with passed 'domain' in passed 'path'
+ """
+ if not os.path.exists(self.path):
+ raise RuntimeError(f"Translations directory by path: {self.path!r} was not found")
+
+ result = {}
+
+ for name in os.listdir(self.path):
+ translations_path = os.path.join(self.path, name, 'LC_MESSAGES')
+
+ if not os.path.isdir(translations_path):
+ continue
+
+ po_file = os.path.join(translations_path, self.domain + '.po')
+ mo_file = po_file[:-2] + 'mo'
+
+ if os.path.isfile(po_file) and not os.path.isfile(mo_file):
+ raise FileNotFoundError(f"Translations for: {name!r} were not compiled!")
+
+ with open(mo_file, 'rb') as file:
+ result[name] = gettext.GNUTranslations(file)
+
+ return result
diff --git a/examples/middleware/function_based/i18n_gettext/keyboards.py b/examples/middleware/function_based/i18n_gettext/keyboards.py
new file mode 100644
index 000000000..cdda2ae29
--- /dev/null
+++ b/examples/middleware/function_based/i18n_gettext/keyboards.py
@@ -0,0 +1,23 @@
+from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton
+
+
+def languages_keyboard():
+ return InlineKeyboardMarkup(
+ keyboard=[
+ [
+ InlineKeyboardButton(text="English", callback_data='en'),
+ InlineKeyboardButton(text="Русский", callback_data='ru'),
+ InlineKeyboardButton(text="O'zbekcha", callback_data='uz_Latn')
+ ]
+ ]
+ )
+
+
+def clicker_keyboard(_):
+ return InlineKeyboardMarkup(
+ keyboard=[
+ [
+ InlineKeyboardButton(text=_("click"), callback_data='click'),
+ ]
+ ]
+ )
diff --git a/examples/middleware/function_based/i18n_gettext/locales/en/LC_MESSAGES/messages.po b/examples/middleware/function_based/i18n_gettext/locales/en/LC_MESSAGES/messages.po
new file mode 100644
index 000000000..5931c28bf
--- /dev/null
+++ b/examples/middleware/function_based/i18n_gettext/locales/en/LC_MESSAGES/messages.po
@@ -0,0 +1,50 @@
+# English translations for PROJECT.
+# Copyright (C) 2022 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2022-02-18 17:54+0500\n"
+"PO-Revision-Date: 2022-02-18 16:22+0500\n"
+"Last-Translator: FULL NAME \n"
+"Language: en\n"
+"Language-Team: en \n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: keyboards.py:20
+msgid "click"
+msgstr ""
+
+#: main.py:78
+msgid ""
+"Hello, {user_fist_name}!\n"
+"This is the example of multilanguage bot.\n"
+"Available commands:\n"
+"\n"
+"/lang - change your language\n"
+"/plural - pluralization example"
+msgstr ""
+
+#: main.py:102
+msgid "Language has been changed"
+msgstr ""
+
+#: main.py:114
+#, fuzzy
+msgid "You have {number} click"
+msgid_plural "You have {number} clicks"
+msgstr[0] ""
+msgstr[1] ""
+
+#: main.py:120
+msgid ""
+"This is clicker.\n"
+"\n"
+msgstr ""
\ No newline at end of file
diff --git a/examples/middleware/function_based/i18n_gettext/locales/ru/LC_MESSAGES/messages.po b/examples/middleware/function_based/i18n_gettext/locales/ru/LC_MESSAGES/messages.po
new file mode 100644
index 000000000..79db9b536
--- /dev/null
+++ b/examples/middleware/function_based/i18n_gettext/locales/ru/LC_MESSAGES/messages.po
@@ -0,0 +1,59 @@
+# Russian translations for PROJECT.
+# Copyright (C) 2022 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2022-02-18 17:54+0500\n"
+"PO-Revision-Date: 2022-02-18 16:22+0500\n"
+"Last-Translator: FULL NAME \n"
+"Language: ru\n"
+"Language-Team: ru \n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
+"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: keyboards.py:20
+msgid "click"
+msgstr "Клик"
+
+#: main.py:78
+msgid ""
+"Hello, {user_fist_name}!\n"
+"This is the example of multilanguage bot.\n"
+"Available commands:\n"
+"\n"
+"/lang - change your language\n"
+"/plural - pluralization example"
+msgstr ""
+"Привет, {user_fist_name}!\n"
+"Это пример мультиязычного бота.\n"
+"Доступные команды:\n"
+"\n"
+"/lang - изменить язык\n"
+"/plural - пример плюрализации"
+
+#: main.py:102
+msgid "Language has been changed"
+msgstr "Язык был сменён"
+
+#: main.py:114
+msgid "You have {number} click"
+msgid_plural "You have {number} clicks"
+msgstr[0] "У вас {number} клик"
+msgstr[1] "У вас {number} клика"
+msgstr[2] "У вас {number} кликов"
+
+#: main.py:120
+msgid ""
+"This is clicker.\n"
+"\n"
+msgstr ""
+"Это кликер.\n"
+"\n"
\ No newline at end of file
diff --git a/examples/middleware/function_based/i18n_gettext/locales/uz_Latn/LC_MESSAGES/messages.po b/examples/middleware/function_based/i18n_gettext/locales/uz_Latn/LC_MESSAGES/messages.po
new file mode 100644
index 000000000..ce7b502e0
--- /dev/null
+++ b/examples/middleware/function_based/i18n_gettext/locales/uz_Latn/LC_MESSAGES/messages.po
@@ -0,0 +1,57 @@
+# Uzbek (Latin) translations for PROJECT.
+# Copyright (C) 2022 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2022-02-18 17:54+0500\n"
+"PO-Revision-Date: 2022-02-18 16:22+0500\n"
+"Last-Translator: FULL NAME \n"
+"Language: uz_Latn\n"
+"Language-Team: uz_Latn \n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 2.9.1\n"
+
+#: keyboards.py:20
+msgid "click"
+msgstr "clik"
+
+#: main.py:78
+msgid ""
+"Hello, {user_fist_name}!\n"
+"This is the example of multilanguage bot.\n"
+"Available commands:\n"
+"\n"
+"/lang - change your language\n"
+"/plural - pluralization example"
+msgstr ""
+"Salom, {user_fist_name}!\n"
+"Bu multilanguage bot misoli.\n"
+"Mavjud buyruqlar:\n"
+"\n"
+"/lang - tilni ozgartirish\n"
+"/plural - pluralizatsiya misoli"
+
+#: main.py:102
+msgid "Language has been changed"
+msgstr "Til ozgartirildi"
+
+#: main.py:114
+msgid "You have {number} click"
+msgid_plural "You have {number} clicks"
+msgstr[0] "Sizda {number}ta clik"
+msgstr[1] "Sizda {number}ta clik"
+
+#: main.py:120
+msgid ""
+"This is clicker.\n"
+"\n"
+msgstr ""
+"Bu clicker.\n"
+"\n"
diff --git a/examples/middleware/function_based/i18n_gettext/main.py b/examples/middleware/function_based/i18n_gettext/main.py
new file mode 100644
index 000000000..c40b00cab
--- /dev/null
+++ b/examples/middleware/function_based/i18n_gettext/main.py
@@ -0,0 +1,134 @@
+"""
+In this example you will learn how to adapt your bot to different languages
+Using built-in class I18N.
+You need to install babel package 'https://pypi.org/project/Babel/'
+Babel provides a command-line interface for working with message catalogs
+After installing babel package you have a script called 'pybabel'
+Too see all the commands open terminal and type 'pybabel --help'
+Full description for pybabel commands can be found here: 'https://babel.pocoo.org/en/latest/cmdline.html'
+Create a directory 'locales' where our translations will be stored
+First we need to extract texts:
+ pybabel extract -o locales/{domain_name}.pot --input-dirs .
+{domain_name}.pot - is the file where all translations are saved
+The name of this file should be the same as domain which you pass to I18N class
+In this example domain_name will be 'messages'
+For gettext (singular texts) we use '_' alias and it works perfect
+You may also you some alias for ngettext (plural texts) but you can face with a problem that
+your plural texts are not being extracted
+That is because by default 'pybabel extract' recognizes the following keywords:
+ _, gettext, ngettext, ugettext, ungettext, dgettext, dngettext, N_
+To add your own keyword you can use '-k' flag
+In this example for 'ngettext' i will assign double underscore alias '__'
+Full command with pluralization support will look so:
+ pybabel extract -o locales/{domain_name}.pot -k __:1,2 --input-dirs .
+Then create directories with translations (get list of all locales: 'pybabel --list-locales'):
+ pybabel init -i locales/{domain_name}.pot -d locales -l en
+ pybabel init -i locales/{domain_name}.pot -d locales -l ru
+ pybabel init -i locales/{domain_name}.pot -d locales -l uz_Latn
+Now you can translate the texts located in locales/{language}/LC_MESSAGES/{domain_name}.po
+After you translated all the texts you need to compile .po files:
+ pybabel compile -d locales
+When you delete/update your texts you also need to update them in .po files:
+ pybabel extract -o locales/{domain_name}.pot -k __:1,2 --input-dirs .
+ pybabel update -i locales/{domain_name}.pot -d locales
+ - translate
+ pybabel compile -d locales
+If you have any exceptions check:
+ - you have installed babel
+ - translations are ready, so you just compiled it
+ - in the commands above you replaced {domain_name} to messages
+ - you are writing commands from correct path in terminal
+"""
+
+from telebot import TeleBot, types, custom_filters
+from telebot import apihelper
+from telebot.storage.memory_storage import StateMemoryStorage
+
+import keyboards
+from i18n_class import I18N
+
+apihelper.ENABLE_MIDDLEWARE = True
+storage = StateMemoryStorage()
+# IMPORTANT! This example works only if polling is non-threaded.
+bot = TeleBot("", state_storage=storage, threaded=False)
+
+i18n = I18N(translations_path='locales', domain_name='messages')
+_ = i18n.gettext # for singular translations
+__ = i18n.ngettext # for plural translations
+
+# These are example storages, do not use it in a production development
+users_lang = {}
+users_clicks = {}
+
+
+@bot.middleware_handler(update_types=['message', 'callback_query'])
+def set_contex_language(bot_instance, message):
+ i18n.context_lang.language = users_lang.get(message.from_user.id, 'en')
+
+
+@bot.message_handler(commands=['start'])
+def start_handler(message: types.Message):
+ text = _("Hello, {user_fist_name}!\n"
+ "This is the example of multilanguage bot.\n"
+ "Available commands:\n\n"
+ "/lang - change your language\n"
+ "/plural - pluralization example")
+
+ # remember don't use f string for interpolation, use .format method instead
+ text = text.format(user_fist_name=message.from_user.first_name)
+ bot.send_message(message.from_user.id, text)
+
+
+@bot.message_handler(commands=['lang'])
+def change_language_handler(message: types.Message):
+ bot.send_message(message.chat.id, "Choose language\nВыберите язык\nTilni tanlang",
+ reply_markup=keyboards.languages_keyboard())
+
+
+@bot.callback_query_handler(func=None, text=custom_filters.TextFilter(contains=['en', 'ru', 'uz_Latn']))
+def language_handler(call: types.CallbackQuery):
+ lang = call.data
+ users_lang[call.from_user.id] = lang
+
+ # When you change user's language, pass language explicitly coz it's not changed in context
+ bot.edit_message_text(_("Language has been changed", lang=lang), call.from_user.id, call.message.id)
+ bot.delete_state(call.from_user.id)
+
+
+@bot.message_handler(commands=['plural'])
+def pluralization_handler(message: types.Message):
+ if not users_clicks.get(message.from_user.id):
+ users_clicks[message.from_user.id] = 0
+ clicks = users_clicks[message.from_user.id]
+
+ text = __(
+ singular="You have {number} click",
+ plural="You have {number} clicks",
+ n=clicks,
+ )
+ text = _("This is clicker.\n\n") + text.format(number=clicks)
+ bot.send_message(message.chat.id, text, reply_markup=keyboards.clicker_keyboard(_))
+
+
+@bot.callback_query_handler(func=None, text=custom_filters.TextFilter(equals='click'))
+def click_handler(call: types.CallbackQuery):
+ if not users_clicks.get(call.from_user.id):
+ users_clicks[call.from_user.id] = 1
+ else:
+ users_clicks[call.from_user.id] += 1
+
+ clicks = users_clicks[call.from_user.id]
+
+ text = __(
+ singular="You have {number} click",
+ plural="You have {number} clicks",
+ n=clicks
+ )
+ text = _("This is clicker.\n\n") + text.format(number=clicks)
+ bot.edit_message_text(text, call.from_user.id, call.message.message_id,
+ reply_markup=keyboards.clicker_keyboard(_))
+
+
+if __name__ == '__main__':
+ bot.add_custom_filter(custom_filters.TextMatchFilter())
+ bot.infinity_polling()
diff --git a/examples/middleware/function_based/session.py b/examples/middleware/function_based/session.py
new file mode 100644
index 000000000..ccda6fc83
--- /dev/null
+++ b/examples/middleware/function_based/session.py
@@ -0,0 +1,61 @@
+#!/usr/bin/python
+
+# This example shows how to implement session creation and retrieval based on user id with middleware handler.
+#
+# Note: For the sake of simplicity of this example no extra library is used. However, it is recommended to use
+# in-memory or on-disk storage implementations (redis, mysql, postgres and etc) for storing and retrieving structures.
+# This is not a working, production-ready sample and it is highly recommended not to use it in production.
+#
+# In this example let's imagine we want to create a session for each user who communicates with the bot to store
+# different kind of temporary data while session is active. As an example we want to track the state of the user
+# with the help of this session. So, we need a way to store this session data somewhere globally to enable other
+# message handler functions to be able to use it.
+# The middleware session is explained:
+
+import telebot
+from telebot import apihelper
+
+apihelper.ENABLE_MIDDLEWARE = True
+
+INFO_STATE = 'ON_INFO_MENU'
+MAIN_STATE = 'ON_MAIN_MENU'
+
+SESSIONS = {
+ -10000: {
+ 'state': INFO_STATE
+ },
+ -11111: {
+ 'state': MAIN_STATE
+ }
+}
+
+
+def get_or_create_session(user_id):
+ try:
+ return SESSIONS[user_id]
+ except KeyError:
+ SESSIONS[user_id] = {'state': MAIN_STATE}
+ return SESSIONS[user_id]
+
+
+bot = telebot.TeleBot('TOKEN')
+
+
+@bot.middleware_handler(update_types=['message'])
+def set_session(bot_instance, message):
+ bot_instance.session = get_or_create_session(message.from_user.id)
+
+
+@bot.message_handler(commands=['start'])
+def start(message):
+ bot.session['state'] = MAIN_STATE
+ bot.send_message(message.chat.id, bot.session['state'])
+
+
+@bot.message_handler(commands=['info'])
+def start(message):
+ bot.session['state'] = INFO_STATE
+ bot.send_message(message.chat.id, bot.session['state'])
+
+
+bot.infinity_polling()
diff --git a/examples/mini_app.py b/examples/mini_app.py
new file mode 100644
index 000000000..735acd38c
--- /dev/null
+++ b/examples/mini_app.py
@@ -0,0 +1,32 @@
+# The source of the "https://pytelegrambotminiapp.vercel.app" can be found in https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples/mini_app_web
+
+from telebot import TeleBot
+from telebot.types import (
+ ReplyKeyboardMarkup,
+ KeyboardButton,
+ WebAppInfo,
+ InlineKeyboardMarkup,
+ InlineKeyboardButton
+)
+
+BOT_TOKEN = ""
+WEB_URL = "https://pytelegrambotminiapp.vercel.app"
+
+bot = TeleBot(BOT_TOKEN)
+
+@bot.message_handler(commands=["start"])
+def start(message):
+ reply_keyboard_markup = ReplyKeyboardMarkup(resize_keyboard=True)
+ reply_keyboard_markup.row(KeyboardButton("Start MiniApp", web_app=WebAppInfo(WEB_URL)))
+
+ inline_keyboard_markup = InlineKeyboardMarkup()
+ inline_keyboard_markup.row(InlineKeyboardButton('Start MiniApp', web_app=WebAppInfo(WEB_URL)))
+
+ bot.reply_to(message, "Click the bottom inline button to start MiniApp", reply_markup=inline_keyboard_markup)
+ bot.reply_to(message, "Click keyboard button to start MiniApp", reply_markup=reply_keyboard_markup)
+
+@bot.message_handler(content_types=['web_app_data'])
+def web_app(message):
+ bot.reply_to(message, f'Your message is "{message.web_app_data.data}"')
+
+bot.infinity_polling()
diff --git a/examples/mini_app_web/index.html b/examples/mini_app_web/index.html
new file mode 100644
index 000000000..22bd86ec9
--- /dev/null
+++ b/examples/mini_app_web/index.html
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+ PyTelegramBotApi MiniApp
+
+
+
+
`;
+ });
+});
+
+text.color_scheme.innerText += telegram.colorScheme;
+text.version.innerText += telegram.version;
+text.platform.innerText += telegram.platform;
+
+button.send_message.addEventListener('click', () => {
+ telegram.sendData(input.message.value);
+ if (telegram.initDataUnsafe) telegram.showAlert('SendData only works in miniapp that opened with reply keyboard.')
+ input.message.value = ''
+});
+
+button.main.addEventListener('click', (e) => {
+ const modify_button = new ModifyStyle(e.currentTarget);
+ if (e.currentTarget.value == 'enable') {
+ e.currentTarget.value = 'disable';
+ modify_button.disableButton();
+ telegram.MainButton.hide();
+ } else {
+ e.currentTarget.value = 'enable';
+ modify_button.enableButton();
+ telegram.MainButton.show();
+ }
+});
+
+button.back.addEventListener('click', (e) => {
+ const modify_button = new ModifyStyle(e.currentTarget);
+ if (e.currentTarget.value == 'enable') {
+ e.currentTarget.value = 'disable';
+ modify_button.disableButton();
+ telegram.BackButton.hide();
+ } else {
+ e.currentTarget.value = 'enable';
+ modify_button.enableButton();
+ telegram.BackButton.show();
+ }
+});
+
+button.settings.addEventListener('click', (e) => {
+ const modify_button = new ModifyStyle(e.currentTarget);
+ if (e.currentTarget.value == 'enable') {
+ e.currentTarget.value = 'disable';
+ modify_button.disableButton();
+ telegram.SettingsButton.hide();
+ } else {
+ e.currentTarget.value = 'enable';
+ modify_button.enableButton();
+ telegram.SettingsButton.show();
+ }
+});
+
+button.success.addEventListener('click', () => {
+ telegram.HapticFeedback.notificationOccurred('success');
+});
+
+button.warning.addEventListener('click', () => {
+ telegram.HapticFeedback.notificationOccurred('warning');
+});
+
+button.error.addEventListener('click', () => {
+ telegram.HapticFeedback.notificationOccurred('error');
+});
+
+button.popup.addEventListener('click', () => {
+ telegram.showPopup({title: 'popup', message: 'this is popup message', buttons: [{ text: 'roger'}]});
+});
+
+button.alert.addEventListener('click', () => {
+ telegram.showAlert('This is alert message');
+});
+
+button.confirm.addEventListener('click', () => {
+ telegram.showConfirm('This is confirm message');
+});
+
+button.contact.addEventListener('click', () => {
+ telegram.requestContact();
+});
+
+button.write_access.addEventListener('click', () => {
+ telegram.requestWriteAccess();
+});
+
+button.biometrics.addEventListener('click', () => {
+ telegram.BiometricManager.requestAccess({'reseaon': 'this is biometrics request'});
+});
+
+button.vertical_scroll_enable.addEventListener('click', (e) => {
+ const modify_scroll_enable = new ModifyStyle(e.currentTarget);
+ const modify_scroll_disable = new ModifyStyle(button.vertical_scroll_disable);
+ if (e.currentTarget.value == 'disable') {
+ e.currentTarget.value = 'enable';
+ modify_scroll_enable.enableButton();
+ modify_scroll_disable.disableButton();
+ button.vertical_scroll_disable.value = 'disable';
+ telegram.enableVerticalSwipes();
+ };
+});
+
+button.vertical_scroll_disable.addEventListener('click', (e) => {
+ const modify_scroll_disable = new ModifyStyle(e.currentTarget);
+ const modify_scroll_enable = new ModifyStyle(button.vertical_scroll_enable);
+ if (e.currentTarget.value == 'disable') {
+ e.currentTarget.value = 'enable';
+ modify_scroll_disable.enableButton();
+ modify_scroll_enable.disableButton();
+ telegram.disableVerticalSwipes();
+ button.vertical_scroll_enable.value = 'disable';
+ };
+});
+
+button.close_confirm_enable.addEventListener('click', (e) => {
+ const modify_close_confirm_enable = new ModifyStyle(e.currentTarget);
+ const modify_close_confirm_disable = new ModifyStyle(button.close_confirm_disable);
+ if (e.currentTarget.value == 'disable') {
+ e.currentTarget.value = 'enable';
+ modify_close_confirm_enable.enableButton();
+ modify_close_confirm_disable.disableButton();
+ button.close_confirm_disable.value = 'disable';
+ telegram.enableClosingConfirmation();
+ };
+});
+
+button.close_confirm_disable.addEventListener('click', (e) => {
+ const modify_close_confirm_disable= new ModifyStyle(e.currentTarget);
+ const modify_close_confirm_enable= new ModifyStyle(button.close_confirm_enable);
+ if (e.currentTarget.value == 'disable') {
+ e.currentTarget.id = 'enable';
+ modify_close_confirm_enable.disableButton();
+ modify_close_confirm_disable.enableButton();
+ button.close_confirm_enable.value = 'disable';
+ telegram.disableClosingConfirmation();
+ };
+});
+
+button.show_QR.addEventListener('click', () => {
+ telegram.showScanQrPopup({text: "this is QR scanner"});
+});
+
+button.expand.addEventListener('click', () => {
+ telegram.expand();
+});
+
+button.close.addEventListener('click', () => {
+ telegram.close();
+});
+
+button.cloud_add.addEventListener('click', () => {
+ let table_modify = new TableModify(table.cloud_table);
+ telegram.CloudStorage.setItem(input.cloud_add_key.value, input.cloud_add_value.value, (error, is_stored) => {
+ if (!is_stored) telegram.showAlert(error);
+ else {
+ table_modify.addElements(input.cloud_add_key.value, input.cloud_add_value.value);
+ new TableModify(table.cloud_table).removeElement('null-storage-row');
+ };
+ input.cloud_add_key.value = '';
+ input.cloud_add_value.value = '';
+ });
+});
+
+button.cloud_remove.addEventListener('click', () => {
+ let table_modify = new TableModify(table.cloud_table);
+ telegram.CloudStorage.removeItem(input.cloud_remove_key.value, (error, is_removed) => {
+ if (!is_removed) telegram.showAlert(error);
+ else table_modify.removeElement(input.cloud_remove_key.value);
+ input.cloud_remove_key.value = '';
+ });
+});
+
+button.post_story_photo.addEventListener('click', () => {
+ telegram.shareToStory('https://telegra.ph/file/e194a37aed103485469b4.jpg', {text: 'This is photo story'});
+});
+
+button.post_story_video.addEventListener('click', () => {
+ telegram.shareToStory('https://telegra.ph/file/16ffd9385a017b59f458e.mp4', {text: 'This is video story'});
+});
+
+button.post_story_with_link.addEventListener('click', () => {
+ telegram.shareToStory('https://telegra.ph/file/e194a37aed103485469b4.jpg', {text: 'This is story with link', widget_link: {url: 'https://t.me/joinchat/Bn4ixj84FIZVkwhk2jag6A'}});
+});
+
+colors_tweaks.forEach((element) => {
+ element.addEventListener('click', (e) => {
+ const color = window.getComputedStyle(e.currentTarget).backgroundColor;
+ if (e.currentTarget.id.includes('header')){
+ telegram.setHeaderColor(color);
+ } else {
+ telegram.setBackgroundColor(color);
+ document.querySelector('.body').style.backgroundColor = telegram.backgroundColor;
+ };
+ });
+});
+
+text.telegram_link.addEventListener('click', () => {
+ telegram.openTelegramLink("https://t.me/joinchat/Bn4ixj84FIZVkwhk2jag6A");
+});
+
+text.internal_link.addEventListener('click', () => {
+ telegram.openLink('https://telegram.org', {try_instant_view: false});
+});
diff --git a/examples/mini_app_web/style.css b/examples/mini_app_web/style.css
new file mode 100644
index 000000000..30fad466c
--- /dev/null
+++ b/examples/mini_app_web/style.css
@@ -0,0 +1,338 @@
+:root {
+ --red-color: #ba4d47;
+ --yellow-color: #bab05b;
+}
+
+.body {
+ background-color: (--tg-theme-secondary-bg-color);
+}
+
+* {
+ font-family: Arial, Helvetica, sans-serif;
+ margin: 0;
+ padding: 0;
+}
+
+input {
+ color: var(--tg-theme-text-color);
+}
+
+table {
+ width: 93vw;
+ border-collapse: collapse;
+ border: solid 0px var(--tg-theme-hint-color);
+ border-radius: 5px;
+}
+
+th {
+ font-weight: bold;
+}
+
+td {
+ font-weight: lighter;
+ max-width: 46.5vw;
+ overflow-x: hidden;
+}
+
+
+th, td {
+ padding: 3px;
+ font-size: 14px;
+ color: var(--tg-theme-text-color);
+ text-align: center;
+ border: solid 1px var(--tg-theme-hint-color);
+}
+
+input:focus {
+ outline: none;
+}
+
+::placeholder {
+ color: var(--tg-theme-hint-color);
+}
+
+.content-block {
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ gap: 9.24px;
+ background-color: var(--tg-theme-bg-color);
+ height: 70px;
+}
+
+.content-block_send-message {
+ flex-direction: column;
+ height: 160px;
+}
+
+.content-block_tweak-color {
+ flex-direction: column;
+ align-items: start;
+ justify-content: center;
+ gap: 17px;
+ height: 96px;
+}
+
+.content-block_cloud-storage {
+ flex-direction: column;
+ height: 320px;
+ gap: 9.6px;
+}
+
+.content-block_link {
+ height: 104px;
+ flex-direction: column;
+}
+
+.content-block_event{
+ height: 220px;
+}
+
+.content-block_scroll-behaviour, .content-block_close-confirmation {
+ height: 100px;
+ align-items: flex-start;
+ align-self: flex-start;
+ flex-direction: column;
+ padding-left: 4.2vw;
+}
+
+.content-block_data {
+ height: 100%;
+ flex-direction: column;
+ align-items: flex-start;
+ padding:5vh 3vw 5vh 3vw ;
+ overflow: hidden;
+}
+
+.scroll-behaviour__toggle-box, .content-block__toggle-box {
+ display: flex;
+ gap: 9.6px;
+}
+
+.link__content {
+ display: flex;
+ flex-direction: row;
+}
+
+.tweak-color__header, .tweak-color__background {
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-end;
+ gap: 9.6px;
+ width: 65vw;
+}
+
+.tweak-color__circle-block {
+ display: flex;
+ flex-direction: row;
+ gap: 2vw;
+}
+
+.event__content {
+ overflow-y: auto;
+ height: 170px;
+ width: 88vw;
+ border: solid 1px var(--tg-theme-hint-color);
+ border-radius: 5px;
+ padding: 10px;
+}
+
+.data__content {
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
+
+.cloud-storage__input-block {
+ width: 93vw;
+ display: flex;
+ flex-direction: row;
+ gap: 0px;
+}
+
+.cloud-storage__input-block_remove {
+ width: 94vw;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+.description-block {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ margin: 10px;
+ gap: 3px;
+}
+
+.send-message__button{
+ border: none;
+ color: var(--tg-theme-text-color);
+ background-color: var(--tg-theme-button-color);
+ border-radius: 5px;
+ width: 70vw;
+ height: 40px;
+}
+
+.default-button {
+ color: var(--tg-theme-text-color);
+ background-color: var(--tg-theme-button-color);
+ border: none;
+ border-radius: 5px;
+ width: 29vw;;
+ height: 35px;
+}
+
+.default-button_yellow {
+ background-color: var(--yellow-color);
+}
+
+.default-button_red {
+ background-color: var(--red-color);
+}
+
+.default-button_disable {
+ background: transparent;
+ color: var(--tg-theme-button-color);
+ border: solid 1px var(--tg-theme-button-color);
+}
+
+.cloud-storage__button {
+ border: none;
+ border-radius: 5px;
+ color: var(--button_text_color);
+ width: 93vw;
+ height: 38px;
+}
+
+.cloud-storage__button_add {
+ color: var(--tg-theme-text-color);
+ background-color: var(--tg-theme-button-color);
+ margin-bottom: 10px;
+}
+
+.cloud-storage__button_remove {
+ color: var(--tg-theme-text-color);
+ background-color: var(--red-color);
+}
+
+.header-text {
+ font-size: 14px;
+ color: var(--tg-theme-hint-color);
+ margin-top: 13px;
+ margin-bottom: 5px;
+ margin-left: 6px;
+}
+
+.content-block__text {
+ color: var(--tg-theme-text-color);
+ font-size: 14px;
+ padding-bottom: 3px;
+}
+
+.tweak-color__text {
+ font-size: 13px;
+ color: var(--tg-theme-text-color);
+ }
+
+.data__text {
+ color: var(--tg-theme-text-color);
+ font-weight: 300;
+ font-size: 15px;
+}
+
+.link__text {
+ font-size: 14px;
+ color: var(--tg-theme-hint-color);
+ padding: 2px;
+}
+
+.link__text_blue {
+ color: var(--tg-theme-link-color);
+}
+
+.event__text {
+ color: var(--tg-theme-text-color);
+ font-weight: lighter;
+ font-size: 13px;
+}
+
+
+.description__text {
+ color: var(--tg-theme-hint-color);
+ font-size: 13px;
+ font-weight: 300;
+}
+
+.send-message__input {
+ border: solid var(--tg-theme-hint-color) 1px;
+ background-color: transparent;
+ border-radius: 5px;
+ width: 67vw;
+ height: 40px;
+ padding-left: 10px;
+}
+
+.cloud-storage__input {
+ border: solid 1px var(--tg-theme-hint-color);
+ background-color: transparent;
+ height: 30px;
+ padding-left: 10px;
+}
+
+.cloud-storage__input_add-key {
+ border-radius: 5px 0px 0px 5px;
+ width: 35%;
+}
+
+.cloud-storage__input_add-value {
+ border-radius: 0px 5px 5px 0px;
+ width: 65%;
+}
+
+.cloud-storage__input_remove {
+ width: 90vw;
+ border: solid 1px var(--tg-theme-hint-color);
+ border-radius: 5px;
+ margin-bottom: 10px;
+}
+
+.tweak-color__circle {
+ border-radius: 100%;
+ width: 20px;
+ height: 20px;
+}
+
+.tweak-color__circle_yellow {
+ background-color: var(--yellow-color);
+}
+
+.tweak-color__circle_red {
+ background-color: var(--red-color);
+}
+
+.tweak-color__circle_button {
+ background-color: var(--tg-theme-button-color);
+}
+
+.tweak-color__circle_header {
+ border: solid 1px var(--tg-theme-hint-color);
+ background-color: var(--tg-theme-header-bg-color);
+}
+
+.tweak-color__circle_background {
+ border: solid 1px var(--tg-theme-hint-color);
+ background-color: var(--tg-theme-secondary-bg-color);
+}
+
+.cloud-storage__table {
+ margin-bottom: 10px;
+}
+
+.link__list {
+ color: var(--tg-theme-hint-color);
+ width: 88vw;
+}
+
diff --git a/examples/multibot/README.MD b/examples/multibot/README.MD
new file mode 100644
index 000000000..3693d363f
--- /dev/null
+++ b/examples/multibot/README.MD
@@ -0,0 +1,17 @@
+You probably have seen bots which allow you to send them token of your bot and then handle updates providing some functionality for your bot.
+
+This type of bots are called multibots. They are created using webhooks.
+
+
+This is the example of simple multibot.
+In order to reproduce this example you need to have domain and ssl connection.
+
+If you have, go to config.py and specify your data.
+
+There is also file called nginx_conf.conf, we will use nginx as proxy-server and this file is example nginx.conf file.
+
+Make sure that server_name and port are the same in both config and nginx_conf
+
+(nginx_conf.conf IS NOT complete, you would probably use tools like certbot to add ssl connection to it)
+
+Also, in this example I used dictionary as tokens storage, but in production you should use database so that you can re-set webhooks in case bot restarts.
\ No newline at end of file
diff --git a/examples/multibot/config.py b/examples/multibot/config.py
new file mode 100644
index 000000000..17e7141e3
--- /dev/null
+++ b/examples/multibot/config.py
@@ -0,0 +1,6 @@
+MAIN_BOT_TOKEN = "your_main_bot_token"
+
+WEBHOOK_HOST = "your_domain.com"
+WEBHOOK_PATH = "telegram_webhook"
+WEBAPP_HOST = "0.0.0.0"
+WEBAPP_PORT = 3500
diff --git a/examples/multibot/handlers.py b/examples/multibot/handlers.py
new file mode 100644
index 000000000..8fa418244
--- /dev/null
+++ b/examples/multibot/handlers.py
@@ -0,0 +1,14 @@
+from telebot import types, TeleBot
+
+
+def hello_handler(message: types.Message, bot: TeleBot):
+ bot.send_message(message.chat.id, "Hi :)")
+
+
+def echo_handler(message: types.Message, bot: TeleBot):
+ bot.send_message(message.chat.id, message.text)
+
+
+def register_handlers(bot: TeleBot):
+ bot.register_message_handler(hello_handler, func=lambda message: message.text == 'Hello', pass_bot=True)
+ bot.register_message_handler(echo_handler, pass_bot=True)
diff --git a/examples/multibot/main.py b/examples/multibot/main.py
new file mode 100644
index 000000000..91e46736a
--- /dev/null
+++ b/examples/multibot/main.py
@@ -0,0 +1,48 @@
+from flask import Flask
+from flask import request, abort
+from telebot import TeleBot, types, util
+from handlers import register_handlers
+
+import config
+
+main_bot = TeleBot(config.MAIN_BOT_TOKEN)
+app = Flask(__name__)
+tokens = {config.MAIN_BOT_TOKEN: True}
+
+
+@app.route(f"/{config.WEBHOOK_PATH}/", methods=['POST'])
+def webhook(token: str):
+ if not tokens.get(token):
+ return abort(404)
+
+ if request.headers.get('content-type') != 'application/json':
+ return abort(403)
+
+ json_string = request.get_data().decode('utf-8')
+ update = types.Update.de_json(json_string)
+ if token == main_bot.token:
+ main_bot.process_new_updates([update])
+ return ''
+
+ from_update_bot = TeleBot(token)
+ register_handlers(from_update_bot)
+ from_update_bot.process_new_updates([update])
+ return ''
+
+
+@main_bot.message_handler(commands=['add_bot'])
+def add_bot(message: types.Message):
+ token = util.extract_arguments(message.text)
+ tokens[token] = True
+
+ new_bot = TeleBot(token)
+ new_bot.delete_webhook()
+ new_bot.set_webhook(f"{config.WEBHOOK_HOST}/{config.WEBHOOK_PATH}/{token}")
+
+ new_bot.send_message(message.chat.id, "Webhook was set.")
+
+
+if __name__ == '__main__':
+ main_bot.delete_webhook()
+ main_bot.set_webhook(f"{config.WEBHOOK_HOST}/{config.WEBHOOK_PATH}/{config.MAIN_BOT_TOKEN}")
+ app.run(host=config.WEBAPP_HOST, port=config.WEBAPP_PORT)
diff --git a/examples/multibot/nginx_conf.conf b/examples/multibot/nginx_conf.conf
new file mode 100644
index 000000000..776fa4c77
--- /dev/null
+++ b/examples/multibot/nginx_conf.conf
@@ -0,0 +1,8 @@
+server {
+ server_name your_domain.com;
+
+ location /telegram_webhook/ {
+ proxy_pass http://localhost:3500;
+ }
+
+}
\ No newline at end of file
diff --git a/examples/payments_example.py b/examples/payments_example.py
index d0f52d4c2..0b931c506 100644
--- a/examples/payments_example.py
+++ b/examples/payments_example.py
@@ -38,21 +38,20 @@ def command_pay(message):
"Real cards won't work with me, no money will be debited from your account."
" Use this test card number to pay for your Time Machine: `4242 4242 4242 4242`"
"\n\nThis is your demo invoice:", parse_mode='Markdown')
- bot.send_invoice(message.chat.id, title='Working Time Machine',
- description='Want to visit your great-great-great-grandparents?'
- ' Make a fortune at the races?'
- ' Shake hands with Hammurabi and take a stroll in the Hanging Gardens?'
- ' Order our Working Time Machine today!',
- provider_token=provider_token,
- currency='usd',
+ bot.send_invoice(
+ message.chat.id, #chat_id
+ 'Working Time Machine', #title
+ ' Want to visit your great-great-great-grandparents? Make a fortune at the races? Shake hands with Hammurabi and take a stroll in the Hanging Gardens? Order our Working Time Machine today!', #description
+ 'HAPPY FRIDAYS COUPON', #invoice_payload
+ provider_token, #provider_token
+ 'usd', #currency
+ prices, #prices
photo_url='http://erkelzaar.tsudao.com/models/perrotta/TIME_MACHINE.jpg',
photo_height=512, # !=0/None or picture won't be shown
photo_width=512,
photo_size=512,
is_flexible=False, # True If you need to set up Shipping Fee
- prices=prices,
- start_parameter='time-machine-example',
- invoice_payload='HAPPY FRIDAYS COUPON')
+ start_parameter='time-machine-example')
@bot.shipping_query_handler(func=lambda query: True)
@@ -78,5 +77,4 @@ def got_payment(message):
parse_mode='Markdown')
-bot.skip_pending = True
-bot.polling(none_stop=True, interval=0)
+bot.infinity_polling(skip_pending = True)
diff --git a/examples/poll_example.py b/examples/poll_example.py
new file mode 100644
index 000000000..8a3e16b7a
--- /dev/null
+++ b/examples/poll_example.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+
+# This is an example file to create quiz polls
+import telebot
+
+API_TOKEN = ""
+
+bot = telebot.TeleBot(API_TOKEN)
+
+
+@bot.message_handler(commands=["poll"])
+def create_poll(message):
+ bot.send_message(message.chat.id, "English Article Test")
+ answer_options = ["a", "an", "the", "-"]
+
+ bot.send_poll(
+ chat_id=message.chat.id,
+ question="We are going to '' park.",
+ options=answer_options,
+ type="quiz",
+ correct_option_id=2,
+ is_anonymous=False,
+ )
+
+
+@bot.poll_answer_handler()
+def handle_poll(poll):
+ # This handler can be used to log User answers and to send next poll
+ pass
+
+
+bot.infinity_polling()
diff --git a/examples/register_handler.py b/examples/register_handler.py
new file mode 100644
index 000000000..9ee074e73
--- /dev/null
+++ b/examples/register_handler.py
@@ -0,0 +1,21 @@
+import telebot
+
+api_token = 'token'
+
+bot = telebot.TeleBot(api_token)
+
+def start_executor(message):
+ bot.send_message(message.chat.id, 'Hello!')
+
+bot.register_message_handler(start_executor, commands=['start']) # Start command executor
+
+# See also
+# bot.register_callback_query_handler(*args, **kwargs)
+# bot.register_channel_post_handler(*args, **kwargs)
+# bot.register_chat_member_handler(*args, **kwargs)
+# bot.register_inline_handler(*args, **kwargs)
+# bot.register_my_chat_member_handler(*args, **kwargs)
+# bot.register_edited_message_handler(*args, **kwargs)
+# And other functions..
+
+bot.infinity_polling()
diff --git a/examples/reply_keyboard_markup_example.py b/examples/reply_keyboard_markup_example.py
new file mode 100644
index 000000000..a4e33cb36
--- /dev/null
+++ b/examples/reply_keyboard_markup_example.py
@@ -0,0 +1,63 @@
+# This example shows you how to create a custom QWERTY keyboard using reply keyboard markup
+import telebot
+from telebot.types import ReplyKeyboardMarkup, KeyboardButton
+
+TOKEN = ""
+bot = telebot.TeleBot(TOKEN)
+
+keys = ["1","2","3","4","5","6","7","8","9","0","q","w","e","r","t","y","u","i","o","p","a","s","d","f","g","h","j","k","l","z","x","c","v","b","n","m"]
+symbols = ["1","2","3","4","5","6","7","8","9","0","!","@","#","$","%","^","&","*","(",")","\'","\"","/","\\",",",".",";",":"]
+
+def keyboard(key_type="Normal"):
+ markup = ReplyKeyboardMarkup(row_width=10)
+ if key_type == "Normal":
+ row = [KeyboardButton(x) for x in keys[:10]]
+ markup.add(*row)
+ row = [KeyboardButton(x) for x in keys[10:20]]
+ markup.add(*row)
+ row = [KeyboardButton(x) for x in keys[20:29]]
+ markup.add(*row)
+ row = [KeyboardButton(x) for x in keys[29:]]
+ markup.add(*row)
+ markup.add(KeyboardButton("Caps Lock"),KeyboardButton("Symbols"),KeyboardButton("🔙Delete"),KeyboardButton("✅Done"))
+ elif key_type == "Symbols":
+ row = [KeyboardButton(x) for x in symbols[:10]]
+ markup.add(*row)
+ row = [KeyboardButton(x) for x in symbols[10:20]]
+ markup.add(*row)
+ row = [KeyboardButton(x) for x in symbols[20:]]
+ markup.add(*row)
+ markup.add(KeyboardButton("Caps Lock"),KeyboardButton("Normal"),KeyboardButton("🔙Delete"),KeyboardButton("✅Done"))
+ else:
+ row = [KeyboardButton(x.upper()) for x in keys[:10]]
+ markup.add(*row)
+ row = [KeyboardButton(x.upper()) for x in keys[10:20]]
+ markup.add(*row)
+ row = [KeyboardButton(x.upper()) for x in keys[20:29]]
+ markup.add(*row)
+ row = [KeyboardButton(x.upper()) for x in keys[29:]]
+ markup.add(*row)
+ markup.add(KeyboardButton("Normal"),KeyboardButton("Symbols"),KeyboardButton("🔙Delete"),KeyboardButton("✅Done"))
+ return markup
+
+@bot.message_handler(commands=["start"])
+def start_message(message):
+ bot.send_message(message.chat.id,"You can use the keyboard",reply_markup=keyboard())
+
+@bot.message_handler(func=lambda message:True)
+def all_messages(message):
+ if message.text == "✅Done":
+ markup = telebot.types.ReplyKeyboardRemove()
+ bot.send_message(message.from_user.id,"Done with Keyboard",reply_markup=markup)
+ elif message.text == "Symbols":
+ bot.send_message(message.from_user.id,"Special characters",reply_markup=keyboard("Symbols"))
+ elif message.text == "Normal":
+ bot.send_message(message.from_user.id,"Normal Keyboard",reply_markup=keyboard("Normal"))
+ elif message.text == "Caps Lock":
+ bot.send_message(message.from_user.id,"Caps Lock",reply_markup=keyboard("Caps"))
+ elif message.text == "🔙Delete":
+ bot.delete_message(message.from_user.id,message.message_id)
+ else:
+ bot.send_message(message.chat.id,message.text)
+
+bot.infinity_polling()
diff --git a/examples/serverless/aws_lambda_function.py b/examples/serverless/aws_lambda_function.py
new file mode 100644
index 000000000..e9679846c
--- /dev/null
+++ b/examples/serverless/aws_lambda_function.py
@@ -0,0 +1,50 @@
+"""
+Example of running PyTelegramBotAPI serverless in Amazon AWS Lambdaю
+You have to set your lambda's url as telegram webhook manually https://core.telegram.org/bots/api#setwebhook
+"""
+
+import logging
+
+import telebot
+import json
+import os
+
+API_TOKEN = os.environ['TELEGRAM_TOKEN']
+
+
+logger = telebot.logger
+telebot.logger.setLevel(logging.INFO)
+
+bot = telebot.TeleBot(API_TOKEN, threaded=False)
+
+
+def process_event(event):
+ # Get telegram webhook json from event
+ request_body_dict = json.loads(event['body'])
+ # Parse updates from json
+ update = telebot.types.Update.de_json(request_body_dict)
+ # Run handlers and etc for updates
+ bot.process_new_updates([update])
+
+
+def lambda_handler(event, context):
+ # Process event from aws and respond
+ process_event(event)
+ return {
+ 'statusCode': 200
+ }
+
+
+# Handle '/start' and '/help'
+@bot.message_handler(commands=['help', 'start'])
+def send_welcome(message):
+ bot.reply_to(message,
+ ("Hi there, I am EchoBot.\n"
+ "I am here to echo your kind words back to you."))
+
+
+# Handle all other messages
+@bot.message_handler(func=lambda message: True, content_types=['text'])
+def echo_message(message):
+ bot.reply_to(message, message.text)
+
diff --git a/examples/serverless/azure_functions b/examples/serverless/azure_functions
new file mode 100644
index 000000000..df90e6c79
--- /dev/null
+++ b/examples/serverless/azure_functions
@@ -0,0 +1,69 @@
+# Using Azure Functions for serverless bots.
+# (Thanks to twitter.com/masyan for the idea)
+
+# By default the Azure Functions url is https://.../api/HttpTrigger for HttpTrigger type.
+# In this example we will use clear webhook url without /api/ -> https://.../HttpTrigger.
+# Also we set "authLevel": "anonymous".
+
+# For HttpTrigger type set "route" and "authLevel" in functions.json
+# {
+# "bindings": [
+# ...
+# "authLevel": "anonymous"
+# "route": "HttpTrigger"
+# ]
+# }
+
+# To avoid using /api/ in url set "routePrefix":"" in host.json
+# {
+# ...
+# "extensions": {
+# "http": {
+# "routePrefix": ""
+# }
+# }
+# }
+
+import logging
+
+import azure.functions as func
+import telebot
+from telebot import apihelper, types
+
+logger = telebot.logger
+telebot.logger.setLevel(logging.DEBUG)
+
+# Set bot token
+TOKEN = ''
+
+# Uncomment this for using proxy for request
+# PROXY = ''
+# apihelper.proxy = {'https': PROXY}
+
+# Set WEBHOOK as your Azure Functions url (https://...azurewebsites.net/HttpTrigger)
+WEBHOOK = ''
+
+bot = telebot.TeleBot(TOKEN)
+
+@bot.message_handler(commands=['start'])
+def start(message):
+ bot.reply_to(message, 'Hello, ' + message.from_user.first_name)
+
+@bot.message_handler(func=lambda message: True, content_types=['text'])
+def echo_message(message):
+ bot.reply_to(message, message.text)
+
+# To avoid "error 429 too many request" set webhook only once. Or use time.sleep(1).
+def main(req: func.HttpRequest) -> func.HttpResponse:
+ bot.set_webhook(url=WEBHOOK)
+ request_body_dict = req.get_json()
+ update = telebot.types.Update.de_json(request_body_dict)
+ bot.process_new_messages([update.message])
+ return func.HttpResponse(body='', status_code=200)
+
+# Sometimes "requests" version is important.
+# azure-functions==1.0.4
+# PySocks==1.7.1
+# pyTelegramBotAPI==3.6.6
+# requests==2.10.0
+
diff --git a/examples/serverless/flask_google_cloud_bot/.gcloudignore b/examples/serverless/flask_google_cloud_bot/.gcloudignore
new file mode 100644
index 000000000..ae412d6a0
--- /dev/null
+++ b/examples/serverless/flask_google_cloud_bot/.gcloudignore
@@ -0,0 +1 @@
+env/
\ No newline at end of file
diff --git a/examples/serverless/flask_google_cloud_bot/app.yaml b/examples/serverless/flask_google_cloud_bot/app.yaml
new file mode 100644
index 000000000..59ad3ad6f
--- /dev/null
+++ b/examples/serverless/flask_google_cloud_bot/app.yaml
@@ -0,0 +1,4 @@
+runtime: python38
+
+env_variables:
+ BUCKET_NAME: "your-google-application"
\ No newline at end of file
diff --git a/examples/serverless/flask_google_cloud_bot/main.py b/examples/serverless/flask_google_cloud_bot/main.py
new file mode 100644
index 000000000..67f479ff6
--- /dev/null
+++ b/examples/serverless/flask_google_cloud_bot/main.py
@@ -0,0 +1,65 @@
+'''
+Simple bot for Google cloud deployment.
+
+Docs:
+https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-python-service
+
+1. Receive your bot's token from https://t.me/BotFather
+
+2. Create a Google Cloud project. https://cloud.google.com/resource-manager/docs/creating-managing-projects
+
+3. Install the Google Cloud CLI. https://cloud.google.com/sdk/docs/install
+
+4. Move to telegram_google_cloud_bot folder
+
+cd telegram_google_cloud_bot/
+
+5. Initialize the gcloud CLI:
+
+gcloud init
+
+6. To set the default project for your Cloud Run service:
+
+gcloud config set project PROJECT_ID
+
+7. Deploy:
+
+gcloud run deploy
+'''
+
+import os
+
+from flask import Flask, request
+
+import telebot
+
+TOKEN = 'token_from_botfather'
+
+bot = telebot.TeleBot(TOKEN)
+
+app = Flask(__name__)
+
+
+@bot.message_handler(commands=['start'])
+def start(message):
+ bot.reply_to(message, 'Hello, ' + message.from_user.first_name)
+
+
+@bot.message_handler(func=lambda message: True, content_types=['text'])
+def echo_message(message):
+ bot.reply_to(message, message.text)
+
+
+@app.route('/' + TOKEN, methods=['POST'])
+def getMessage():
+ json_string = request.get_data().decode('utf-8')
+ update = telebot.types.Update.de_json(json_string)
+ bot.process_new_updates([update])
+ return '!', 200
+
+
+@app.route('/')
+def webhook():
+ bot.remove_webhook()
+ bot.set_webhook(url='https://mydomain.com/' + TOKEN)
+ return '!', 200
\ No newline at end of file
diff --git a/examples/serverless/flask_google_cloud_bot/requirements.txt b/examples/serverless/flask_google_cloud_bot/requirements.txt
new file mode 100644
index 000000000..a9c951e71
--- /dev/null
+++ b/examples/serverless/flask_google_cloud_bot/requirements.txt
@@ -0,0 +1,4 @@
+pyTelegramBotAPI==4.11.0
+Flask==3.0.0
+gunicorn==23.0.0
+Werkzeug==3.0.6
diff --git a/examples/set_command_example.py b/examples/set_command_example.py
new file mode 100644
index 000000000..1573e91d3
--- /dev/null
+++ b/examples/set_command_example.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+# This is a set_my_commands example.
+# Press on [/] button in telegram client.
+# Important, to update the command menu, be sure to exit the chat with the bot and enter to chat again
+# Important, command for chat_id and for group have a higher priority than for all
+
+import telebot
+
+
+API_TOKEN = ''
+bot = telebot.TeleBot(API_TOKEN)
+
+# use in for delete with the necessary scope and language_code if necessary
+bot.delete_my_commands(scope=None, language_code=None)
+
+bot.set_my_commands(
+ commands=[
+ telebot.types.BotCommand("command1", "command1 description"),
+ telebot.types.BotCommand("command2", "command2 description")
+ ],
+ # scope=telebot.types.BotCommandScopeChat(12345678) # use for personal command for users
+ # scope=telebot.types.BotCommandScopeAllPrivateChats() # use for all private chats
+)
+
+# check command
+cmd = bot.get_my_commands(scope=None, language_code=None)
+print([c.to_json() for c in cmd])
diff --git a/examples/skip_updates_example.py b/examples/skip_updates_example.py
new file mode 100644
index 000000000..dee5dd2bb
--- /dev/null
+++ b/examples/skip_updates_example.py
@@ -0,0 +1,13 @@
+import telebot
+
+bot = telebot.TeleBot("TOKEN")
+
+@bot.message_handler(commands=['start', 'help'])
+def send_welcome(message):
+ bot.reply_to(message, "Howdy, how are you doing?")
+
+@bot.message_handler(func=lambda message: True)
+def echo_all(message):
+ bot.reply_to(message, message.text)
+
+bot.infinity_polling(skip_pending=True)# Skip pending skips old updates
diff --git a/examples/stars_payment.py b/examples/stars_payment.py
new file mode 100644
index 000000000..e261a5e31
--- /dev/null
+++ b/examples/stars_payment.py
@@ -0,0 +1,64 @@
+# Import required libraries
+import telebot
+from telebot import types
+
+bot = telebot.TeleBot('TOKEN')
+
+# Product prices in stars
+PRICES = {
+ '10 Stars': 10, # $1.00 - Entry level package
+ '50 Stars': 45, # $4.50 - Medium package with 10% discount
+ '100 Stars': 80, # $8.00 - Large package with 20% discount
+ '500 Stars': 350 # $35.00 - Bulk package with 30% discount
+}
+
+# Handler for /start command - Then the bot will send amount stars to purchase
+@bot.message_handler(commands=['start'])
+def send_welcome(message):
+ # Create a custom keyboard with 2 buttons per row
+ markup = types.ReplyKeyboardMarkup(row_width=2)
+ # Generate buttons for each product in our PRICES dictionary
+ buttons = [types.KeyboardButton(product) for product in PRICES.keys()]
+ # Add all buttons to the markup
+ markup.add(*buttons)
+
+ # Send welcome message with the custom keyboard
+ bot.reply_to(message,
+ "Welcome to Stars Payment Bot!\nPlease select amount of stars to purchase:",
+ reply_markup=markup)
+
+# Handler for when user selects a product from the keyboard
+@bot.message_handler(func=lambda message: message.text in PRICES.keys())
+def handle_product_selection(message):
+ # Get selected product and its price
+ product = message.text
+ price = PRICES[product]
+
+ # Create invoice with product details
+ prices = [types.LabeledPrice(label=product, amount=price)]
+
+ # Send payment invoice to user
+ bot.send_invoice(
+ message.chat.id, # Chat ID to send invoice to
+ title=f"Purchase {product}", # Title of the invoice
+ description=f"Buy {product} for your account", # Description shown on invoice
+ provider_token='', # Payment provider token (empty for testing)
+ currency='XTR', # Currency code
+ prices=prices, # List of prices (we only have one item)
+ start_parameter='stars-payment', # Deep-linking parameter
+ invoice_payload=product # Payload to identify the product after payment
+ )
+
+# Pre-checkout handler - Called before payment is completed
+@bot.pre_checkout_query_handler(func=lambda query: True)
+def process_pre_checkout_query(pre_checkout_query):
+ bot.answer_pre_checkout_query(pre_checkout_query.id, ok=True)
+
+# Handler for successful payments
+@bot.message_handler(content_types=['successful_payment'])
+def handle_successful_payment(message):
+ # Get the product that was purchased from the invoice payload
+ product = message.successful_payment.invoice_payload
+ bot.reply_to(message,
+ f"Payment for {product} successful!")
+bot.polling()
diff --git a/examples/step_example.py b/examples/step_example.py
index 0fc17e538..7c35bad71 100644
--- a/examples/step_example.py
+++ b/examples/step_example.py
@@ -68,7 +68,7 @@ def process_sex_step(message):
if (sex == u'Male') or (sex == u'Female'):
user.sex = sex
else:
- raise Exception()
+ raise Exception("Unknown sex")
bot.send_message(chat_id, 'Nice to meet you ' + user.name + '\n Age:' + str(user.age) + '\n Sex:' + user.sex)
except Exception as e:
bot.reply_to(message, 'oooops')
@@ -83,4 +83,4 @@ def process_sex_step(message):
# WARNING It will work only if enable_save_next_step_handlers was called!
bot.load_next_step_handlers()
-bot.polling()
+bot.infinity_polling()
diff --git a/examples/telebot_bot/telebot_bot.py b/examples/telebot_bot/telebot_bot.py
index ac6b63cbf..112070755 100644
--- a/examples/telebot_bot/telebot_bot.py
+++ b/examples/telebot_bot/telebot_bot.py
@@ -81,4 +81,4 @@ def listener(messages):
bot.set_update_listener(listener)
-bot.polling()
+bot.infinity_polling()
diff --git a/examples/timer_bot.py b/examples/timer_bot.py
new file mode 100644
index 000000000..3802dbfee
--- /dev/null
+++ b/examples/timer_bot.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+
+# This is a simple bot with schedule timer
+# https://schedule.readthedocs.io
+
+import time, threading, schedule
+from telebot import TeleBot
+
+API_TOKEN = ''
+bot = TeleBot(API_TOKEN)
+
+
+@bot.message_handler(commands=['help', 'start'])
+def send_welcome(message):
+ bot.reply_to(message, "Hi! Use /set to set a timer")
+
+
+def beep(chat_id) -> None:
+ """Send the beep message."""
+ bot.send_message(chat_id, text='Beep!')
+
+
+@bot.message_handler(commands=['set'])
+def set_timer(message):
+ args = message.text.split()
+ if len(args) > 1 and args[1].isdigit():
+ sec = int(args[1])
+ schedule.every(sec).seconds.do(beep, message.chat.id).tag(message.chat.id)
+ else:
+ bot.reply_to(message, 'Usage: /set ')
+
+
+@bot.message_handler(commands=['unset'])
+def unset_timer(message):
+ schedule.clear(message.chat.id)
+
+
+if __name__ == '__main__':
+ threading.Thread(target=bot.infinity_polling, name='bot_infinity_polling', daemon=True).start()
+ while True:
+ schedule.run_pending()
+ time.sleep(1)
diff --git a/examples/webhook_examples/README.md b/examples/webhook_examples/README.md
index b1e435149..532d13e65 100644
--- a/examples/webhook_examples/README.md
+++ b/examples/webhook_examples/README.md
@@ -1,6 +1,6 @@
# Webhook examples using pyTelegramBotAPI
-There are 4 examples in this directory using different libraries:
+There are 5 examples in this directory using different libraries:
* **Python (CPython):** *webhook_cpython_echo_bot.py*
* **Pros:**
@@ -37,9 +37,25 @@ There are 4 examples in this directory using different libraries:
* **Pros:**
* It's a web application framework
* Python 3 compatible
- * Asynchronous, excellent perfomance
+ * Asynchronous, excellent performance
* Utilizes new async/await syntax
* **Cons:**
* Requires Python 3.4.2+, don't work with Python 2
-*Latest update of this document: 2017-01-30*
+* **Twisted (20.3.0):** *webhook_twisted_echo_bot.py*
+ * **Pros:**
+ * Asynchronous event-driven networking engine
+ * Very high performance
+ * Built-in support for many internet protocols
+ * **Cons:**
+ * Twisted is low-level, which may be good or bad depending on use case
+ * Considerable learning curve - reading docs is a must.
+* **FastAPI(0.70.1):** *webhook_fastapi_echo_bot.py*
+ * **Pros:**
+ * Can be written for both sync and async
+ * Good documentation
+ * **Cons:**
+ * Requires python 3.6+
+
+
+*Latest update of this document: 01-03-2022
diff --git a/examples/webhook_examples/run_webhooks.py b/examples/webhook_examples/run_webhooks.py
new file mode 100644
index 000000000..eeac2d142
--- /dev/null
+++ b/examples/webhook_examples/run_webhooks.py
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+
+# This is a simple echo bot using the decorator mechanism.
+# It echoes any incoming text messages.
+# Example on built-in function to receive and process webhooks.
+
+import telebot
+
+API_TOKEN = 'TOKEN'
+
+bot = telebot.TeleBot(API_TOKEN)
+
+WEBHOOK_SSL_CERT = './webhook_cert.pem' # Path to the ssl certificate
+WEBHOOK_SSL_PRIV = './webhook_pkey.pem' # Path to the ssl private key
+DOMAIN = '1.2.3.4' # either domain, or ip address of vps
+
+# Quick'n'dirty SSL certificate generation:
+#
+# openssl genrsa -out webhook_pkey.pem 2048
+# openssl req -new -x509 -days 3650 -key webhook_pkey.pem -out webhook_cert.pem
+#
+# When asked for "Common Name (e.g. server FQDN or YOUR name)" you should reply
+# with the same value in you put in WEBHOOK_HOST
+
+
+# Handle '/start' and '/help'
+@bot.message_handler(commands=['help', 'start'])
+def send_welcome(message):
+ bot.reply_to(message, """\
+Hi there, I am EchoBot.
+I am here to echo your kind words back to you. Just say anything nice and I'll say the exact same thing to you!\
+""")
+
+
+# Handle all other messages with content_type 'text' (content_types defaults to ['text'])
+@bot.message_handler(func=lambda message: True)
+def echo_message(message):
+ bot.reply_to(message, message.text)
+
+
+bot.run_webhooks(
+ listen=DOMAIN,
+ certificate=WEBHOOK_SSL_CERT,
+ certificate_key=WEBHOOK_SSL_PRIV
+)
\ No newline at end of file
diff --git a/examples/webhook_examples/webhook_fastapi_echo_bot.py b/examples/webhook_examples/webhook_fastapi_echo_bot.py
new file mode 100644
index 000000000..015c35644
--- /dev/null
+++ b/examples/webhook_examples/webhook_fastapi_echo_bot.py
@@ -0,0 +1,86 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# This is a simple echo bot using decorators and webhook with fastapi
+# It echoes any incoming text messages and does not use the polling method.
+
+import logging
+import fastapi
+import uvicorn
+import telebot
+
+API_TOKEN = 'TOKEN'
+
+WEBHOOK_HOST = ''
+WEBHOOK_PORT = 8443 # 443, 80, 88 or 8443 (port need to be 'open')
+WEBHOOK_LISTEN = '0.0.0.0' # In some VPS you may need to put here the IP addr
+
+WEBHOOK_SSL_CERT = './webhook_cert.pem' # Path to the ssl certificate
+WEBHOOK_SSL_PRIV = './webhook_pkey.pem' # Path to the ssl private key
+
+# Quick'n'dirty SSL certificate generation:
+#
+# openssl genrsa -out webhook_pkey.pem 2048
+# openssl req -new -x509 -days 3650 -key webhook_pkey.pem -out webhook_cert.pem
+#
+# When asked for "Common Name (e.g. server FQDN or YOUR name)" you should reply
+# with the same value in you put in WEBHOOK_HOST
+
+WEBHOOK_URL_BASE = "https://{}:{}".format(WEBHOOK_HOST, WEBHOOK_PORT)
+WEBHOOK_URL_PATH = "/{}/".format(API_TOKEN)
+
+logger = telebot.logger
+telebot.logger.setLevel(logging.INFO)
+
+bot = telebot.TeleBot(API_TOKEN)
+
+app = fastapi.FastAPI(docs=None, redoc_url=None)
+
+
+@app.post(f'/{API_TOKEN}/')
+def process_webhook(update: dict):
+ """
+ Process webhook calls
+ """
+ if update:
+ update = telebot.types.Update.de_json(update)
+ bot.process_new_updates([update])
+ else:
+ return
+
+
+@bot.message_handler(commands=['help', 'start'])
+def send_welcome(message):
+ """
+ Handle '/start' and '/help'
+ """
+ bot.reply_to(message,
+ ("Hi there, I am EchoBot.\n"
+ "I am here to echo your kind words back to you."))
+
+
+@bot.message_handler(func=lambda message: True, content_types=['text'])
+def echo_message(message):
+ """
+ Handle all other messages
+ """
+ bot.reply_to(message, message.text)
+
+
+# Remove webhook, it fails sometimes the set if there is a previous webhook
+bot.remove_webhook()
+
+# Set webhook
+bot.set_webhook(
+ url=WEBHOOK_URL_BASE + WEBHOOK_URL_PATH,
+ certificate=open(WEBHOOK_SSL_CERT, 'r')
+)
+
+
+uvicorn.run(
+ app,
+ host=WEBHOOK_LISTEN,
+ port=WEBHOOK_PORT,
+ ssl_certfile=WEBHOOK_SSL_CERT,
+ ssl_keyfile=WEBHOOK_SSL_PRIV
+)
diff --git a/examples/webhook_examples/webhook_flask_heroku_echo.py b/examples/webhook_examples/webhook_flask_heroku_echo.py
index 7bbf2bf7c..a465abc1d 100644
--- a/examples/webhook_examples/webhook_flask_heroku_echo.py
+++ b/examples/webhook_examples/webhook_flask_heroku_echo.py
@@ -21,7 +21,9 @@ def echo_message(message):
@server.route('/' + TOKEN, methods=['POST'])
def getMessage():
- bot.process_new_updates([telebot.types.Update.de_json(request.stream.read().decode("utf-8"))])
+ json_string = request.get_data().decode('utf-8')
+ update = telebot.types.Update.de_json(json_string)
+ bot.process_new_updates([update])
return "!", 200
diff --git a/examples/webhook_examples/webhook_tornado_echo_bot.py b/examples/webhook_examples/webhook_tornado_echo_bot.py
index 171d2d74c..ccd48b197 100644
--- a/examples/webhook_examples/webhook_tornado_echo_bot.py
+++ b/examples/webhook_examples/webhook_tornado_echo_bot.py
@@ -5,6 +5,7 @@
# Documenation to Tornado: http://tornadoweb.org
import signal
+from typing import Optional, Awaitable
import tornado.httpserver
import tornado.ioloop
@@ -33,12 +34,18 @@
class Root(tornado.web.RequestHandler):
+ def data_received(self, chunk: bytes) -> Optional[Awaitable[None]]:
+ pass
+
def get(self):
self.write("Hi! This is webhook example!")
self.finish()
-class webhook_serv(tornado.web.RequestHandler):
+class WebhookServ(tornado.web.RequestHandler):
+ def data_received(self, chunk: bytes) -> Optional[Awaitable[None]]:
+ pass
+
def get(self):
self.write("What are you doing here?")
self.finish()
@@ -93,7 +100,7 @@ def send_welcome(message):
signal.signal(signal.SIGINT, signal_handler)
application = tornado.web.Application([
(r"/", Root),
- (r"/" + WEBHOOK_SECRET, webhook_serv)
+ (r"/" + WEBHOOK_SECRET, WebhookServ)
])
http_server = tornado.httpserver.HTTPServer(application, ssl_options={
diff --git a/examples/webhook_examples/webhook_twisted_echo_bot.py b/examples/webhook_examples/webhook_twisted_echo_bot.py
new file mode 100644
index 000000000..9a15190ae
--- /dev/null
+++ b/examples/webhook_examples/webhook_twisted_echo_bot.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# This is an example echo bot using webhook with Twisted network framework.
+# Updates are received with Twisted web server and processed in reactor thread pool.
+# Relevant docs:
+# https://twistedmatrix.com/documents/current/core/howto/reactor-basics.html
+# https://twistedmatrix.com/documents/current/web/howto/using-twistedweb.html
+
+import logging
+import telebot
+import json
+from twisted.internet import ssl, reactor
+from twisted.web.resource import Resource, ErrorPage
+from twisted.web.server import Site, Request
+
+API_TOKEN = ''
+
+WEBHOOK_HOST = ''
+WEBHOOK_PORT = 8443 # 443, 80, 88 or 8443 (port need to be 'open')
+WEBHOOK_LISTEN = '0.0.0.0' # In some VPS you may need to put here the IP addr
+
+WEBHOOK_SSL_CERT = './webhook_cert.pem' # Path to the ssl certificate
+WEBHOOK_SSL_PRIV = './webhook_pkey.pem' # Path to the ssl private key
+
+# Quick'n'dirty SSL certificate generation:
+#
+# openssl genrsa -out webhook_pkey.pem 2048
+# openssl req -new -x509 -days 3650 -key webhook_pkey.pem -out webhook_cert.pem
+#
+# When asked for "Common Name (e.g. server FQDN or YOUR name)" you should reply
+# with the same value in you put in WEBHOOK_HOST
+
+WEBHOOK_URL_BASE = "https://{}:{}".format(WEBHOOK_HOST, WEBHOOK_PORT)
+WEBHOOK_URL_PATH = "/{}/".format(API_TOKEN)
+
+logger = telebot.logger
+telebot.logger.setLevel(logging.INFO)
+bot = telebot.TeleBot(API_TOKEN)
+
+
+# Handle '/start' and '/help'
+@bot.message_handler(commands=['help', 'start'])
+def send_welcome(message):
+ bot.reply_to(message,
+ ("Hi there, I am EchoBot.\n"
+ "I am here to echo your kind words back to you."))
+
+
+# Handle all other messages
+@bot.message_handler(func=lambda message: True, content_types=['text'])
+def echo_message(message):
+ bot.reply_to(message, message.text)
+
+
+# Remove webhook, it fails sometimes the set if there is a previous webhook
+bot.remove_webhook()
+
+# Set webhook
+bot.set_webhook(url=WEBHOOK_URL_BASE + WEBHOOK_URL_PATH,
+ certificate=open(WEBHOOK_SSL_CERT, 'r'))
+
+
+# Process webhook calls
+class WebhookHandler(Resource):
+ isLeaf = True
+ def render_POST(self, request: Request):
+ request_body_dict = json.load(request.content)
+ update = telebot.types.Update.de_json(request_body_dict)
+ reactor.callInThread(lambda: bot.process_new_updates([update]))
+ return b''
+
+
+root = ErrorPage(403, 'Forbidden', '')
+root.putChild(API_TOKEN.encode(), WebhookHandler())
+site = Site(root)
+sslcontext = ssl.DefaultOpenSSLContextFactory(WEBHOOK_SSL_PRIV, WEBHOOK_SSL_CERT)
+reactor.listenSSL(8443, site, sslcontext)
+reactor.run()
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 000000000..d226c3d64
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,46 @@
+[build-system]
+requires = ["hatchling"]
+build-backend = "hatchling.build"
+
+[project]
+name = "pyTelegramBotAPI"
+version = "4.29.1"
+description = "Python Telegram bot API."
+authors = [{name = "eternnoir", email = "eternnoir@gmail.com"}]
+license = {text = "GPL2"}
+readme = "README.md"
+requires-python = ">=3.9"
+keywords = ["telegram", "bot", "api", "tools"]
+classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
+ "Environment :: Console",
+ "License :: OSI Approved :: GNU General Public License v2 (GPLv2)"
+]
+dependencies = ["requests"]
+
+[project.urls]
+Homepage = "https://github.com/eternnoir/pyTelegramBotAPI"
+Documentation = "https://pytba.readthedocs.org"
+Repository = "https://github.com/eternnoir/pyTelegramBotAPI"
+Issues = "https://github.com/eternnoir/pyTelegramBotAPI/issues"
+
+
+[project.optional-dependencies]
+json = ["ujson"]
+PIL = ["Pillow"]
+redis = ["redis>=3.4.1"]
+fastapi = ["fastapi"]
+uvicorn = ["uvicorn"]
+psutil = ["psutil"]
+coloredlogs = ["coloredlogs"]
+watchdog = ["watchdog"]
+
+
+[tool.hatch.build.targets.wheel]
+include = ["telebot/*"]
diff --git a/requirements.txt b/requirements.txt
index 1f9cd026a..ced176c9f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,4 @@
-py==1.4.29
-pytest==3.0.2
-requests==2.7.0
-six==1.9.0
-wheel==0.24.0
+pytest
+requests==2.32.4
+wheel==0.38.1
+aiohttp==3.12.14
diff --git a/setup.py b/setup.py
deleted file mode 100644
index a52df5372..000000000
--- a/setup.py
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env python
-from setuptools import setup
-from io import open
-
-def read(filename):
- with open(filename, encoding='utf-8') as file:
- return file.read()
-
-setup(name='pyTelegramBotAPI',
- version='3.6.6',
- description='Python Telegram bot api. ',
- long_description=read('README.md'),
- long_description_content_type="text/markdown",
- author='eternnoir',
- author_email='eternnoir@gmail.com',
- url='https://github.com/eternnoir/pyTelegramBotAPI',
- packages=['telebot'],
- license='GPL2',
- keywords='telegram bot api tools',
- install_requires=['requests', 'six'],
- extras_require={
- 'json': 'ujson',
- },
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.6',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Environment :: Console',
- 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
- ]
- )
diff --git a/telebot/__init__.py b/telebot/__init__.py
index 52a4e5abb..c4c9eab67 100644
--- a/telebot/__init__.py
+++ b/telebot/__init__.py
@@ -1,28 +1,55 @@
# -*- coding: utf-8 -*-
-from __future__ import print_function
+from datetime import datetime
import logging
-import os
-import pickle
import re
import sys
import threading
import time
+import traceback
+from typing import Any, Callable, List, Optional, Union, Dict
-import six
+# these imports are used to avoid circular import error
+import telebot.util
+import telebot.types
+import telebot.formatting
+
+# storage
+from telebot.storage import StatePickleStorage, StateMemoryStorage, StateStorageBase
+
+# random module to generate random string
+import random
+import string
+
+import ssl
logger = logging.getLogger('TeleBot')
+
formatter = logging.Formatter(
'%(asctime)s (%(filename)s:%(lineno)d %(threadName)s) %(levelname)s - %(name)s: "%(message)s"'
)
+import inspect
+
console_output_handler = logging.StreamHandler(sys.stderr)
console_output_handler.setFormatter(formatter)
logger.addHandler(console_output_handler)
logger.setLevel(logging.ERROR)
-from telebot import apihelper, types, util
+from telebot import apihelper, util, types
+from telebot.handler_backends import (
+ HandlerBackend, MemoryHandlerBackend, FileHandlerBackend, BaseMiddleware,
+ CancelUpdate, SkipHandler, State, ContinueHandling
+)
+from telebot.custom_filters import SimpleCustomFilter, AdvancedCustomFilter
+
+
+REPLY_MARKUP_TYPES = Union[
+ types.InlineKeyboardMarkup, types.ReplyKeyboardMarkup,
+ types.ReplyKeyboardRemove, types.ForceReply]
+
+
"""
Module : telebot
@@ -31,7 +58,7 @@
class Handler:
"""
- Class for (next step|reply) handlers
+ Class for (next step|reply) handlers.
"""
def __init__(self, callback, *args, **kwargs):
@@ -43,358 +70,1154 @@ def __getitem__(self, item):
return getattr(self, item)
-class Saver:
+class ExceptionHandler:
"""
- Class for saving (next step|reply) handlers
+ Class for handling exceptions while Polling
"""
- def __init__(self, handlers, filename, delay):
- self.handlers = handlers
- self.filename = filename
- self.delay = delay
- self.timer = threading.Timer(delay, self.save_handlers)
+ # noinspection PyMethodMayBeStatic,PyUnusedLocal
+ def handle(self, exception):
+ return False
- def start_save_timer(self):
- if not self.timer.is_alive():
- if self.delay <= 0:
- self.save_handlers()
- else:
- self.timer = threading.Timer(self.delay, self.save_handlers)
- self.timer.start()
- def save_handlers(self):
- self.dump_handlers(self.handlers, self.filename)
+class TeleBot:
+ """
+ This is the main synchronous class for Bot.
- def load_handlers(self, filename, del_file_after_loading=True):
- tmp = self.return_load_handlers(filename, del_file_after_loading=del_file_after_loading)
- if tmp is not None:
- self.handlers.update(tmp)
+ It allows you to add handlers for different kind of updates.
- @staticmethod
- def dump_handlers(handlers, filename, file_mode="wb"):
- dirs = filename.rsplit('/', maxsplit=1)[0]
- os.makedirs(dirs, exist_ok=True)
+ Usage:
- with open(filename + ".tmp", file_mode) as file:
- pickle.dump(handlers, file)
+ .. code-block:: python3
+ :caption: Creating instance of TeleBot
- if os.path.isfile(filename):
- os.remove(filename)
+ from telebot import TeleBot
+ bot = TeleBot('token') # get token from @BotFather
+ # now you can register other handlers/update listeners,
+ # and use bot methods.
- os.rename(filename + ".tmp", filename)
+ See more examples in examples/ directory:
+ https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples
- @staticmethod
- def return_load_handlers(filename, del_file_after_loading=True):
- if os.path.isfile(filename) and os.path.getsize(filename) > 0:
- with open(filename, "rb") as file:
- handlers = pickle.load(file)
+ .. note::
- if del_file_after_loading:
- os.remove(filename)
+ Install coloredlogs module to specify colorful_logs=True
- return handlers
+ :param token: Token of a bot, should be obtained from @BotFather
+ :type token: :obj:`str`
-class TeleBot:
- """ This is TeleBot Class
- Methods:
- getMe
- sendMessage
- forwardMessage
- deleteMessage
- sendPhoto
- sendAudio
- sendDocument
- sendSticker
- sendVideo
- sendVideoNote
- sendLocation
- sendChatAction
- getUserProfilePhotos
- getUpdates
- getFile
- kickChatMember
- unbanChatMember
- restrictChatMember
- promoteChatMember
- exportChatInviteLink
- setChatPhoto
- deleteChatPhoto
- setChatTitle
- setChatDescription
- pinChatMessage
- unpinChatMessage
- leaveChat
- getChat
- getChatAdministrators
- getChatMembersCount
- getChatMember
- answerCallbackQuery
- answerInlineQuery
- """
-
- def __init__(self, token, threaded=True, skip_pending=False, num_threads=2):
- """
- :param token: bot API token
- :return: Telebot object.
- """
+ :param parse_mode: Default parse mode, defaults to None
+ :type parse_mode: :obj:`str`, optional
- self.token = token
- self.update_listener = []
- self.skip_pending = skip_pending
+ :param threaded: Threaded or not, defaults to True
+ :type threaded: :obj:`bool`, optional
+
+ :param skip_pending: Skips pending updates, defaults to False
+ :type skip_pending: :obj:`bool`, optional
+
+ :param num_threads: Number of maximum parallel threads, defaults to 2
+ :type num_threads: :obj:`int`, optional
+
+ :param next_step_backend: Next step backend class, defaults to None
+ :type next_step_backend: :class:`telebot.handler_backends.HandlerBackend`, optional
+
+ :param reply_backend: Reply step handler class, defaults to None
+ :type reply_backend: :class:`telebot.handler_backends.HandlerBackend`, optional
+
+ :param exception_handler: Exception handler to handle errors, defaults to None
+ :type exception_handler: :class:`telebot.ExceptionHandler`, optional
+
+ :param last_update_id: Last update's id, defaults to 0
+ :type last_update_id: :obj:`int`, optional
+
+ :param suppress_middleware_excepions: Supress middleware exceptions, defaults to False
+ :type suppress_middleware_excepions: :obj:`bool`, optional
+
+ :param state_storage: Storage for states, defaults to StateMemoryStorage()
+ :type state_storage: :class:`telebot.storage.StateStorageBase`, optional
+
+ :param use_class_middlewares: Use class middlewares, defaults to False
+ :type use_class_middlewares: :obj:`bool`, optional
+
+ :param disable_web_page_preview: Default value for disable_web_page_preview, defaults to None
+ :type disable_web_page_preview: :obj:`bool`, optional
+
+ :param disable_notification: Default value for disable_notification, defaults to None
+ :type disable_notification: :obj:`bool`, optional
+
+ :param protect_content: Default value for protect_content, defaults to None
+ :type protect_content: :obj:`bool`, optional
+
+ :param allow_sending_without_reply: Default value for allow_sending_without_reply, defaults to None
+ :type allow_sending_without_reply: :obj:`bool`, optional
+ :param colorful_logs: Outputs colorful logs
+ :type colorful_logs: :obj:`bool`, optional
+
+ :param validate_token: Validate token, defaults to True;
+ :type validate_token: :obj:`bool`, optional
+
+ :raises ImportError: If coloredlogs module is not installed and colorful_logs is True
+ :raises ValueError: If token is invalid
+ """
+
+ def __init__(
+ self, token: str, parse_mode: Optional[str]=None, threaded: Optional[bool]=True,
+ skip_pending: Optional[bool]=False, num_threads: Optional[int]=2,
+ next_step_backend: Optional[HandlerBackend]=None, reply_backend: Optional[HandlerBackend]=None,
+ exception_handler: Optional[ExceptionHandler]=None, last_update_id: Optional[int]=0,
+ suppress_middleware_excepions: Optional[bool]=False, state_storage: Optional[StateStorageBase]=StateMemoryStorage(),
+ use_class_middlewares: Optional[bool]=False,
+ disable_web_page_preview: Optional[bool]=None,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ colorful_logs: Optional[bool]=False,
+ validate_token: Optional[bool]=True
+ ):
+
+ # update-related
+ self.token = token
+ self.skip_pending = skip_pending # backward compatibility
+ self.last_update_id = last_update_id
+
+ # properties
+ self.suppress_middleware_excepions = suppress_middleware_excepions
+ self.parse_mode = parse_mode
+ self.disable_web_page_preview = disable_web_page_preview
+ self.disable_notification = disable_notification
+ self.protect_content = protect_content
+ self.allow_sending_without_reply = allow_sending_without_reply
+ self.webhook_listener = None
+ self._user = None
+
+ if validate_token:
+ util.validate_token(self.token)
+
+ self.bot_id: Union[int, None] = util.extract_bot_id(self.token) # subject to change in future, unspecified
+
+ # logs-related
+ if colorful_logs:
+ try:
+ # noinspection PyPackageRequirements
+ import coloredlogs
+ coloredlogs.install(logger=logger, level=logger.level)
+ except ImportError:
+ raise ImportError(
+ 'Install coloredlogs module to use colorful_logs option.'
+ )
+
+ # threading-related
self.__stop_polling = threading.Event()
- self.last_update_id = 0
self.exc_info = None
- # key: message_id, value: handler list
- self.reply_handlers = {}
+ # states & register_next_step_handler
+ self.current_states = state_storage
+ self.next_step_backend = next_step_backend
+ if not self.next_step_backend:
+ self.next_step_backend = MemoryHandlerBackend()
- # key: chat_id, value: handler list
- self.next_step_handlers = {}
+ self.reply_backend = reply_backend
+ if not self.reply_backend:
+ self.reply_backend = MemoryHandlerBackend()
- self.next_step_saver = None
- self.reply_saver = None
+ # handlers
+ self.exception_handler = exception_handler
+ self.update_listener = []
self.message_handlers = []
self.edited_message_handlers = []
self.channel_post_handlers = []
self.edited_channel_post_handlers = []
+ self.message_reaction_handlers = []
+ self.message_reaction_count_handlers = []
self.inline_handlers = []
self.chosen_inline_handlers = []
self.callback_query_handlers = []
self.shipping_query_handlers = []
self.pre_checkout_query_handlers = []
-
+ self.poll_handlers = []
+ self.poll_answer_handlers = []
+ self.my_chat_member_handlers = []
+ self.chat_member_handlers = []
+ self.chat_join_request_handlers = []
+ self.chat_boost_handlers = []
+ self.removed_chat_boost_handlers = []
+ self.business_connection_handlers = []
+ self.business_message_handlers = []
+ self.edited_business_message_handlers = []
+ self.deleted_business_messages_handlers = []
+ self.purchased_paid_media_handlers = []
+
+ self.custom_filters = {}
+ self.state_handlers = []
+
+ # middlewares
+ self.use_class_middlewares = use_class_middlewares
+ if apihelper.ENABLE_MIDDLEWARE and not use_class_middlewares:
+ self.typed_middleware_handlers = {
+ 'message': [],
+ 'edited_message': [],
+ 'channel_post': [],
+ 'edited_channel_post': [],
+ 'message_reaction': [],
+ 'message_reaction_count': [],
+ 'inline_query': [],
+ 'chosen_inline_result': [],
+ 'callback_query': [],
+ 'shipping_query': [],
+ 'pre_checkout_query': [],
+ 'poll': [],
+ 'poll_answer': [],
+ 'my_chat_member': [],
+ 'chat_member': [],
+ 'chat_join_request': [],
+ 'chat_boost': [],
+ 'removed_chat_boost': [],
+ 'business_connection': [],
+ 'business_message': [],
+ 'edited_business_message': [],
+ 'deleted_business_messages': [],
+ }
+ self.default_middleware_handlers = []
+ if apihelper.ENABLE_MIDDLEWARE and use_class_middlewares:
+ self.typed_middleware_handlers = None
+ logger.error(
+ 'You are using class based middlewares while having ENABLE_MIDDLEWARE set to True. This is not recommended.'
+ )
+ self.middlewares = [] if use_class_middlewares else None
+
+ # threads
self.threaded = threaded
if self.threaded:
- self.worker_pool = util.ThreadPool(num_threads=num_threads)
+ self.worker_pool = util.ThreadPool(self, num_threads=num_threads)
+
+ @property
+ def user(self) -> types.User:
+ """
+ The User object representing this bot.
+ Equivalent to bot.get_me() but the result is cached so only one API call is needed.
+
+ :return: Bot's info.
+ :rtype: :class:`telebot.types.User`
+ """
+ if not self._user:
+ self._user = self.get_me()
+ return self._user
+
+ def enable_save_next_step_handlers(self, delay: Optional[int]=120, filename: Optional[str]="./.handler-saves/step.save"):
+ """
+ Enable saving next step handlers (by default saving disabled)
+
+ This function explicitly assigns FileHandlerBackend (instead of Saver) just to keep backward
+ compatibility whose purpose was to enable file saving capability for handlers. And the same
+ implementation is now available with FileHandlerBackend
+
+ :param delay: Delay between changes in handlers and saving, defaults to 120
+ :type delay: :obj:`int`, optional
- def enable_save_next_step_handlers(self, delay=120, filename="./.handler-saves/step.save"):
+ :param filename: Filename of save file, defaults to "./.handler-saves/step.save"
+ :type filename: :obj:`str`, optional
+
+ :return: None
+ """
+ self.next_step_backend = FileHandlerBackend(self.next_step_backend.handlers, filename, delay)
+
+
+ def enable_saving_states(self, filename: Optional[str]="./.state-save/states.pkl"):
"""
- Enable saving next step handlers (by default saving disable)
+ Enable saving states (by default saving disabled)
- :param delay: Delay between changes in handlers and saving
- :param filename: Filename of save file
+ .. note::
+ It is recommended to pass a :class:`~telebot.storage.StatePickleStorage` instance as state_storage
+ to TeleBot class.
+
+ :param filename: Filename of saving file, defaults to "./.state-save/states.pkl"
+ :type filename: :obj:`str`, optional
"""
- self.next_step_saver = Saver(self.next_step_handlers, filename, delay)
+ self.current_states = StatePickleStorage(file_path=filename)
+ self.current_states.create_dir()
+
def enable_save_reply_handlers(self, delay=120, filename="./.handler-saves/reply.save"):
"""
Enable saving reply handlers (by default saving disable)
- :param delay: Delay between changes in handlers and saving
- :param filename: Filename of save file
+ This function explicitly assigns FileHandlerBackend (instead of Saver) just to keep backward
+ compatibility whose purpose was to enable file saving capability for handlers. And the same
+ implementation is now available with FileHandlerBackend
+
+ :param delay: Delay between changes in handlers and saving, defaults to 120
+ :type delay: :obj:`int`, optional
+
+ :param filename: Filename of save file, defaults to "./.handler-saves/reply.save"
+ :type filename: :obj:`str`, optional
"""
- self.reply_saver = Saver(self.reply_handlers, filename, delay)
+ self.reply_backend = FileHandlerBackend(self.reply_backend.handlers, filename, delay)
+
def disable_save_next_step_handlers(self):
"""
Disable saving next step handlers (by default saving disable)
+
+ This function is left to keep backward compatibility whose purpose was to disable file saving capability
+ for handlers. For the same purpose, MemoryHandlerBackend is reassigned as a new next_step_backend backend
+ instead of FileHandlerBackend.
"""
- self.next_step_saver = None
+ self.next_step_backend = MemoryHandlerBackend(self.next_step_backend.handlers)
+
def disable_save_reply_handlers(self):
"""
Disable saving next step handlers (by default saving disable)
+
+ This function is left to keep backward compatibility whose purpose was to disable file saving capability
+ for handlers. For the same purpose, MemoryHandlerBackend is reassigned as a new reply_backend backend
+ instead of FileHandlerBackend.
"""
- self.reply_saver = None
+ self.reply_backend = MemoryHandlerBackend(self.reply_backend.handlers)
+
def load_next_step_handlers(self, filename="./.handler-saves/step.save", del_file_after_loading=True):
"""
Load next step handlers from save file
- :param filename: Filename of the file where handlers was saved
- :param del_file_after_loading: Is passed True, after loading save file will be deleted
+ This function is left to keep backward compatibility whose purpose was to load handlers from file with the
+ help of FileHandlerBackend and is only recommended to use if next_step_backend was assigned as
+ FileHandlerBackend before entering this function
+
+
+ :param filename: Filename of the file where handlers was saved, defaults to "./.handler-saves/step.save"
+ :type filename: :obj:`str`, optional
+
+ :param del_file_after_loading: If True is passed, after the loading file will be deleted, defaults to True
+ :type del_file_after_loading: :obj:`bool`, optional
"""
- self.next_step_saver.load_handlers(filename, del_file_after_loading)
+ self.next_step_backend.load_handlers(filename, del_file_after_loading)
+
def load_reply_handlers(self, filename="./.handler-saves/reply.save", del_file_after_loading=True):
"""
Load reply handlers from save file
- :param filename: Filename of the file where handlers was saved
- :param del_file_after_loading: Is passed True, after loading save file will be deleted
+ This function is left to keep backward compatibility whose purpose was to load handlers from file with the
+ help of FileHandlerBackend and is only recommended to use if reply_backend was assigned as
+ FileHandlerBackend before entering this function
+
+ :param filename: Filename of the file where handlers was saved, defaults to "./.handler-saves/reply.save"
+ :type filename: :obj:`str`, optional
+
+ :param del_file_after_loading: If True is passed, after the loading file will be deleted, defaults to True, defaults to True
+ :type del_file_after_loading: :obj:`bool`, optional
+ """
+ self.reply_backend.load_handlers(filename, del_file_after_loading)
+
+
+ def set_webhook(self, url: Optional[str]=None, certificate: Optional[Union[str, Any]]=None, max_connections: Optional[int]=None,
+ allowed_updates: Optional[List[str]]=None, ip_address: Optional[str]=None,
+ drop_pending_updates: Optional[bool] = None, timeout: Optional[int]=None, secret_token: Optional[str]=None) -> bool:
+ """
+ Use this method to specify a URL and receive incoming updates via an outgoing webhook.
+ Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL,
+ containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after
+ a reasonable amount of attempts. Returns True on success.
+
+ If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token.
+ If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#setwebhook
+
+ :param url: HTTPS URL to send updates to. Use an empty string to remove webhook integration, defaults to None
+ :type url: :obj:`str`, optional
+
+ :param certificate: Upload your public key certificate so that the root certificate in use can be checked, defaults to None
+ :type certificate: :class:`str`, optional
+
+ :param max_connections: The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100.
+ Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput,
+ defaults to None
+ :type max_connections: :obj:`int`, optional
+
+ :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example,
+ specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update
+ for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default).
+ If not specified, the previous setting will be used.
+
+ Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received
+ for a short period of time. Defaults to None
+
+ :type allowed_updates: :obj:`list`, optional
+
+ :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address
+ resolved through DNS, defaults to None
+ :type ip_address: :obj:`str`, optional
+
+ :param drop_pending_updates: Pass True to drop all pending updates, defaults to None
+ :type drop_pending_updates: :obj:`bool`, optional
+
+ :param timeout: Timeout of a request, defaults to None
+ :type timeout: :obj:`int`, optional
+
+ :param secret_token: A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters.
+ Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you. Defaults to None
+ :type secret_token: :obj:`str`, optional
+
+ :return: True on success.
+ :rtype: :obj:`bool` if the request was successful.
+ """
+
+ return apihelper.set_webhook(
+ self.token, url = url, certificate = certificate, max_connections = max_connections,
+ allowed_updates = allowed_updates, ip_address = ip_address, drop_pending_updates = drop_pending_updates,
+ timeout = timeout, secret_token = secret_token)
+
+
+ def run_webhooks(self,
+ listen: Optional[str]="127.0.0.1",
+ port: Optional[int]=443,
+ url_path: Optional[str]=None,
+ certificate: Optional[str]=None,
+ certificate_key: Optional[str]=None,
+ webhook_url: Optional[str]=None,
+ max_connections: Optional[int]=None,
+ allowed_updates: Optional[List]=None,
+ ip_address: Optional[str]=None,
+ drop_pending_updates: Optional[bool] = None,
+ timeout: Optional[int]=None,
+ secret_token: Optional[str]=None,
+ secret_token_length: Optional[int]=20):
+ """
+ This class sets webhooks and listens to a given url and port.
+
+ Requires fastapi, uvicorn, and latest version of starlette.
+
+ :param listen: IP address to listen to, defaults to "127.0.0.1"
+ :type listen: :obj:`str`, optional
+
+ :param port: A port which will be used to listen to webhooks., defaults to 443
+ :type port: :obj:`int`, optional
+
+ :param url_path: Path to the webhook. Defaults to /token, defaults to None
+ :type url_path: :obj:`str`, optional
+
+ :param certificate: Path to the certificate file, defaults to None
+ :type certificate: :obj:`str`, optional
+
+ :param certificate_key: Path to the certificate key file, defaults to None
+ :type certificate_key: :obj:`str`, optional
+
+ :param webhook_url: Webhook URL to be set, defaults to None
+ :type webhook_url: :obj:`str`, optional
+
+ :param max_connections: Maximum allowed number of simultaneous HTTPS connections
+ to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server,
+ and higher values to increase your bot's throughput., defaults to None
+ :type max_connections: :obj:`int`, optional
+
+ :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”]
+ to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default).
+ If not specified, the previous setting will be used. defaults to None
+ :type allowed_updates: :obj:`list`, optional
+
+ :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS, defaults to None
+ :type ip_address: :obj:`str`, optional
+
+ :param drop_pending_updates: Pass True to drop all pending updates, defaults to None
+ :type drop_pending_updates: :obj:`bool`, optional
+
+ :param timeout: Request connection timeout, defaults to None
+ :type timeout: :obj:`int`, optional
+
+ :param secret_token: Secret token to be used to verify the webhook request, defaults to None
+ :type secret_token: :obj:`str`, optional
+
+ :param secret_token_length: Length of a secret token, defaults to 20
+ :type secret_token_length: :obj:`int`, optional
+
+ :raises ImportError: If necessary libraries were not installed.
"""
- self.reply_saver.load_handlers(filename)
- def set_webhook(self, url=None, certificate=None, max_connections=None, allowed_updates=None):
- return apihelper.set_webhook(self.token, url, certificate, max_connections, allowed_updates)
+ # generate secret token if not set
+ if not secret_token:
+ secret_token = ''.join(random.choices(string.ascii_uppercase + string.digits, k=secret_token_length))
- def delete_webhook(self):
+ if not url_path:
+ url_path = self.token + '/'
+ if url_path[-1] != '/': url_path += '/'
+
+ protocol = "https" if certificate else "http"
+ if not webhook_url:
+ webhook_url = "{}://{}:{}/{}".format(protocol, listen, port, url_path)
+
+ if certificate and certificate_key:
+ # noinspection PyTypeChecker
+ ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
+ ssl_ctx.load_cert_chain(certificate, certificate_key)
+
+ # open certificate if it exists
+ cert_file = open(certificate, 'rb') if certificate else None
+ self.set_webhook(
+ url=webhook_url,
+ certificate=cert_file,
+ max_connections=max_connections,
+ allowed_updates=allowed_updates,
+ ip_address=ip_address,
+ drop_pending_updates=drop_pending_updates,
+ timeout=timeout,
+ secret_token=secret_token
+ )
+ if cert_file: cert_file.close()
+
+ ssl_context = (certificate, certificate_key) if certificate else (None, None)
+ # webhooks module
+ try:
+ from telebot.ext.sync import SyncWebhookListener
+ except (NameError, ImportError):
+ raise ImportError("Please install uvicorn and fastapi in order to use `run_webhooks` method.")
+ self.webhook_listener = SyncWebhookListener(bot=self, secret_token=secret_token, host=listen, port=port, ssl_context=ssl_context, url_path='/'+url_path)
+ self.webhook_listener.run_app()
+
+
+ def delete_webhook(self, drop_pending_updates: Optional[bool]=None, timeout: Optional[int]=None) -> bool:
"""
Use this method to remove webhook integration if you decide to switch back to getUpdates.
- :return: bool
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletewebhook
+
+ :param drop_pending_updates: Pass True to drop all pending updates, defaults to None
+ :type drop_pending_updates: :obj: `bool`, optional
+
+ :param timeout: Request connection timeout, defaults to None
+ :type timeout: :obj:`int`, optional
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.delete_webhook(
+ self.token, drop_pending_updates=drop_pending_updates, timeout=timeout)
+
+
+ def get_webhook_info(self, timeout: Optional[int]=None) -> types.WebhookInfo:
+ """
+ Use this method to get current webhook status. Requires no parameters.
+ On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getwebhookinfo
+
+ :param timeout: Request connection timeout
+ :type timeout: :obj:`int`, optional
+
+ :return: On success, returns a WebhookInfo object.
+ :rtype: :class:`telebot.types.WebhookInfo`
"""
- return apihelper.delete_webhook(self.token)
+ return types.WebhookInfo.de_json(
+ apihelper.get_webhook_info(self.token, timeout=timeout)
+ )
- def get_webhook_info(self):
- result = apihelper.get_webhook_info(self.token)
- return types.WebhookInfo.de_json(result)
- def remove_webhook(self):
+ def remove_webhook(self) -> bool:
+ """
+ Deletes webhooks using set_webhook() function.
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
return self.set_webhook() # No params resets webhook
- def get_updates(self, offset=None, limit=None, timeout=20, allowed_updates=None):
+
+ def get_updates(self, offset: Optional[int]=None, limit: Optional[int]=None,
+ timeout: Optional[int]=20, allowed_updates: Optional[List[str]]=None,
+ long_polling_timeout: int=20) -> List[types.Update]:
"""
Use this method to receive incoming updates using long polling (wiki). An Array of Update objects is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getupdates
+
+
+ :param offset: Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates.
+ By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset
+ higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue.
+ All previous updates will forgotten.
+ :type offset: :obj:`int`, optional
+
+ :param limit: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.
+ :type limit: :obj:`int`, optional
+
+ :param timeout: Request connection timeout
+ :type timeout: :obj:`int`, optional
+
:param allowed_updates: Array of string. List the types of updates you want your bot to receive.
- :param offset: Integer. Identifier of the first update to be returned.
- :param limit: Integer. Limits the number of updates to be retrieved.
- :param timeout: Integer. Timeout in seconds for long polling.
- :return: array of Updates
+ :type allowed_updates: :obj:`list`, optional
+
+ :param long_polling_timeout: Timeout in seconds for long polling.
+ :type long_polling_timeout: :obj:`int`, optional
+
+ :return: An Array of Update objects is returned.
+ :rtype: :obj:`list` of :class:`telebot.types.Update`
"""
- json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates)
- ret = []
- for ju in json_updates:
- ret.append(types.Update.de_json(ju))
- return ret
+ json_updates = apihelper.get_updates(
+ self.token, offset=offset, limit=limit, timeout=timeout, allowed_updates=allowed_updates,
+ long_polling_timeout=long_polling_timeout)
+ return [types.Update.de_json(ju) for ju in json_updates]
def __skip_updates(self):
"""
- Get and discard all pending updates before first poll of the bot
- :return: total updates skipped
+ Get and discard all pending updates before first poll of the bot.
+
+ :meta private:
+
+ :return:
"""
- total = 0
- updates = self.get_updates(offset=self.last_update_id, timeout=1)
- while updates:
- total += len(updates)
- for update in updates:
- if update.update_id > self.last_update_id:
- self.last_update_id = update.update_id
- updates = self.get_updates(offset=self.last_update_id + 1, timeout=1)
- return total
+ self.get_updates(offset=-1)
- def __retrieve_updates(self, timeout=20):
+ def __retrieve_updates(self, timeout=20, long_polling_timeout=20, allowed_updates=None):
"""
Retrieves any updates from the Telegram API.
Registered listeners and applicable message handlers will be notified when a new message arrives.
+
+ :meta private:
+
:raises ApiException when a call has failed.
"""
if self.skip_pending:
- logger.debug('Skipped {0} pending messages'.format(self.__skip_updates()))
+ self.__skip_updates()
+ logger.debug('Skipped all pending messages')
self.skip_pending = False
- updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout)
+ updates = self.get_updates(offset=(self.last_update_id + 1),
+ allowed_updates=allowed_updates,
+ timeout=timeout, long_polling_timeout=long_polling_timeout)
self.process_new_updates(updates)
- def process_new_updates(self, updates):
- new_messages = []
- edited_new_messages = []
- new_channel_posts = []
- new_edited_channel_posts = []
- new_inline_querys = []
- new_chosen_inline_results = []
- new_callback_querys = []
- new_shipping_querys = []
- new_pre_checkout_querys = []
+ def process_new_updates(self, updates: List[types.Update]):
+ """
+ Processes new updates. Just pass list of subclasses of Update to this method.
+
+ :param updates: List of :class:`telebot.types.Update` objects.
+ :type updates: :obj:`list` of :class:`telebot.types.Update`
+
+ :return None:
+ """
+ upd_count = len(updates)
+ logger.debug('Received {0} new updates'.format(upd_count))
+ if upd_count == 0: return
+
+ new_messages = None
+ new_edited_messages = None
+ new_channel_posts = None
+ new_edited_channel_posts = None
+ new_message_reactions = None
+ new_message_reaction_counts = None
+ new_inline_queries = None
+ new_chosen_inline_results = None
+ new_callback_queries = None
+ new_shipping_queries = None
+ new_pre_checkout_queries = None
+ new_polls = None
+ new_poll_answers = None
+ new_my_chat_members = None
+ new_chat_members = None
+ new_chat_join_request = None
+ new_chat_boosts = None
+ new_removed_chat_boosts = None
+ new_business_connections = None
+ new_business_messages = None
+ new_edited_business_messages = None
+ new_deleted_business_messages = None
+ new_purchased_paid_media = None
for update in updates:
+ if apihelper.ENABLE_MIDDLEWARE and not self.use_class_middlewares:
+ try:
+ self.process_middlewares(update)
+ except Exception as e:
+ logger.error(str(e))
+ if not self.suppress_middleware_excepions:
+ raise
+ else:
+ if update.update_id > self.last_update_id: self.last_update_id = update.update_id
+ continue
+
if update.update_id > self.last_update_id:
self.last_update_id = update.update_id
if update.message:
+ if new_messages is None: new_messages = []
new_messages.append(update.message)
if update.edited_message:
- edited_new_messages.append(update.edited_message)
+ if new_edited_messages is None: new_edited_messages = []
+ new_edited_messages.append(update.edited_message)
if update.channel_post:
+ if new_channel_posts is None: new_channel_posts = []
new_channel_posts.append(update.channel_post)
if update.edited_channel_post:
+ if new_edited_channel_posts is None: new_edited_channel_posts = []
new_edited_channel_posts.append(update.edited_channel_post)
if update.inline_query:
- new_inline_querys.append(update.inline_query)
+ if new_inline_queries is None: new_inline_queries = []
+ new_inline_queries.append(update.inline_query)
if update.chosen_inline_result:
+ if new_chosen_inline_results is None: new_chosen_inline_results = []
new_chosen_inline_results.append(update.chosen_inline_result)
if update.callback_query:
- new_callback_querys.append(update.callback_query)
+ if new_callback_queries is None: new_callback_queries = []
+ new_callback_queries.append(update.callback_query)
if update.shipping_query:
- new_shipping_querys.append(update.shipping_query)
+ if new_shipping_queries is None: new_shipping_queries = []
+ new_shipping_queries.append(update.shipping_query)
if update.pre_checkout_query:
- new_pre_checkout_querys.append(update.pre_checkout_query)
-
- logger.debug('Received {0} new updates'.format(len(updates)))
- if len(new_messages) > 0:
+ if new_pre_checkout_queries is None: new_pre_checkout_queries = []
+ new_pre_checkout_queries.append(update.pre_checkout_query)
+ if update.poll:
+ if new_polls is None: new_polls = []
+ new_polls.append(update.poll)
+ if update.poll_answer:
+ if new_poll_answers is None: new_poll_answers = []
+ new_poll_answers.append(update.poll_answer)
+ if update.my_chat_member:
+ if new_my_chat_members is None: new_my_chat_members = []
+ new_my_chat_members.append(update.my_chat_member)
+ if update.chat_member:
+ if new_chat_members is None: new_chat_members = []
+ new_chat_members.append(update.chat_member)
+ if update.chat_join_request:
+ if new_chat_join_request is None: new_chat_join_request = []
+ new_chat_join_request.append(update.chat_join_request)
+ if update.message_reaction:
+ if new_message_reactions is None: new_message_reactions = []
+ new_message_reactions.append(update.message_reaction)
+ if update.message_reaction_count:
+ if new_message_reaction_counts is None: new_message_reaction_counts = []
+ new_message_reaction_counts.append(update.message_reaction_count)
+ if update.chat_boost:
+ if new_chat_boosts is None: new_chat_boosts = []
+ new_chat_boosts.append(update.chat_boost)
+ if update.removed_chat_boost:
+ if new_removed_chat_boosts is None: new_removed_chat_boosts = []
+ new_removed_chat_boosts.append(update.removed_chat_boost)
+ if update.business_connection:
+ if new_business_connections is None: new_business_connections = []
+ new_business_connections.append(update.business_connection)
+ if update.business_message:
+ if new_business_messages is None: new_business_messages = []
+ new_business_messages.append(update.business_message)
+ if update.edited_business_message:
+ if new_edited_business_messages is None: new_edited_business_messages = []
+ new_edited_business_messages.append(update.edited_business_message)
+ if update.deleted_business_messages:
+ if new_deleted_business_messages is None: new_deleted_business_messages = []
+ new_deleted_business_messages.append(update.deleted_business_messages)
+ if update.purchased_paid_media:
+ if new_purchased_paid_media is None: new_purchased_paid_media = []
+ new_purchased_paid_media.append(update.purchased_paid_media)
+
+ if new_messages:
self.process_new_messages(new_messages)
- if len(edited_new_messages) > 0:
- self.process_new_edited_messages(edited_new_messages)
- if len(new_channel_posts) > 0:
+ if new_edited_messages:
+ self.process_new_edited_messages(new_edited_messages)
+ if new_channel_posts:
self.process_new_channel_posts(new_channel_posts)
- if len(new_edited_channel_posts) > 0:
+ if new_edited_channel_posts:
self.process_new_edited_channel_posts(new_edited_channel_posts)
- if len(new_inline_querys) > 0:
- self.process_new_inline_query(new_inline_querys)
- if len(new_chosen_inline_results) > 0:
+ if new_inline_queries:
+ self.process_new_inline_query(new_inline_queries)
+ if new_chosen_inline_results:
self.process_new_chosen_inline_query(new_chosen_inline_results)
- if len(new_callback_querys) > 0:
- self.process_new_callback_query(new_callback_querys)
- if len(new_pre_checkout_querys) > 0:
- self.process_new_pre_checkout_query(new_pre_checkout_querys)
- if len(new_shipping_querys) > 0:
- self.process_new_shipping_query(new_shipping_querys)
+ if new_callback_queries:
+ self.process_new_callback_query(new_callback_queries)
+ if new_shipping_queries:
+ self.process_new_shipping_query(new_shipping_queries)
+ if new_pre_checkout_queries:
+ self.process_new_pre_checkout_query(new_pre_checkout_queries)
+ if new_polls:
+ self.process_new_poll(new_polls)
+ if new_poll_answers:
+ self.process_new_poll_answer(new_poll_answers)
+ if new_my_chat_members:
+ self.process_new_my_chat_member(new_my_chat_members)
+ if new_chat_members:
+ self.process_new_chat_member(new_chat_members)
+ if new_chat_join_request:
+ self.process_new_chat_join_request(new_chat_join_request)
+ if new_message_reactions:
+ self.process_new_message_reaction(new_message_reactions)
+ if new_message_reaction_counts:
+ self.process_new_message_reaction_count(new_message_reaction_counts)
+ if new_chat_boosts:
+ self.process_new_chat_boost(new_chat_boosts)
+ if new_removed_chat_boosts:
+ self.process_new_removed_chat_boost(new_removed_chat_boosts)
+ if new_business_connections:
+ self.process_new_business_connection(new_business_connections)
+ if new_business_messages:
+ self.process_new_business_message(new_business_messages)
+ if new_edited_business_messages:
+ self.process_new_edited_business_message(new_edited_business_messages)
+ if new_deleted_business_messages:
+ self.process_new_deleted_business_messages(new_deleted_business_messages)
+ if new_purchased_paid_media:
+ self.process_new_purchased_paid_media(new_purchased_paid_media)
def process_new_messages(self, new_messages):
+ """
+ :meta private:
+ """
self._notify_next_handlers(new_messages)
self._notify_reply_handlers(new_messages)
self.__notify_update(new_messages)
- self._notify_command_handlers(self.message_handlers, new_messages)
+ self._notify_command_handlers(self.message_handlers, new_messages, 'message')
+
+ def process_new_edited_messages(self, new_edited_message):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.edited_message_handlers, new_edited_message, 'edited_message')
+
+ def process_new_channel_posts(self, new_channel_post):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.channel_post_handlers, new_channel_post, 'channel_post')
+
+ def process_new_edited_channel_posts(self, new_edited_channel_post):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.edited_channel_post_handlers, new_edited_channel_post, 'edited_channel_post')
+
+ def process_new_message_reaction(self, new_message_reactions):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.message_reaction_handlers, new_message_reactions, 'message_reaction')
+
+ def process_new_message_reaction_count(self, new_message_reaction_counts):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.message_reaction_count_handlers, new_message_reaction_counts, 'message_reaction_count')
+
+ def process_new_inline_query(self, new_inline_queries):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.inline_handlers, new_inline_queries, 'inline_query')
+
+ def process_new_chosen_inline_query(self, new_chosen_inline_queries):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.chosen_inline_handlers, new_chosen_inline_queries, 'chosen_inline_query')
+
+ def process_new_callback_query(self, new_callback_queries):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.callback_query_handlers, new_callback_queries, 'callback_query')
+
+ def process_new_shipping_query(self, new_shipping_queries):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.shipping_query_handlers, new_shipping_queries, 'shipping_query')
+
+ def process_new_pre_checkout_query(self, new_pre_checkout_queries):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.pre_checkout_query_handlers, new_pre_checkout_queries, 'pre_checkout_query')
+
+ def process_new_poll(self, new_polls):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.poll_handlers, new_polls, 'poll')
+
+ def process_new_poll_answer(self, new_poll_answers):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.poll_answer_handlers, new_poll_answers, 'poll_answer')
+
+ def process_new_my_chat_member(self, new_my_chat_members):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.my_chat_member_handlers, new_my_chat_members, 'my_chat_member')
+
+ def process_new_chat_member(self, new_chat_members):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.chat_member_handlers, new_chat_members, 'chat_member')
+
+ def process_new_chat_join_request(self, new_chat_join_request):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.chat_join_request_handlers, new_chat_join_request, 'chat_join_request')
+
+ def process_new_chat_boost(self, new_chat_boosts):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.chat_boost_handlers, new_chat_boosts, 'chat_boost')
+
+ def process_new_removed_chat_boost(self, new_removed_chat_boosts):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.removed_chat_boost_handlers, new_removed_chat_boosts, 'removed_chat_boost')
- def process_new_edited_messages(self, edited_message):
- self._notify_command_handlers(self.edited_message_handlers, edited_message)
+ def process_new_business_connection(self, new_business_connections):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.business_connection_handlers, new_business_connections, 'business_connection')
- def process_new_channel_posts(self, channel_post):
- self._notify_command_handlers(self.channel_post_handlers, channel_post)
+ def process_new_business_message(self, new_business_messages):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.business_message_handlers, new_business_messages, 'business_message')
- def process_new_edited_channel_posts(self, edited_channel_post):
- self._notify_command_handlers(self.edited_channel_post_handlers, edited_channel_post)
+ def process_new_edited_business_message(self, new_edited_business_messages):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.edited_business_message_handlers, new_edited_business_messages, 'edited_business_message')
- def process_new_inline_query(self, new_inline_querys):
- self._notify_command_handlers(self.inline_handlers, new_inline_querys)
+ def process_new_deleted_business_messages(self, new_deleted_business_messages):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.deleted_business_messages_handlers, new_deleted_business_messages, 'deleted_business_messages')
- def process_new_chosen_inline_query(self, new_chosen_inline_querys):
- self._notify_command_handlers(self.chosen_inline_handlers, new_chosen_inline_querys)
+ def process_new_purchased_paid_media(self, new_purchased_paid_media):
+ """
+ :meta private:
+ """
+ self._notify_command_handlers(self.purchased_paid_media_handlers, new_purchased_paid_media, 'purchased_paid_media')
- def process_new_callback_query(self, new_callback_querys):
- self._notify_command_handlers(self.callback_query_handlers, new_callback_querys)
+ def process_middlewares(self, update):
+ """
+ :meta private:
+ """
+ if self.typed_middleware_handlers:
+ for update_type, middlewares in self.typed_middleware_handlers.items():
+ if getattr(update, update_type) is not None:
+ for typed_middleware_handler in middlewares:
+ try:
+ typed_middleware_handler(self, getattr(update, update_type))
+ except Exception as e:
+ e.args = e.args + (f'Typed middleware handler "{typed_middleware_handler.__qualname__}"',)
+ raise
- def process_new_shipping_query(self, new_shipping_querys):
- self._notify_command_handlers(self.shipping_query_handlers, new_shipping_querys)
+ if self.default_middleware_handlers:
+ for default_middleware_handler in self.default_middleware_handlers:
+ try:
+ default_middleware_handler(self, update)
+ except Exception as e:
+ e.args = e.args + (f'Default middleware handler "{default_middleware_handler.__qualname__}"',)
+ raise
- def process_new_pre_checkout_query(self, pre_checkout_querys):
- self._notify_command_handlers(self.pre_checkout_query_handlers, pre_checkout_querys)
def __notify_update(self, new_messages):
+ """
+ :meta private:
+ """
+ if len(self.update_listener) == 0:
+ return
for listener in self.update_listener:
self._exec_task(listener, new_messages)
- def infinity_polling(self, *args, **kwargs):
+ def _setup_change_detector(self, path_to_watch: str):
+ try:
+ # noinspection PyPackageRequirements
+ from watchdog.observers import Observer
+ from telebot.ext.reloader import EventHandler
+ except ImportError:
+ raise ImportError(
+ 'Please install watchdog and psutil before using restart_on_change option.'
+ )
+
+ self.event_handler = EventHandler()
+ path = path_to_watch if path_to_watch else None
+ if path is None:
+ # Make it possible to specify --path argument to the script
+ path = sys.argv[sys.argv.index('--path') + 1] if '--path' in sys.argv else '.'
+
+
+ self.event_observer = Observer()
+ self.event_observer.schedule(self.event_handler, path, recursive=True)
+ self.event_observer.start()
+
+ def __hide_token(self, message: str) -> str:
+ if self.token in message:
+ code = self.token.split(':')[1]
+ return message.replace(code, "*" * len(code))
+ else:
+ return message
+
+ def infinity_polling(self, timeout: Optional[int]=20, skip_pending: Optional[bool]=False, long_polling_timeout: Optional[int]=20,
+ logger_level: Optional[int]=logging.ERROR, allowed_updates: Optional[List[str]]=None,
+ restart_on_change: Optional[bool]=False, path_to_watch: Optional[str]=None, *args, **kwargs):
+ """
+ Wrap polling with infinite loop and exception handling to avoid bot stops polling.
+
+ .. note::
+
+ Install watchdog and psutil before using restart_on_change option.
+
+ :param timeout: Request connection timeout.
+ :type timeout: :obj:`int`
+
+ :param long_polling_timeout: Timeout in seconds for long polling (see API docs)
+ :type long_polling_timeout: :obj:`int`
+
+ :param skip_pending: skip old updates
+ :type skip_pending: :obj:`bool`
+
+ :param logger_level: Custom (different from logger itself) logging level for infinity_polling logging.
+ Use logger levels from logging as a value. None/NOTSET = no error logging
+ :type logger_level: :obj:`int`.
+
+ :param allowed_updates: A list of the update types you want your bot to receive.
+ For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types.
+ See util.update_types for a complete list of available update types.
+ Specify an empty list to receive all update types except chat_member (default).
+ If not specified, the previous setting will be used.
+ Please note that this parameter doesn't affect updates created before the call to the get_updates,
+ so unwanted updates may be received for a short period of time.
+ :type allowed_updates: :obj:`list` of :obj:`str`
+
+ :param restart_on_change: Restart a file on file(s) change. Defaults to False
+ :type restart_on_change: :obj:`bool`
+
+ :param path_to_watch: Path to watch for changes. Defaults to current directory
+ :type path_to_watch: :obj:`str`
+
+ :return:
+ """
+ if skip_pending:
+ self.__skip_updates()
+
+ if restart_on_change:
+ self._setup_change_detector(path_to_watch)
+
while not self.__stop_polling.is_set():
try:
- self.polling(*args, **kwargs)
+ self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout,
+ logger_level=logger_level, allowed_updates=allowed_updates, restart_on_change=False,
+ *args, **kwargs)
except Exception as e:
- time.sleep(5)
- pass
- logger.info("Break infinity polling")
+ if logger_level and logger_level >= logging.ERROR:
+ logger.error("Infinity polling exception: %s", self.__hide_token(str(e)))
+ if logger_level and logger_level >= logging.DEBUG:
+ logger.error("Exception traceback:\n%s", self.__hide_token(traceback.format_exc()))
+ time.sleep(3)
+ continue
+ if logger_level and logger_level >= logging.INFO:
+ logger.error("Infinity polling: polling exited")
+ if logger_level and logger_level >= logging.INFO:
+ logger.error("Break infinity polling")
- def polling(self, none_stop=False, interval=0, timeout=20):
+
+ def polling(self, non_stop: Optional[bool]=False, skip_pending: Optional[bool]=False, interval: Optional[int]=0,
+ timeout: Optional[int]=20, long_polling_timeout: Optional[int]=20,
+ logger_level: Optional[int]=logging.ERROR, allowed_updates: Optional[List[str]]=None,
+ none_stop: Optional[bool]=None, restart_on_change: Optional[bool]=False, path_to_watch: Optional[str]=None):
"""
This function creates a new Thread that calls an internal __retrieve_updates function.
- This allows the bot to retrieve Updates automagically and notify listeners and message handlers accordingly.
+ This allows the bot to retrieve Updates automatically and notify listeners and message handlers accordingly.
Warning: Do not call this function more than once!
- Always get updates.
- :param interval:
- :param none_stop: Do not stop polling when an ApiException occurs.
- :param timeout: Timeout in seconds for long polling.
+ Always gets updates.
+
+ .. deprecated:: 4.1.1
+ Use :meth:`infinity_polling` instead.
+
+ .. note::
+
+ Install watchdog and psutil before using restart_on_change option.
+
+ :param interval: Delay between two update retrivals
+ :type interval: :obj:`int`
+
+ :param non_stop: Do not stop polling when an ApiException occurs.
+ :type non_stop: :obj:`bool`
+
+ :param timeout: Request connection timeout
+ :type timeout: :obj:`int`
+
+ :param skip_pending: skip old updates
+ :type skip_pending: :obj:`bool`
+
+ :param long_polling_timeout: Timeout in seconds for long polling (see API docs)
+ :type long_polling_timeout: :obj:`int`
+
+ :param logger_level: Custom (different from logger itself) logging level for infinity_polling logging.
+ Use logger levels from logging as a value. None/NOTSET = no error logging
+ :type logger_level: :obj:`int`
+
+ :param allowed_updates: A list of the update types you want your bot to receive.
+ For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types.
+ See util.update_types for a complete list of available update types.
+ Specify an empty list to receive all update types except chat_member (default).
+ If not specified, the previous setting will be used.
+
+ Please note that this parameter doesn't affect updates created before the call to the get_updates,
+ so unwanted updates may be received for a short period of time.
+ :type allowed_updates: :obj:`list` of :obj:`str`
+
+ :param none_stop: deprecated.
+ :type none_stop: :obj:`bool`
+
+ :param restart_on_change: Restart a file on file(s) change. Defaults to False
+ :type restart_on_change: :obj:`bool`
+
+ :param path_to_watch: Path to watch for changes. Defaults to None
+ :type path_to_watch: :obj:`str`
+
:return:
"""
+ if none_stop is not None:
+ logger.warning('The parameter "none_stop" is deprecated. Use "non_stop" instead.')
+ non_stop = none_stop
+
+ if skip_pending:
+ self.__skip_updates()
+
+ if restart_on_change:
+ self._setup_change_detector(path_to_watch)
+
+ logger.info('Starting your bot with username: [@%s]', self.user.username)
+
if self.threaded:
- self.__threaded_polling(none_stop, interval, timeout)
+ self.__threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
+ logger_level=logger_level, allowed_updates=allowed_updates)
else:
- self.__non_threaded_polling(none_stop, interval, timeout)
+ self.__non_threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
+ logger_level=logger_level, allowed_updates=allowed_updates)
- def __threaded_polling(self, none_stop=False, interval=0, timeout=3):
- logger.info('Started polling.')
+ def _handle_exception(self, exception: Exception) -> bool:
+ if self.exception_handler is None:
+ return False
+
+ handled = self.exception_handler.handle(exception)
+ return handled
+
+ def __threaded_polling(self, non_stop = False, interval = 0, timeout = None, long_polling_timeout = None,
+ logger_level=logging.ERROR, allowed_updates=None):
+ if (not logger_level) or (logger_level < logging.INFO):
+ warning = "\n Warning: this message appearance will be changed. Set logger_level=logging.INFO to continue seeing it."
+ else:
+ warning = ""
+ #if logger_level and logger_level >= logging.INFO: # enable in future releases. Change output to logger.error
+ logger.info('Started polling.' + warning)
self.__stop_polling.clear()
- error_interval = .25
+ error_interval = 0.25
polling_thread = util.WorkerThread(name="PollingThread")
or_event = util.OrEvent(
@@ -406,1347 +1229,9004 @@ def __threaded_polling(self, none_stop=False, interval=0, timeout=3):
while not self.__stop_polling.wait(interval):
or_event.clear()
try:
- polling_thread.put(self.__retrieve_updates, timeout)
-
+ polling_thread.put(self.__retrieve_updates, timeout, long_polling_timeout, allowed_updates=allowed_updates)
or_event.wait() # wait for polling thread finish, polling thread error or thread pool error
-
polling_thread.raise_exceptions()
self.worker_pool.raise_exceptions()
-
- error_interval = .25
+ error_interval = 0.25
except apihelper.ApiException as e:
- logger.error(e)
- if not none_stop:
- self.__stop_polling.set()
- logger.info("Exception occurred. Stopping.")
+ handled = self._handle_exception(e)
+ if not handled:
+ if logger_level and logger_level >= logging.ERROR:
+ logger.error("Threaded polling exception: %s", self.__hide_token(str(e)))
+ if logger_level and logger_level >= logging.DEBUG:
+ logger.error("Exception traceback:\n%s", self.__hide_token(traceback.format_exc()))
+ if not non_stop:
+ self.__stop_polling.set()
+ # if logger_level and logger_level >= logging.INFO: # enable in future releases. Change output to logger.error
+ logger.info("Exception occurred. Stopping." + warning)
+ else:
+ # if logger_level and logger_level >= logging.INFO: # enable in future releases. Change output to logger.error
+ logger.info("Waiting for {0} seconds until retry".format(error_interval) + warning)
+ time.sleep(error_interval)
+ if error_interval * 2 < 60:
+ error_interval *= 2
+ else:
+ error_interval = 60
else:
- polling_thread.clear_exceptions()
- self.worker_pool.clear_exceptions()
- logger.info("Waiting for {0} seconds until retry".format(error_interval))
+ # polling_thread.clear_exceptions()
+ # self.worker_pool.clear_exceptions()
time.sleep(error_interval)
- error_interval *= 2
+ polling_thread.clear_exceptions() #*
+ self.worker_pool.clear_exceptions() #*
except KeyboardInterrupt:
- logger.info("KeyboardInterrupt received.")
+ # if logger_level and logger_level >= logging.INFO: # enable in future releases. Change output to logger.error
+ logger.info("KeyboardInterrupt received." + warning)
self.__stop_polling.set()
break
+ except Exception as e:
+ handled = self._handle_exception(e)
+ if not handled:
+ polling_thread.stop()
+ polling_thread.clear_exceptions() #*
+ self.worker_pool.clear_exceptions() #*
+ raise e
+ else:
+ polling_thread.clear_exceptions()
+ self.worker_pool.clear_exceptions()
+ time.sleep(error_interval)
polling_thread.stop()
- logger.info('Stopped polling.')
+ polling_thread.clear_exceptions()
+ self.worker_pool.clear_exceptions()
+ #if logger_level and logger_level >= logging.INFO: # enable in future releases. Change output to logger.error
+ logger.info('Stopped polling.' + warning)
+
- def __non_threaded_polling(self, none_stop=False, interval=0, timeout=3):
- logger.info('Started polling.')
+ def __non_threaded_polling(self, non_stop=False, interval=0, timeout=None, long_polling_timeout=None,
+ logger_level=logging.ERROR, allowed_updates=None):
+ if (not logger_level) or (logger_level < logging.INFO):
+ warning = "\n Warning: this message appearance will be changed. Set logger_level=logging.INFO to continue seeing it."
+ else:
+ warning = ""
+ #if logger_level and logger_level >= logging.INFO: # enable in future releases. Change output to logger.error
+ logger.info('Started polling.' + warning)
self.__stop_polling.clear()
- error_interval = .25
+ error_interval = 0.25
while not self.__stop_polling.wait(interval):
try:
- self.__retrieve_updates(timeout)
- error_interval = .25
+ self.__retrieve_updates(timeout, long_polling_timeout, allowed_updates=allowed_updates)
+ error_interval = 0.25
except apihelper.ApiException as e:
- logger.error(e)
- if not none_stop:
- self.__stop_polling.set()
- logger.info("Exception occurred. Stopping.")
+ handled = self._handle_exception(e)
+ if not handled:
+ if logger_level and logger_level >= logging.ERROR:
+ logger.error("Polling exception: %s", str(e))
+ if logger_level and logger_level >= logging.DEBUG:
+ logger.error("Exception traceback:\n%s", traceback.format_exc())
+ if not non_stop:
+ self.__stop_polling.set()
+ # if logger_level and logger_level >= logging.INFO: # enable in future releases. Change output to logger.error
+ logger.info("Exception occurred. Stopping." + warning)
+ else:
+ # if logger_level and logger_level >= logging.INFO: # enable in future releases. Change output to logger.error
+ logger.info("Waiting for {0} seconds until retry".format(error_interval) + warning)
+ time.sleep(error_interval)
+ error_interval *= 2
else:
- logger.info("Waiting for {0} seconds until retry".format(error_interval))
time.sleep(error_interval)
- error_interval *= 2
except KeyboardInterrupt:
- logger.info("KeyboardInterrupt received.")
+ # if logger_level and logger_level >= logging.INFO: # enable in future releases. Change output to logger.error
+ logger.info("KeyboardInterrupt received." + warning)
self.__stop_polling.set()
break
+ except Exception as e:
+ handled = self._handle_exception(e)
+ if not handled:
+ raise e
+ else:
+ time.sleep(error_interval)
+ #if logger_level and logger_level >= logging.INFO: # enable in future releases. Change output to logger.error
+ logger.info('Stopped polling.' + warning)
- logger.info('Stopped polling.')
def _exec_task(self, task, *args, **kwargs):
if self.threaded:
self.worker_pool.put(task, *args, **kwargs)
else:
- task(*args, **kwargs)
+ try:
+ task(*args, **kwargs)
+ except Exception as e:
+ handled = self._handle_exception(e)
+ if not handled:
+ raise e
+
def stop_polling(self):
+ """
+ Stops polling.
+
+ Does not accept any arguments.
+ """
self.__stop_polling.set()
+
def stop_bot(self):
+ """
+ Stops bot by stopping polling and closing the worker pool.
+ """
self.stop_polling()
- if self.worker_pool:
+ if self.threaded and self.worker_pool:
self.worker_pool.close()
- def set_update_listener(self, listener):
- self.update_listener.append(listener)
-
- def get_me(self):
- result = apihelper.get_me(self.token)
- return types.User.de_json(result)
- def get_file(self, file_id):
- return types.File.de_json(apihelper.get_file(self.token, file_id))
+ def set_update_listener(self, listener: Callable):
+ """
+ Sets a listener function to be called when a new update is received.
- def get_file_url(self, file_id):
- return apihelper.get_file_url(self.token, file_id)
+ :param listener: Listener function.
+ :type listener: Callable
+ """
+ self.update_listener.append(listener)
- def download_file(self, file_path):
- return apihelper.download_file(self.token, file_path)
- def get_user_profile_photos(self, user_id, offset=None, limit=None):
+ def get_me(self) -> types.User:
"""
- Retrieves the user profile photos of the person with 'user_id'
- See https://core.telegram.org/bots/api#getuserprofilephotos
- :param user_id:
- :param offset:
- :param limit:
- :return: API reply.
- """
- result = apihelper.get_user_profile_photos(self.token, user_id, offset, limit)
- return types.UserProfilePhotos.de_json(result)
+ A simple method for testing your bot's authentication token. Requires no parameters.
+ Returns basic information about the bot in form of a User object.
- def get_chat(self, chat_id):
- """
- Use this method to get up to date information about the chat (current name of the user for one-on-one
- conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
- :param chat_id:
- :return:
+ Telegram documentation: https://core.telegram.org/bots/api#getme
"""
- result = apihelper.get_chat(self.token, chat_id)
- return types.Chat.de_json(result)
+ return types.User.de_json(
+ apihelper.get_me(self.token)
+ )
- def leave_chat(self, chat_id):
- """
- Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
- :param chat_id:
- :return:
- """
- result = apihelper.leave_chat(self.token, chat_id)
- return result
- def get_chat_administrators(self, chat_id):
+ def get_file(self, file_id: Optional[str]) -> types.File:
"""
- Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects
- that contains information about all chat administrators except other bots.
- :param chat_id:
- :return:
- """
- result = apihelper.get_chat_administrators(self.token, chat_id)
- ret = []
- for r in result:
- ret.append(types.ChatMember.de_json(r))
- return ret
+ Use this method to get basic info about a file and prepare it for downloading.
+ For the moment, bots can download files of up to 20MB in size.
+ On success, a File object is returned.
+ It is guaranteed that the link will be valid for at least 1 hour.
+ When the link expires, a new one can be requested by calling get_file again.
- def get_chat_members_count(self, chat_id):
- """
- Use this method to get the number of members in a chat. Returns Int on success.
- :param chat_id:
- :return:
- """
- result = apihelper.get_chat_members_count(self.token, chat_id)
- return result
+ Telegram documentation: https://core.telegram.org/bots/api#getfile
- def set_chat_sticker_set(self, chat_id, sticker_set_name):
- """
- Use this method to set a new group sticker set for a supergroup. The bot must be an administrator
- in the chat for this to work and must have the appropriate admin rights.
- Use the field can_set_sticker_set optionally returned in getChat requests to check
- if the bot can use this method. Returns True on success.
- :param chat_id: Unique identifier for the target chat or username of the target supergroup
- (in the format @supergroupusername)
- :param sticker_set_name: Name of the sticker set to be set as the group sticker set
- :return:
- """
- result = apihelper.set_chat_sticker_set(self.token, chat_id, sticker_set_name)
- return result
+ :param file_id: File identifier
+ :type file_id: :obj:`str`
- def delete_chat_sticker_set(self, chat_id):
+ :return: :class:`telebot.types.File`
"""
- Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat
- for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set
- optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
- :param chat_id: Unique identifier for the target chat or username of the target supergroup
- (in the format @supergroupusername)
- :return:
- """
- result = apihelper.delete_chat_sticker_set(self.token, chat_id)
- return result
+ return types.File.de_json(
+ apihelper.get_file(self.token, file_id)
+ )
- def get_chat_member(self, chat_id, user_id):
- """
- Use this method to get information about a member of a chat. Returns a ChatMember object on success.
- :param chat_id:
- :param user_id:
- :return:
- """
- result = apihelper.get_chat_member(self.token, chat_id, user_id)
- return types.ChatMember.de_json(result)
- def send_message(self, chat_id, text, disable_web_page_preview=None, reply_to_message_id=None, reply_markup=None,
- parse_mode=None, disable_notification=None):
+ def get_file_url(self, file_id: Optional[str]) -> str:
"""
- Use this method to send text messages.
+ Get a valid URL for downloading a file.
- Warning: Do not send more than about 5000 characters each message, otherwise you'll risk an HTTP 414 error.
- If you must send more than 5000 characters, use the split_string function in apihelper.py.
+ :param file_id: File identifier to get download URL for.
+ :type file_id: :obj:`str`
- :param chat_id:
- :param text:
- :param disable_web_page_preview:
- :param reply_to_message_id:
- :param reply_markup:
- :param parse_mode:
- :param disable_notification: Boolean, Optional. Sends the message silently.
- :return: API reply.
+ :return: URL for downloading the file.
+ :rtype: :obj:`str`
"""
- return types.Message.de_json(
- apihelper.send_message(self.token, chat_id, text, disable_web_page_preview, reply_to_message_id,
- reply_markup, parse_mode, disable_notification))
+ return apihelper.get_file_url(self.token, file_id)
- def forward_message(self, chat_id, from_chat_id, message_id, disable_notification=None):
- """
- Use this method to forward messages of any kind.
- :param disable_notification:
- :param chat_id: which chat to forward
- :param from_chat_id: which chat message from
- :param message_id: message id
- :return: API reply.
- """
- return types.Message.de_json(
- apihelper.forward_message(self.token, chat_id, from_chat_id, message_id, disable_notification))
- def delete_message(self, chat_id, message_id):
+ def download_file(self, file_path: str) -> bytes:
"""
- Use this method to delete message. Returns True on success.
- :param chat_id: in which chat to delete
- :param message_id: which message to delete
- :return: API reply.
- """
- return apihelper.delete_message(self.token, chat_id, message_id)
+ Downloads file.
- def send_photo(self, chat_id, photo, caption=None, reply_to_message_id=None, reply_markup=None,
- parse_mode=None, disable_notification=None):
- """
- Use this method to send photos.
- :param disable_notification:
- :param chat_id:
- :param photo:
- :param caption:
- :param parse_mode
- :param reply_to_message_id:
- :param reply_markup:
- :return: API reply.
- """
- return types.Message.de_json(
- apihelper.send_photo(self.token, chat_id, photo, caption, reply_to_message_id, reply_markup,
- parse_mode, disable_notification))
-
- def send_audio(self, chat_id, audio, caption=None, duration=None, performer=None, title=None,
- reply_to_message_id=None, reply_markup=None, parse_mode=None, disable_notification=None,
- timeout=None):
- """
- Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format.
- :param chat_id:Unique identifier for the message recipient
- :param audio:Audio file to send.
- :param duration:Duration of the audio in seconds
- :param performer:Performer
- :param title:Track name
- :param parse_mode
- :param reply_to_message_id:If the message is a reply, ID of the original message
- :param reply_markup:
- :return: Message
- """
- return types.Message.de_json(
- apihelper.send_audio(self.token, chat_id, audio, caption, duration, performer, title, reply_to_message_id,
- reply_markup, parse_mode, disable_notification, timeout))
+ :param file_path: Path where the file should be downloaded.
+ :type file_path: str
- def send_voice(self, chat_id, voice, caption=None, duration=None, reply_to_message_id=None, reply_markup=None,
- parse_mode=None, disable_notification=None, timeout=None):
- """
- Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.
- :param chat_id:Unique identifier for the message recipient.
- :param voice:
- :param duration:Duration of sent audio in seconds
- :param reply_to_message_id:
- :param reply_markup:
- :param parse_mode
- :return: Message
+ :return: bytes
+ :rtype: :obj:`bytes`
"""
- return types.Message.de_json(
- apihelper.send_voice(self.token, chat_id, voice, caption, duration, reply_to_message_id, reply_markup,
- parse_mode, disable_notification, timeout))
+ return apihelper.download_file(self.token, file_path)
- def send_document(self, chat_id, data, reply_to_message_id=None, caption=None, reply_markup=None,
- parse_mode=None, disable_notification=None, timeout=None):
- """
- Use this method to send general files.
- :param chat_id:
- :param data:
- :param reply_to_message_id:
- :param reply_markup:
- :param parse_mode:
- :param disable_notification:
- :return: API reply.
+
+ def log_out(self) -> bool:
"""
- return types.Message.de_json(
- apihelper.send_data(self.token, chat_id, data, 'document', reply_to_message_id, reply_markup,
- parse_mode, disable_notification, timeout, caption=caption))
+ Use this method to log out from the cloud Bot API server before launching the bot locally.
+ You MUST log out the bot before running it locally, otherwise there is no guarantee
+ that the bot will receive updates.
+ After a successful call, you can immediately log in on a local server,
+ but will not be able to log in back to the cloud Bot API server for 10 minutes.
+ Returns True on success.
- def send_sticker(self, chat_id, data, reply_to_message_id=None, reply_markup=None, disable_notification=None,
- timeout=None):
+ Telegram documentation: https://core.telegram.org/bots/api#logout
+
+ :return: True on success.
+ :rtype: :obj:`bool`
"""
- Use this method to send .webp stickers.
- :param chat_id:
- :param data:
- :param reply_to_message_id:
- :param reply_markup:
- :return: API reply.
+ return apihelper.log_out(self.token)
+
+
+ def close(self) -> bool:
"""
- return types.Message.de_json(
- apihelper.send_data(self.token, chat_id, data, 'sticker', reply_to_message_id, reply_markup,
- disable_notification, timeout))
-
- def send_video(self, chat_id, data, duration=None, caption=None, reply_to_message_id=None, reply_markup=None,
- parse_mode=None, supports_streaming=None, disable_notification=None, timeout=None):
- """
- Use this method to send video files, Telegram clients support mp4 videos.
- :param chat_id: Integer : Unique identifier for the message recipient — User or GroupChat id
- :param data: InputFile or String : Video to send. You can either pass a file_id as String to resend a video that is already on the Telegram server
- :param duration: Integer : Duration of sent video in seconds
- :param caption: String : Video caption (may also be used when resending videos by file_id).
- :param parse_mode:
- :param supports_streaming:
- :param reply_to_message_id:
- :param reply_markup:
- :return:
+ Use this method to close the bot instance before moving it from one local server to another.
+ You need to delete the webhook before calling this method to ensure that the bot isn't launched again
+ after server restart.
+ The method will return error 429 in the first 10 minutes after the bot is launched.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#close
+
+ :return: :obj:`bool`
"""
- return types.Message.de_json(
- apihelper.send_video(self.token, chat_id, data, duration, caption, reply_to_message_id, reply_markup,
- parse_mode, supports_streaming, disable_notification, timeout))
-
- def send_video_note(self, chat_id, data, duration=None, length=None, reply_to_message_id=None, reply_markup=None,
- disable_notification=None, timeout=None):
- """
- Use this method to send video files, Telegram clients support mp4 videos.
- :param chat_id: Integer : Unique identifier for the message recipient — User or GroupChat id
- :param data: InputFile or String : Video note to send. You can either pass a file_id as String to resend a video that is already on the Telegram server
- :param duration: Integer : Duration of sent video in seconds
- :param length: Integer : Video width and height, Can't be None and should be in range of (0, 640)
- :param reply_to_message_id:
- :param reply_markup:
- :return:
+ return apihelper.close(self.token)
+
+ def set_message_reaction(self, chat_id: Union[int, str], message_id: int, reaction: Optional[List[types.ReactionType]]=None, is_big: Optional[bool]=None) -> bool:
"""
- return types.Message.de_json(
- apihelper.send_video_note(self.token, chat_id, data, duration, length, reply_to_message_id, reply_markup,
- disable_notification, timeout))
+ Use this method to change the chosen reactions on a message.
+ Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same
+ available reactions as messages in the channel. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setmessagereaction
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Identifier of the message to set reaction to
+ :type message_id: :obj:`int`
+
+ :param reaction: New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message.
+ A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.
+ :type reaction: :obj:`list` of :class:`telebot.types.ReactionType`
+
+ :param is_big: Pass True to set the reaction with a big animation
+ :type is_big: :obj:`bool`
- def send_media_group(self, chat_id, media, disable_notification=None, reply_to_message_id=None):
+ :return: :obj:`bool`
"""
- send a group of photos or videos as an album. On success, an array of the sent Messages is returned.
- :param chat_id:
- :param media:
- :param disable_notification:
- :param reply_to_message_id:
- :return:
+ return apihelper.set_message_reaction(
+ self.token, chat_id, message_id, reaction = reaction, is_big = is_big)
+
+
+ def get_user_profile_photos(self, user_id: int, offset: Optional[int]=None,
+ limit: Optional[int]=None) -> types.UserProfilePhotos:
"""
- result = apihelper.send_media_group(self.token, chat_id, media, disable_notification, reply_to_message_id)
- ret = []
- for msg in result:
- ret.append(types.Message.de_json(msg))
- return ret
-
- def send_location(self, chat_id, latitude, longitude, live_period=None, reply_to_message_id=None, reply_markup=None,
- disable_notification=None):
- """
- Use this method to send point on the map.
- :param chat_id:
- :param latitude:
- :param longitude:
- :param live_period
- :param reply_to_message_id:
- :param reply_markup:
- :return: API reply.
+ Use this method to get a list of profile pictures for a user.
+ Returns a :class:`telebot.types.UserProfilePhotos` object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getuserprofilephotos
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param offset: Sequential number of the first photo to be returned. By default, all photos are returned.
+ :type offset: :obj:`int`
+
+ :param limit: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.
+ :type limit: :obj:`int`
+
+ :return: `UserProfilePhotos `_
+ :rtype: :class:`telebot.types.UserProfilePhotos`
+
"""
- return types.Message.de_json(
- apihelper.send_location(self.token, chat_id, latitude, longitude, live_period, reply_to_message_id,
- reply_markup,
- disable_notification))
-
- def edit_message_live_location(self, latitude, longitude, chat_id=None, message_id=None,
- inline_message_id=None, reply_markup=None):
- """
- Use this method to edit live location
- :param latitude:
- :param longitude:
- :param chat_id:
- :param message_id:
- :param inline_message_id:
- :param reply_markup:
- :return:
+ return types.UserProfilePhotos.de_json(
+ apihelper.get_user_profile_photos(self.token, user_id, offset=offset, limit=limit)
+ )
+
+ def set_user_emoji_status(self, user_id: int, emoji_status_custom_emoji_id: Optional[str]=None, emoji_status_expiration_date: Optional[int]=None) -> bool:
"""
- return types.Message.de_json(
- apihelper.edit_message_live_location(self.token, latitude, longitude, chat_id, message_id,
- inline_message_id, reply_markup))
+ Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.
- def stop_message_live_location(self, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
+ Telegram documentation: https://core.telegram.org/bots/api#setuseremojistatus
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param emoji_status_custom_emoji_id: Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.
+ :type emoji_status_custom_emoji_id: :obj:`str`
+
+ :param emoji_status_expiration_date: Expiration date of the emoji status, if any
+ :type emoji_status_expiration_date: :obj:`int`
+
+ :return: :obj:`bool`
"""
- Use this method to stop updating a live location message sent by the bot
- or via the bot (for inline bots) before live_period expires
- :param chat_id:
- :param message_id:
- :param inline_message_id:
- :param reply_markup:
- :return:
+ return apihelper.set_user_emoji_status(
+ self.token, user_id, emoji_status_custom_emoji_id=emoji_status_custom_emoji_id, emoji_status_expiration_date=emoji_status_expiration_date)
+
+
+ def get_chat(self, chat_id: Union[int, str]) -> types.ChatFullInfo:
"""
- return types.Message.de_json(
- apihelper.stop_message_live_location(self.token, chat_id, message_id, inline_message_id, reply_markup))
-
- def send_venue(self, chat_id, latitude, longitude, title, address, foursquare_id=None, disable_notification=None,
- reply_to_message_id=None, reply_markup=None):
- """
- Use this method to send information about a venue.
- :param chat_id: Integer or String : Unique identifier for the target chat or username of the target channel
- :param latitude: Float : Latitude of the venue
- :param longitude: Float : Longitude of the venue
- :param title: String : Name of the venue
- :param address: String : Address of the venue
- :param foursquare_id: String : Foursquare identifier of the venue
- :param disable_notification:
- :param reply_to_message_id:
- :param reply_markup:
- :return:
+ Use this method to get up to date information about the chat (current name of the user for one-on-one
+ conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getchat
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: Chat information
+ :rtype: :class:`telebot.types.ChatFullInfo`
"""
- return types.Message.de_json(
- apihelper.send_venue(self.token, chat_id, latitude, longitude, title, address, foursquare_id,
- disable_notification, reply_to_message_id, reply_markup)
+ return types.ChatFullInfo.de_json(
+ apihelper.get_chat(self.token, chat_id)
)
- def send_contact(self, chat_id, phone_number, first_name, last_name=None, disable_notification=None,
- reply_to_message_id=None, reply_markup=None):
- return types.Message.de_json(
- apihelper.send_contact(self.token, chat_id, phone_number, first_name, last_name, disable_notification,
- reply_to_message_id, reply_markup)
- )
- def send_chat_action(self, chat_id, action):
- """
- Use this method when you need to tell the user that something is happening on the bot's side.
- The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear
- its typing status).
- :param chat_id:
- :param action: One of the following strings: 'typing', 'upload_photo', 'record_video', 'upload_video',
- 'record_audio', 'upload_audio', 'upload_document', 'find_location', 'record_video_note', 'upload_video_note'.
- :return: API reply. :type: boolean
+ def leave_chat(self, chat_id: Union[int, str]) -> bool:
"""
- return apihelper.send_chat_action(self.token, chat_id, action)
+ Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
- def kick_chat_member(self, chat_id, user_id, until_date=None):
- """
- Use this method to kick a user from a group or a supergroup.
- :param chat_id: Int or string : Unique identifier for the target group or username of the target supergroup
- :param user_id: Int : Unique identifier of the target user
- :param until_date: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or
- less than 30 seconds from the current time they are considered to be banned forever
- :return: types.Message
- """
- return apihelper.kick_chat_member(self.token, chat_id, user_id, until_date)
+ Telegram documentation: https://core.telegram.org/bots/api#leavechat
- def unban_chat_member(self, chat_id, user_id):
- return apihelper.unban_chat_member(self.token, chat_id, user_id)
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
- def restrict_chat_member(self, chat_id, user_id, until_date=None, can_send_messages=None,
- can_send_media_messages=None, can_send_other_messages=None,
- can_add_web_page_previews=None):
- """
- Use this method to restrict a user in a supergroup.
- The bot must be an administrator in the supergroup for this to work and must have
- the appropriate admin rights. Pass True for all boolean parameters to lift restrictions from a user.
- Returns True on success.
- :param chat_id: Int or String : Unique identifier for the target group or username of the target supergroup
- or channel (in the format @channelusername)
- :param user_id: Int : Unique identifier of the target user
- :param until_date: Date when restrictions will be lifted for the user, unix time.
- If user is restricted for more than 366 days or less than 30 seconds from the current time,
- they are considered to be restricted forever
- :param can_send_messages: Pass True, if the user can send text messages, contacts, locations and venues
- :param can_send_media_messages Pass True, if the user can send audios, documents, photos, videos, video notes
- and voice notes, implies can_send_messages
- :param can_send_other_messages: Pass True, if the user can send animations, games, stickers and
- use inline bots, implies can_send_media_messages
- :param can_add_web_page_previews: Pass True, if the user may add web page previews to their messages,
- implies can_send_media_messages
- :return: types.Message
- """
- return apihelper.restrict_chat_member(self.token, chat_id, user_id, until_date, can_send_messages,
- can_send_media_messages, can_send_other_messages,
- can_add_web_page_previews)
-
- def promote_chat_member(self, chat_id, user_id, can_change_info=None, can_post_messages=None,
- can_edit_messages=None, can_delete_messages=None, can_invite_users=None,
- can_restrict_members=None, can_pin_messages=None, can_promote_members=None):
- """
- Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator
- in the chat for this to work and must have the appropriate admin rights.
- Pass False for all boolean parameters to demote a user. Returns True on success.
- :param chat_id: Unique identifier for the target chat or username of the target channel (
- in the format @channelusername)
- :param user_id: Int : Unique identifier of the target user
- :param can_change_info: Bool: Pass True, if the administrator can change chat title, photo and other settings
- :param can_post_messages: Bool : Pass True, if the administrator can create channel posts, channels only
- :param can_edit_messages: Bool : Pass True, if the administrator can edit messages of other users, channels only
- :param can_delete_messages: Bool : Pass True, if the administrator can delete messages of other users
- :param can_invite_users: Bool : Pass True, if the administrator can invite new users to the chat
- :param can_restrict_members: Bool: Pass True, if the administrator can restrict, ban or unban chat members
- :param can_pin_messages: Bool: Pass True, if the administrator can pin messages, supergroups only
- :param can_promote_members: Bool: Pass True, if the administrator can add new administrators with a subset
- of his own privileges or demote administrators that he has promoted, directly or indirectly
- (promoted by administrators that were appointed by him)
- :return:
+ :return: :obj:`bool`
"""
- return apihelper.promote_chat_member(self.token, chat_id, user_id, can_change_info, can_post_messages,
- can_edit_messages, can_delete_messages, can_invite_users,
- can_restrict_members, can_pin_messages, can_promote_members)
+ return apihelper.leave_chat(self.token, chat_id)
- def export_chat_invite_link(self, chat_id):
- """
- Use this method to export an invite link to a supergroup or a channel. The bot must be an administrator
- in the chat for this to work and must have the appropriate admin rights.
- Returns exported invite link as String on success.
- :param chat_id: Id: Unique identifier for the target chat or username of the target channel
- (in the format @channelusername)
- :return:
- """
- return apihelper.export_chat_invite_link(self.token, chat_id)
- def set_chat_photo(self, chat_id, photo):
- """
- Use this method to set a new profile photo for the chat. Photos can't be changed for private chats.
- The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
- Returns True on success.
- Note: In regular groups (non-supergroups), this method will only work if the ‘All Members Are Admins’
- setting is off in the target group.
- :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
- (in the format @channelusername)
- :param photo: InputFile: New chat photo, uploaded using multipart/form-data
- :return:
+ def get_chat_administrators(self, chat_id: Union[int, str]) -> List[types.ChatMember]:
"""
- return apihelper.set_chat_photo(self.token, chat_id, photo)
+ Use this method to get a list of administrators in a chat.
+ On success, returns an Array of ChatMember objects that contains
+ information about all chat administrators except other bots.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getchatadministrators
- def delete_chat_photo(self, chat_id):
+ :param chat_id: Unique identifier for the target chat or username
+ of the target supergroup or channel (in the format @channelusername)
+ :return: List made of ChatMember objects.
+ :rtype: :obj:`list` of :class:`telebot.types.ChatMember`
"""
- Use this method to delete a chat photo. Photos can't be changed for private chats.
- The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
- Returns True on success.
- Note: In regular groups (non-supergroups), this method will only work if the ‘All Members Are Admins’
- setting is off in the target group.
- :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
- (in the format @channelusername)
- :return:
+ result = apihelper.get_chat_administrators(self.token, chat_id)
+ return [types.ChatMember.de_json(r) for r in result]
+
+
+ @util.deprecated(deprecation_text="Use get_chat_member_count instead")
+ def get_chat_members_count(self, chat_id: Union[int, str]) -> int:
"""
- return apihelper.delete_chat_photo(self.token, chat_id)
+ This function is deprecated. Use `get_chat_member_count` instead.
+
+ .. deprecated:: 4.0.0
+ This function is deprecated. Use `get_chat_member_count` instead.
+
+ Use this method to get the number of members in a chat.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getchatmembercount
- def set_chat_title(self, chat_id, title):
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: Number of members in the chat.
+ :rtype: :obj:`int`
"""
- Use this method to change the title of a chat. Titles can't be changed for private chats.
- The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
- Returns True on success.
- Note: In regular groups (non-supergroups), this method will only work if the ‘All Members Are Admins’
- setting is off in the target group.
- :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
- (in the format @channelusername)
- :param title: New chat title, 1-255 characters
- :return:
+ return apihelper.get_chat_member_count(self.token, chat_id)
+
+
+ def get_chat_member_count(self, chat_id: Union[int, str]) -> int:
"""
- return apihelper.set_chat_title(self.token, chat_id, title)
+ Use this method to get the number of members in a chat.
- def set_chat_description(self, chat_id, description):
+ Telegram documentation: https://core.telegram.org/bots/api#getchatmembercount
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: Number of members in the chat.
+ :rtype: :obj:`int`
"""
- Use this method to change the description of a supergroup or a channel.
- The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
- Returns True on success.
- :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
- (in the format @channelusername)
- :param description: Str: New chat description, 0-255 characters
- :return:
+ return apihelper.get_chat_member_count(self.token, chat_id)
+
+
+ def set_chat_sticker_set(self, chat_id: Union[int, str], sticker_set_name: str) -> types.StickerSet:
"""
- return apihelper.set_chat_description(self.token, chat_id, description)
+ Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat
+ for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned
+ in getChat requests to check if the bot can use this method. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatstickerset
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param sticker_set_name: Name of the sticker set to be set as the group sticker set
+ :type sticker_set_name: :obj:`str`
- def pin_chat_message(self, chat_id, message_id, disable_notification=False):
+ :return: StickerSet object
+ :rtype: :class:`telebot.types.StickerSet`
"""
- Use this method to pin a message in a supergroup.
- The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
- Returns True on success.
- :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
- (in the format @channelusername)
- :param message_id: Int: Identifier of a message to pin
- :param disable_notification: Bool: Pass True, if it is not necessary to send a notification
- to all group members about the new pinned message
- :return:
+ return apihelper.set_chat_sticker_set(self.token, chat_id, sticker_set_name)
+
+
+ def delete_chat_sticker_set(self, chat_id: Union[int, str]) -> bool:
"""
- return apihelper.pin_chat_message(self.token, chat_id, message_id, disable_notification)
+ Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat
+ for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set
+ optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
- def unpin_chat_message(self, chat_id):
+ Telegram documentation: https://core.telegram.org/bots/api#deletechatstickerset
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
"""
- Use this method to unpin a message in a supergroup chat.
- The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
- Returns True on success.
- :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
- (in the format @channelusername)
- :return:
+ return apihelper.delete_chat_sticker_set(self.token, chat_id)
+
+
+ def get_chat_member(self, chat_id: Union[int, str], user_id: int) -> types.ChatMember:
"""
- return apihelper.unpin_chat_message(self.token, chat_id)
+ Use this method to get information about a member of a chat. Returns a ChatMember object on success.
- def edit_message_text(self, text, chat_id=None, message_id=None, inline_message_id=None, parse_mode=None,
- disable_web_page_preview=None, reply_markup=None):
- result = apihelper.edit_message_text(self.token, text, chat_id, message_id, inline_message_id, parse_mode,
- disable_web_page_preview, reply_markup)
- if type(result) == bool: # if edit inline message return is bool not Message.
- return result
- return types.Message.de_json(result)
+ Telegram documentation: https://core.telegram.org/bots/api#getchatmember
- def edit_message_media(self, media, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
- result = apihelper.edit_message_media(self.token, media, chat_id, message_id, inline_message_id, reply_markup)
- if type(result) == bool: # if edit inline message return is bool not Message.
- return result
- return types.Message.de_json(result)
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
- def edit_message_reply_markup(self, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
- result = apihelper.edit_message_reply_markup(self.token, chat_id, message_id, inline_message_id, reply_markup)
- if type(result) == bool:
- return result
- return types.Message.de_json(result)
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
- def send_game(self, chat_id, game_short_name, disable_notification=None, reply_to_message_id=None,
- reply_markup=None):
- result = apihelper.send_game(self.token, chat_id, game_short_name, disable_notification, reply_to_message_id,
- reply_markup)
- return types.Message.de_json(result)
+ :return: Returns ChatMember object on success.
+ :rtype: :class:`telebot.types.ChatMember`
+ """
+ return types.ChatMember.de_json(
+ apihelper.get_chat_member(self.token, chat_id, user_id)
+ )
- def set_game_score(self, user_id, score, force=None, chat_id=None, message_id=None, inline_message_id=None,
- edit_message=None):
- result = apihelper.set_game_score(self.token, user_id, score, force, chat_id, message_id, inline_message_id,
- edit_message)
- if type(result) == bool:
- return result
+
+ def send_message(
+ self, chat_id: Union[int, str], text: str,
+ parse_mode: Optional[str]=None,
+ entities: Optional[List[types.MessageEntity]]=None,
+ disable_web_page_preview: Optional[bool]=None, # deprecated, for backward compatibility
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ link_preview_options : Optional[types.LinkPreviewOptions]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send text messages.
+
+ Warning: Do not send more than about 4096 characters each message, otherwise you'll risk an HTTP 414 error.
+ If you must send more than 4096 characters,
+ use the `split_string` or `smart_split` function in util.py.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendmessage
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param text: Text of the message to be sent
+ :type text: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the message text.
+ :type parse_mode: :obj:`str`
+
+ :param entities: List of special entities that appear in message text, which can be specified instead of parse_mode
+ :type entities: Array of :class:`telebot.types.MessageEntity`
+
+ :param disable_web_page_preview: deprecated.
+ :type disable_web_page_preview: :obj:`bool`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param link_preview_options: Link preview options.
+ :type link_preview_options: :class:`telebot.types.LinkPreviewOptions`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if disable_web_page_preview is not None:
+ logger.warning("The parameter 'disable_web_page_preview' is deprecated. Use 'link_preview_options' instead.")
+
+ if link_preview_options:
+ logger.warning("Both 'link_preview_options' and 'disable_web_page_preview' parameters are set: conflicting, 'disable_web_page_preview' is deprecated")
+ else:
+ # create a LinkPreviewOptions object
+ link_preview_options = types.LinkPreviewOptions(is_disabled=disable_web_page_preview)
+
+ if link_preview_options and (link_preview_options.is_disabled is None):
+ link_preview_options.is_disabled = self.disable_web_page_preview
+
+ # Fix preview link options if link_preview_options not provided. Get param from class
+ if not link_preview_options and self.disable_web_page_preview:
+ # create a LinkPreviewOptions object
+ link_preview_options = types.LinkPreviewOptions(is_disabled=self.disable_web_page_preview)
+
+ return types.Message.de_json(
+ apihelper.send_message(
+ self.token, chat_id, text,
+ reply_markup=reply_markup, parse_mode=parse_mode, disable_notification=disable_notification,
+ timeout=timeout, entities=entities, protect_content=protect_content, message_thread_id=message_thread_id,
+ reply_parameters=reply_parameters, link_preview_options=link_preview_options, business_connection_id=business_connection_id,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+
+ def forward_message(
+ self, chat_id: Union[int, str], from_chat_id: Union[int, str],
+ message_id: int, disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ message_thread_id: Optional[int]=None,
+ video_start_timestamp: Optional[int]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to forward messages of any kind.
+
+ Telegram documentation: https://core.telegram.org/bots/api#forwardmessage
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound
+ :type disable_notification: :obj:`bool`
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
+ :type from_chat_id: :obj:`int` or :obj:`str`
+
+ :param video_start_timestamp: New start timestamp for the forwarded video in the message
+ :type video_start_timestamp: :obj:`int`
+
+ :param message_id: Message identifier in the chat specified in from_chat_id
+ :type message_id: :obj:`int`
+
+ :param protect_content: Protects the contents of the forwarded message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ return types.Message.de_json(
+ apihelper.forward_message(
+ self.token, chat_id, from_chat_id, message_id, disable_notification=disable_notification,
+ timeout=timeout, protect_content=protect_content, message_thread_id=message_thread_id,
+ video_start_timestamp=video_start_timestamp, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+
+ def copy_message(
+ self, chat_id: Union[int, str],
+ from_chat_id: Union[int, str],
+ message_id: int,
+ caption: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ show_caption_above_media: Optional[bool]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ video_start_timestamp: Optional[int]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.MessageID:
+ """
+ Use this method to copy messages of any kind.
+ Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied.
+ A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method
+ forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#copymessage
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
+ :type from_chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Message identifier in the chat specified in from_chat_id
+ :type message_id: :obj:`int`
+
+ :param video_start_timestamp: New start timestamp for the copied video in the message
+ :type video_start_timestamp: :obj:`int`
+
+ :param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the new caption.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode
+ :type caption_entities: Array of :class:`telebot.types.MessageEntity`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Additional parameters for replies to messages
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.
+ :type show_caption_above_media: :obj:`bool`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the MessageId of the sent message is returned.
+ :rtype: :class:`telebot.types.MessageID`
+ """
+
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.MessageID.de_json(
+ apihelper.copy_message(self.token, chat_id, from_chat_id, message_id, caption=caption,
+ parse_mode=parse_mode, caption_entities=caption_entities, disable_notification=disable_notification,
+ reply_markup=reply_markup, timeout=timeout, protect_content=protect_content,
+ message_thread_id=message_thread_id, reply_parameters=reply_parameters,
+ show_caption_above_media=show_caption_above_media, allow_paid_broadcast=allow_paid_broadcast,
+ video_start_timestamp=video_start_timestamp, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters
+ ))
+
+
+ def approve_suggested_post(self, chat_id: int, message_id: int, send_date: Optional[int]=None) -> bool:
+ """
+ Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#approvesuggestedpost
+
+ :param chat_id: Unique identifier for the target direct messages chat
+ :type chat_id: :obj:`int`
+
+ :param message_id: Identifier of a suggested post message to approve
+ :type message_id: :obj:`int`
+
+ :param send_date: Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created.
+ If specified, then the date must be not more than 2678400 seconds (30 days) in the future
+ :type send_date: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.approve_suggested_post(self.token, chat_id, message_id,
+ send_date=send_date)
+
+ def decline_suggested_post(self, chat_id: int, message_id: int, comment: Optional[str]=None) -> bool:
+ """
+ Use this method to decline a suggested post in a direct messages chat. The bot must have
+ the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#declinesuggestedpost
+
+ :param chat_id: Unique identifier for the target direct messages chat
+ :type chat_id: :obj:`int`
+
+ :param message_id: Identifier of a suggested post message to decline
+ :type message_id: :obj:`int`
+
+ :param comment: Comment for the creator of the suggested post; 0-128 characters
+ :type comment: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.decline_suggested_post(self.token, chat_id, message_id,
+ comment=comment)
+
+ def delete_message(self, chat_id: Union[int, str], message_id: int,
+ timeout: Optional[int]=None) -> bool:
+ """
+ Use this method to delete a message, including service messages, with the following limitations:
+ - A message can only be deleted if it was sent less than 48 hours ago.
+ - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
+ - Bots can delete outgoing messages in private chats, groups, and supergroups.
+ - Bots can delete incoming messages in private chats.
+ - Bots granted can_post_messages permissions can delete outgoing messages in channels.
+ - If the bot is an administrator of a group, it can delete any message there.
+ - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletemessage
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Identifier of the message to delete
+ :type message_id: :obj:`int`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.delete_message(self.token, chat_id, message_id, timeout=timeout)
+
+
+ def delete_messages(self, chat_id: Union[int, str], message_ids: List[int]):
+ """
+ Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletemessages
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_ids: Identifiers of the messages to be deleted
+ :type message_ids: :obj:`list` of :obj:`int`
+
+ :return: Returns True on success.
+ """
+ return apihelper.delete_messages(self.token, chat_id, message_ids)
+
+
+ def forward_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, int], message_ids: List[int],
+ disable_notification: Optional[bool]=None, message_thread_id: Optional[int]=None,
+ protect_content: Optional[bool]=None, direct_messages_topic_id: Optional[int]=None) -> List[types.MessageID]:
+ """
+ Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped.
+ Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages.
+ On success, an array of MessageId of the sent messages is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#forwardmessages
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
+ :type from_chat_id: :obj:`int` or :obj:`str`
+
+ :param message_ids: Message identifiers in the chat specified in from_chat_id
+ :type message_ids: :obj:`list`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound
+ :type disable_notification: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the messages will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param protect_content: Protects the contents of the forwarded message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.MessageID`
+ """
+
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ result = apihelper.forward_messages(
+ self.token, chat_id, from_chat_id, message_ids,
+ disable_notification=disable_notification, message_thread_id=message_thread_id,
+ protect_content=protect_content, direct_messages_topic_id=direct_messages_topic_id)
+ return [types.MessageID.de_json(message_id) for message_id in result]
+
+
+ def copy_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, int], message_ids: List[int],
+ disable_notification: Optional[bool] = None, message_thread_id: Optional[int] = None,
+ protect_content: Optional[bool] = None, remove_caption: Optional[bool] = None,
+ direct_messages_topic_id: Optional[int] = None) -> List[types.MessageID]:
+ """
+ Use this method to copy messages of any kind.
+ If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages,
+ and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous
+ to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array
+ of MessageId of the sent messages is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#copymessages
+
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
+ :type from_chat_id: :obj:`int` or :obj:`str`
+
+ :param message_ids: Message identifiers in the chat specified in from_chat_id
+ :type message_ids: :obj:`list` of :obj:`int`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound
+ :type disable_notification: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the messages will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param protect_content: Protects the contents of the forwarded message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param remove_caption: Pass True to copy the messages without their captions
+ :type remove_caption: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :return: On success, an array of MessageId of the sent messages is returned.
+ :rtype: :obj:`list` of :class:`telebot.types.MessageID`
+ """
+ disable_notification = self.disable_notification if disable_notification is None else disable_notification
+ protect_content = self.protect_content if protect_content is None else protect_content
+
+ result = apihelper.copy_messages(
+ self.token, chat_id, from_chat_id, message_ids, disable_notification=disable_notification,
+ message_thread_id=message_thread_id, protect_content=protect_content, remove_caption=remove_caption,
+ direct_messages_topic_id=direct_messages_topic_id)
+ return [types.MessageID.de_json(message_id) for message_id in result]
+
+ def send_checklist(
+ self, business_connection_id: str, chat_id: Union[int, str],
+ checklist: types.InputChecklist,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ message_effect_id: Optional[str]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> types.Message:
+ """
+ Use this method to send a checklist on behalf of a connected business account. On success,
+ the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendchecklist
+
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param checklist: A JSON-serialized object for the checklist to send
+ :type checklist: :class:`telebot.types.InputChecklist`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param reply_parameters: Additional parameters for replies to messages
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ apihelper.send_checklist(
+ self.token, business_connection_id, chat_id, checklist, disable_notification=disable_notification,
+ protect_content=protect_content, message_effect_id=message_effect_id,
+ reply_parameters=reply_parameters, reply_markup=reply_markup))
+
+ def edit_message_checklist(
+ self, business_connection_id: str, chat_id: Union[int, str],
+ message_id: int, checklist: types.InputChecklist,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> types.Message:
+ """
+ Use this method to edit a checklist on behalf of a connected business account. On success,
+ the edited Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagechecklist
+
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Unique identifier for the target message
+ :type message_id: :obj:`int`
+
+ :param checklist: A JSON-serialized object for the new checklist
+ :type checklist: :class:`telebot.types.InputChecklist`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :return: On success, the edited Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ return types.Message.de_json(
+ apihelper.edit_message_checklist(
+ self.token, business_connection_id, chat_id, message_id, checklist, reply_markup=reply_markup))
+
+ def send_dice(
+ self, chat_id: Union[int, str],
+ emoji: Optional[str]=None, disable_notification: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#senddice
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”.
+ Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”
+ :type emoji: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions
+ to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Additional parameters for replies to messages
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ apihelper.send_dice(
+ self.token, chat_id, emoji=emoji, disable_notification=disable_notification,
+ reply_markup=reply_markup, timeout=timeout, protect_content=protect_content,
+ message_thread_id=message_thread_id, reply_parameters=reply_parameters, business_connection_id=business_connection_id,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+
+
+ def send_photo(
+ self, chat_id: Union[int, str], photo: Union[Any, str],
+ caption: Optional[str]=None, parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ message_thread_id: Optional[int]=None,
+ has_spoiler: Optional[bool]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ show_caption_above_media: Optional[bool]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send photos. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendphoto
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended),
+ pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data.
+ The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20.
+ :type photo: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption: Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the photo caption.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions
+ to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param has_spoiler: Pass True, if the photo should be sent as a spoiler
+ :type has_spoiler: :obj:`bool`
+
+ :param reply_parameters: Additional parameters for replies to messages
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.
+ :type show_caption_above_media: :obj:`bool`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ apihelper.send_photo(
+ self.token, chat_id, photo, caption=caption, reply_markup=reply_markup,
+ parse_mode=parse_mode, disable_notification=disable_notification, timeout=timeout,
+ caption_entities=caption_entities, protect_content=protect_content,
+ message_thread_id=message_thread_id, has_spoiler=has_spoiler, reply_parameters=reply_parameters,
+ business_connection_id=business_connection_id, message_effect_id=message_effect_id,
+ show_caption_above_media=show_caption_above_media, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ def send_audio(
+ self, chat_id: Union[int, str], audio: Union[Any, str],
+ caption: Optional[str]=None, duration: Optional[int]=None,
+ performer: Optional[str]=None, title: Optional[str]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ parse_mode: Optional[str]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ thumbnail: Optional[Union[Any, str]]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ thumb: Optional[Union[Any, str]]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send audio files, if you want Telegram clients to display them in the music player.
+ Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size,
+ this limit may be changed in the future.
+
+ For sending voice messages, use the send_voice method instead.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendaudio
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended),
+ pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data.
+ Audio must be in the .MP3 or .M4A format.
+ :type audio: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption: Audio caption, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param duration: Duration of the audio in seconds
+ :type duration: :obj:`int`
+
+ :param performer: Performer
+ :type performer: :obj:`str`
+
+ :param title: Track name
+ :type title: :obj:`str`
+
+ :param reply_markup:
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param parse_mode: Mode for parsing entities in the audio caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
+ The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320.
+ Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file,
+ so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under
+ :type thumbnail: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param thumb: deprecated.
+ :type thumb: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if thumb is not None and thumbnail is None:
+ logger.warning('The parameter "thumb" is deprecated. Use "thumbnail" instead.')
+ thumbnail = thumb
+
+ return types.Message.de_json(
+ apihelper.send_audio(
+ self.token, chat_id, audio, caption=caption, duration=duration, performer=performer, title=title,
+ reply_markup=reply_markup, parse_mode=parse_mode, disable_notification=disable_notification,
+ timeout=timeout, thumbnail=thumbnail, caption_entities=caption_entities, protect_content=protect_content,
+ message_thread_id=message_thread_id, reply_parameters=reply_parameters, business_connection_id=business_connection_id,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ def send_voice(
+ self, chat_id: Union[int, str], voice: Union[Any, str],
+ caption: Optional[str]=None, duration: Optional[int]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ parse_mode: Optional[str]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendvoice
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended),
+ pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.
+ :type voice: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption: Voice message caption, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param duration: Duration of the voice message in seconds
+ :type duration: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions
+ to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param parse_mode: Mode for parsing entities in the voice message caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ apihelper.send_voice(
+ self.token, chat_id, voice, caption=caption, duration=duration, reply_markup=reply_markup,
+ parse_mode=parse_mode, disable_notification=disable_notification, timeout=timeout,
+ caption_entities=caption_entities, protect_content=protect_content,
+ message_thread_id=message_thread_id, reply_parameters=reply_parameters, business_connection_id=business_connection_id,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+
+ def send_document(
+ self, chat_id: Union[int, str], document: Union[Any, str],
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ caption: Optional[str]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ parse_mode: Optional[str]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ thumbnail: Optional[Union[Any, str]]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ visible_file_name: Optional[str]=None,
+ disable_content_type_detection: Optional[bool]=None,
+ data: Optional[Union[Any, str]]=None,
+ protect_content: Optional[bool]=None, message_thread_id: Optional[int]=None,
+ thumb: Optional[Union[Any, str]]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send general files.
+
+ Telegram documentation: https://core.telegram.org/bots/api#senddocument
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param document: (document) File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a
+ String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data
+ :type document: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption: Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param parse_mode: Mode for parsing entities in the document caption
+ :type parse_mode: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param thumbnail: InputFile or String : Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under
+ :type thumbnail: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param visible_file_name: allows to define file name that will be visible in the Telegram instead of original file name
+ :type visible_file_name: :obj:`str`
+
+ :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data
+ :type disable_content_type_detection: :obj:`bool`
+
+ :param data: function typo miss compatibility: do not use it
+ :type data: :obj:`str`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The thread to which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param thumb: deprecated.
+ :type thumb: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if data and (not document):
+ logger.warning('The parameter "data" is deprecated. Use "document" instead.')
+ document = data
+
+ if thumb is not None and thumbnail is None:
+ logger.warning('The parameter "thumb" is deprecated. Use "thumbnail" instead.')
+ thumbnail = thumb
+
+ if isinstance(document, types.InputFile) and visible_file_name:
+ # inputfile name ignored, warn
+ logger.warning('Cannot use both InputFile and visible_file_name. InputFile name will be ignored.')
+
+ return types.Message.de_json(
+ apihelper.send_data(
+ self.token, chat_id, document, 'document',
+ reply_markup=reply_markup, parse_mode=parse_mode, disable_notification=disable_notification,
+ timeout=timeout, caption=caption, thumbnail=thumbnail, caption_entities=caption_entities,
+ disable_content_type_detection=disable_content_type_detection, visible_file_name=visible_file_name,
+ protect_content=protect_content, message_thread_id=message_thread_id, reply_parameters=reply_parameters,
+ business_connection_id=business_connection_id, message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters)
+ )
+
+
+ def send_sticker(
+ self, chat_id: Union[int, str],
+ sticker: Union[Any, str],
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ protect_content:Optional[bool]=None,
+ data: Union[Any, str]=None,
+ message_thread_id: Optional[int]=None,
+ emoji: Optional[str]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers.
+ On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendsticker
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL
+ as a String for Telegram to get a .webp file from the Internet, or upload a new one using multipart/form-data.
+ :type sticker: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param disable_notification: to disable the notification
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param data: function typo miss compatibility: do not use it
+ :type data: :obj:`str`
+
+ :param message_thread_id: The thread to which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param emoji: Emoji associated with the sticker; only for just uploaded stickers
+ :type emoji: :obj:`str`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if data and (not sticker):
+ logger.warning('The parameter "data" is deprecated. Use "sticker" instead.')
+ sticker = data
+
+ return types.Message.de_json(
+ apihelper.send_data(
+ self.token, chat_id, sticker, 'sticker',
+ reply_markup=reply_markup, disable_notification=disable_notification, timeout=timeout,
+ protect_content=protect_content, message_thread_id=message_thread_id, emoji=emoji,
+ reply_parameters=reply_parameters, business_connection_id=business_connection_id,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters)
+ )
+
+
+ def send_video(
+ self, chat_id: Union[int, str], video: Union[Any, str],
+ duration: Optional[int]=None,
+ width: Optional[int]=None,
+ height: Optional[int]=None,
+ thumbnail: Optional[Union[Any, str]]=None,
+ caption: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ supports_streaming: Optional[bool]=None,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ data: Optional[Union[Any, str]]=None,
+ message_thread_id: Optional[int]=None,
+ has_spoiler: Optional[bool]=None,
+ thumb: Optional[Union[Any, str]]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ show_caption_above_media: Optional[bool]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ cover: Optional[Union[Any, str]]=None,
+ start_timestamp: Optional[int]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document).
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendvideo
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param video: Video to send. You can either pass a file_id as String to resend a video that is already on the Telegram servers, or upload a new video file using multipart/form-data.
+ :type video: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param duration: Duration of sent video in seconds
+ :type duration: :obj:`int`
+
+ :param width: Video width
+ :type width: :obj:`int`
+
+ :param height: Video height
+ :type height: :obj:`int`
+
+ :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size.
+ A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file,
+ so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under .
+ :type thumbnail: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended),
+ pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under
+ name. More information on Sending Files »
+ :type cover: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param start_timestamp: Start timestamp for the video in the message
+ :type start_timestamp: :obj:`int`
+
+ :param caption: Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the video caption
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: List of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param supports_streaming: Pass True, if the uploaded video is suitable for streaming
+ :type supports_streaming: :obj:`bool`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param data: function typo miss compatibility: do not use it
+ :type data: :obj:`str`
+
+ :param message_thread_id: Identifier of a message thread, in which the video will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param has_spoiler: Pass True, if the video should be sent as a spoiler
+ :type has_spoiler: :obj:`bool`
+
+ :param thumb: deprecated.
+ :type thumb: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_parameters: Reply parameters
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Identifier of a message effect
+ :type message_effect_id: :obj:`str`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.
+ :type show_caption_above_media: :obj:`bool`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if data and (not video):
+ logger.warning('The parameter "data" is deprecated. Use "video" instead.')
+ video = data
+
+ if thumb is not None and thumbnail is None:
+ logger.warning('The parameter "thumb" is deprecated. Use "thumbnail" instead.')
+ thumbnail = thumb
+
+ return types.Message.de_json(
+ apihelper.send_video(
+ self.token, chat_id, video,
+ duration=duration, caption=caption, reply_markup=reply_markup, parse_mode=parse_mode,
+ supports_streaming=supports_streaming, disable_notification=disable_notification, timeout=timeout,
+ thumbnail=thumbnail, height=height, width=width, caption_entities=caption_entities,
+ protect_content=protect_content, message_thread_id=message_thread_id, has_spoiler=has_spoiler,
+ reply_parameters=reply_parameters, business_connection_id=business_connection_id, message_effect_id=message_effect_id,
+ show_caption_above_media=show_caption_above_media, allow_paid_broadcast=allow_paid_broadcast,
+ cover=cover, start_timestamp=start_timestamp, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters)
+ )
+
+
+ def send_animation(
+ self, chat_id: Union[int, str], animation: Union[Any, str],
+ duration: Optional[int]=None,
+ width: Optional[int]=None,
+ height: Optional[int]=None,
+ thumbnail: Optional[Union[Any, str]]=None,
+ caption: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ message_thread_id: Optional[int]=None,
+ has_spoiler: Optional[bool]=None,
+ thumb: Optional[Union[Any, str]]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ show_caption_above_media: Optional[bool]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound).
+ On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendanimation
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended),
+ pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data.
+ :type animation: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param duration: Duration of sent animation in seconds
+ :type duration: :obj:`int`
+
+ :param width: Animation width
+ :type width: :obj:`int`
+
+ :param height: Animation height
+ :type height: :obj:`int`
+
+ :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
+ The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320.
+ Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file,
+ so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under .
+ :type thumbnail: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption: Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the animation caption
+ :type parse_mode: :obj:`str`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param caption_entities: List of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param message_thread_id: Identifier of a message thread, in which the video will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param has_spoiler: Pass True, if the animation should be sent as a spoiler
+ :type has_spoiler: :obj:`bool`
+
+ :param thumb: deprecated.
+ :type thumb: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.
+ :type show_caption_above_media: :obj:`bool`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if thumbnail is None and thumb is not None:
+ logger.warning('The parameter "thumb" is deprecated. Use "thumbnail" instead.')
+ thumbnail = thumb
+
+ return types.Message.de_json(
+ apihelper.send_animation(
+ self.token, chat_id, animation, duration=duration, caption=caption, reply_markup=reply_markup,
+ parse_mode=parse_mode, disable_notification=disable_notification, timeout=timeout,
+ thumbnail=thumbnail, caption_entities=caption_entities, protect_content=protect_content,
+ width=width, height=height, message_thread_id=message_thread_id, reply_parameters=reply_parameters,
+ has_spoiler=has_spoiler, business_connection_id=business_connection_id, message_effect_id=message_effect_id,
+ show_caption_above_media=show_caption_above_media, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters)
+ )
+
+
+ def send_video_note(
+ self, chat_id: Union[int, str], data: Union[Any, str],
+ duration: Optional[int]=None,
+ length: Optional[int]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ thumbnail: Optional[Union[Any, str]]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ thumb: Optional[Union[Any, str]]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long.
+ Use this method to send video messages. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendvideonote
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param data: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended)
+ or upload a new video using multipart/form-data. Sending video notes by a URL is currently unsupported
+ :type data: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param duration: Duration of sent video in seconds
+ :type duration: :obj:`int`
+
+ :param length: Video width and height, i.e. diameter of the video message
+ :type length: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
+ The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320.
+ Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file,
+ so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under .
+ :type thumbnail: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the video note will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param thumb: deprecated.
+ :type thumb: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if thumbnail is None and thumb is not None:
+ logger.warning('The parameter "thumb" is deprecated. Use "thumbnail" instead.')
+ thumbnail = thumb
+
+ return types.Message.de_json(
+ apihelper.send_video_note(
+ self.token, chat_id, data, duration=duration, length=length, reply_markup=reply_markup,
+ disable_notification=disable_notification, timeout=timeout, thumbnail=thumbnail,
+ protect_content=protect_content, message_thread_id=message_thread_id, reply_parameters=reply_parameters,
+ business_connection_id=business_connection_id, message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters)
+ )
+
+ def send_paid_media(
+ self, chat_id: Union[int, str], star_count: int, media: List[types.InputPaidMedia],
+ caption: Optional[str]=None, parse_mode: Optional[str]=None, caption_entities: Optional[List[types.MessageEntity]]=None,
+ show_caption_above_media: Optional[bool]=None, disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None, reply_parameters: Optional[types.ReplyParameters]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None, business_connection_id: Optional[str]=None,
+ payload: Optional[str]=None, allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None
+ ) -> types.Message:
+ """
+ Use this method to send paid media to channel chats. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendpaidmedia
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param star_count: The number of Telegram Stars that must be paid to buy access to the media
+ :type star_count: :obj:`int`
+
+ :param media: A JSON-serialized array describing the media to be sent; up to 10 items
+ :type media: :obj:`list` of :class:`telebot.types.InputPaidMedia`
+
+ :param caption: Media caption, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the media caption
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: List of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media
+ :type show_caption_above_media: :obj:`bool`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_parameters: Description of the message to reply to
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove` or :class:`telebot.types.ForceReply`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.
+ :type payload: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ return types.Message.de_json(
+ apihelper.send_paid_media(
+ self.token, chat_id, star_count, media, caption=caption, parse_mode=parse_mode,
+ caption_entities=caption_entities, show_caption_above_media=show_caption_above_media,
+ disable_notification=disable_notification, protect_content=protect_content,
+ reply_parameters=reply_parameters, reply_markup=reply_markup, business_connection_id=business_connection_id,
+ payload=payload, allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters)
+ )
+
+
+ def send_media_group(
+ self, chat_id: Union[int, str],
+ media: List[Union[
+ types.InputMediaAudio, types.InputMediaDocument,
+ types.InputMediaPhoto, types.InputMediaVideo]],
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None) -> List[types.Message]:
+ """
+ Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files
+ can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendmediagroup
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
+ :type media: :obj:`list` of :obj:`types.InputMedia`
+
+ :param disable_notification: Sends the messages silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: Identifier of a message thread, in which the media group will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :return: On success, an array of Messages that were sent is returned.
+ :rtype: List[types.Message]
+ """
+ if media:
+ # Pass default parse mode to Media items
+ for media_item in media:
+ if media_item.parse_mode is None:
+ media_item.parse_mode = self.parse_mode
+
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ result = apihelper.send_media_group(
+ self.token, chat_id, media, disable_notification=disable_notification, timeout=timeout,
+ protect_content=protect_content, message_thread_id=message_thread_id, reply_parameters=reply_parameters,
+ business_connection_id=business_connection_id, message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id)
+ return [types.Message.de_json(msg) for msg in result]
+
+
+ def send_location(
+ self, chat_id: Union[int, str],
+ latitude: float, longitude: float,
+ live_period: Optional[int]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ horizontal_accuracy: Optional[float]=None,
+ heading: Optional[int]=None,
+ proximity_alert_radius: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send point on the map. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendlocation
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param latitude: Latitude of the location
+ :type latitude: :obj:`float`
+
+ :param longitude: Longitude of the location
+ :type longitude: :obj:`float`
+
+ :param live_period: Period in seconds during which the location will be updated (see Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
+ :type live_period: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
+ :type horizontal_accuracy: :obj:`float`
+
+ :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
+ :type heading: :obj:`int`
+
+ :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
+ :type proximity_alert_radius: :obj:`int`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :parameter message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ apihelper.send_location(
+ self.token, chat_id, latitude, longitude, live_period=live_period, reply_markup=reply_markup,
+ disable_notification=disable_notification, timeout=timeout, horizontal_accuracy=horizontal_accuracy,
+ heading=heading, proximity_alert_radius=proximity_alert_radius, protect_content=protect_content,
+ message_thread_id=message_thread_id, reply_parameters=reply_parameters, business_connection_id=business_connection_id,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters)
+ )
+
+
+ def edit_message_live_location(
+ self, latitude: float, longitude: float,
+ chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ timeout: Optional[int]=None,
+ horizontal_accuracy: Optional[float]=None,
+ heading: Optional[int]=None,
+ proximity_alert_radius: Optional[int]=None,
+ live_period: Optional[int]=None,
+ business_connection_id: Optional[str]=None
+ ) -> Union[types.Message, bool]:
+ """
+ Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly
+ disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message
+ is returned, otherwise True is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagelivelocation
+
+ :param latitude: Latitude of new location
+ :type latitude: :obj:`float`
+
+ :param longitude: Longitude of new location
+ :type longitude: :obj:`float`
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the message to edit
+ :type message_id: :obj:`int`
+
+ :param reply_markup: A JSON-serialized object for a new inline keyboard.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
+ :type horizontal_accuracy: :obj:`float`
+
+ :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
+ :type heading: :obj:`int`
+
+ :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
+ :type proximity_alert_radius: :obj:`int`
+
+ :param live_period: New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged
+ :type live_period: :obj:`int`
+
+ :param business_connection_id: Identifier of a business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
+ :rtype: :class:`telebot.types.Message` or bool
+ """
+ return types.Message.de_json(
+ apihelper.edit_message_live_location(
+ self.token, latitude, longitude, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id,
+ reply_markup=reply_markup, timeout=timeout, horizontal_accuracy=horizontal_accuracy, heading=heading,
+ proximity_alert_radius=proximity_alert_radius, live_period=live_period, business_connection_id=business_connection_id)
+ )
+
+
+ def stop_message_live_location(
+ self, chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ timeout: Optional[int]=None,
+ business_connection_id: Optional[str]=None) -> Union[types.Message, bool]:
+ """
+ Use this method to stop updating a live location message before live_period expires.
+ On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#stopmessagelivelocation
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the message with live location to stop
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message with live location to stop
+ :type inline_message_id: :obj:`str`
+
+ :param reply_markup: A JSON-serialized object for a new inline keyboard.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param business_connection_id: Identifier of a business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
+ :rtype: :class:`telebot.types.Message` or bool
+ """
+ return types.Message.de_json(
+ apihelper.stop_message_live_location(
+ self.token, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id,
+ reply_markup=reply_markup, timeout=timeout, business_connection_id=business_connection_id)
+ )
+
+
+ def send_venue(
+ self, chat_id: Union[int, str],
+ latitude: Optional[float], longitude: Optional[float],
+ title: str, address: str,
+ foursquare_id: Optional[str]=None,
+ foursquare_type: Optional[str]=None,
+ disable_notification: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ google_place_id: Optional[str]=None,
+ google_place_type: Optional[str]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send information about a venue. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendvenue
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param latitude: Latitude of the venue
+ :type latitude: :obj:`float`
+
+ :param longitude: Longitude of the venue
+ :type longitude: :obj:`float`
+
+ :param title: Name of the venue
+ :type title: :obj:`str`
+
+ :param address: Address of the venue
+ :type address: :obj:`str`
+
+ :param foursquare_id: Foursquare identifier of the venue
+ :type foursquare_id: :obj:`str`
+
+ :param foursquare_type: Foursquare type of the venue, if known. (For example, “arts_entertainment/default”,
+ “arts_entertainment/aquarium” or “food/icecream”.)
+ :type foursquare_type: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard,
+ custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param google_place_id: Google Places identifier of the venue
+ :type google_place_id: :obj:`str`
+
+ :param google_place_type: Google Places type of the venue.
+ :type google_place_type: :obj:`str`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The thread identifier of a message from which the reply will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ apihelper.send_venue(
+ self.token, chat_id, latitude, longitude, title, address, foursquare_id=foursquare_id,
+ foursquare_type=foursquare_type, disable_notification=disable_notification, reply_markup=reply_markup,
+ timeout=timeout, google_place_id=google_place_id, google_place_type=google_place_type,
+ protect_content=protect_content, message_thread_id=message_thread_id, reply_parameters=reply_parameters, business_connection_id=business_connection_id,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters)
+ )
+
+
+ def send_contact(
+ self, chat_id: Union[int, str], phone_number: str,
+ first_name: str, last_name: Optional[str]=None,
+ vcard: Optional[str]=None,
+ disable_notification: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ protect_content: Optional[bool]=None, message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send phone contacts. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendcontact
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param phone_number: Contact's phone number
+ :type phone_number: :obj:`str`
+
+ :param first_name: Contact's first name
+ :type first_name: :obj:`str`
+
+ :param last_name: Contact's last name
+ :type last_name: :obj:`str`
+
+ :param vcard: Additional data about the contact in the form of a vCard, 0-2048 bytes
+ :type vcard: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated.
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard,
+ custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The thread identifier of a message from which the reply will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ apihelper.send_contact(
+ self.token, chat_id, phone_number, first_name, last_name=last_name, vcard=vcard,
+ disable_notification=disable_notification, reply_markup=reply_markup, timeout=timeout,
+ protect_content=protect_content, message_thread_id=message_thread_id, reply_parameters=reply_parameters,
+ business_connection_id=business_connection_id, message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters)
+ )
+
+
+ def send_chat_action(
+ self, chat_id: Union[int, str], action: str, timeout: Optional[int]=None, message_thread_id: Optional[int]=None,
+ business_connection_id: Optional[str]=None) -> bool:
+ """
+ Use this method when you need to tell the user that something is happening on the bot's side.
+ The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).
+ Returns True on success.
+
+ Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of
+ “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo. The user will see a “sending photo” status for the bot.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendchataction
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param action: Type of action to broadcast. Choose one, depending on what the user is about
+ to receive: typing for text messages, upload_photo for photos, record_video or upload_video
+ for videos, record_voice or upload_voice for voice notes, upload_document for general files,
+ choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes.
+ :type action: :obj:`str`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: The thread identifier of a message from which the reply will be sent(supergroups only)
+ :type message_thread_id: :obj:`int`
+
+ :param business_connection_id: Identifier of a business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.send_chat_action(
+ self.token, chat_id, action, timeout=timeout, message_thread_id=message_thread_id, business_connection_id=business_connection_id)
+
+
+ @util.deprecated(deprecation_text="Use ban_chat_member instead")
+ def kick_chat_member(
+ self, chat_id: Union[int, str], user_id: int,
+ until_date:Optional[Union[int, datetime]]=None,
+ revoke_messages: Optional[bool]=None) -> bool:
+ """
+ This function is deprecated. Use `ban_chat_member` instead.
+ """
+ return apihelper.ban_chat_member(
+ self.token, chat_id, user_id, until_date=until_date, revoke_messages=revoke_messages)
+
+
+ def ban_chat_member(
+ self, chat_id: Union[int, str], user_id: int,
+ until_date: Optional[Union[int, datetime]]=None,
+ revoke_messages: Optional[bool]=None) -> bool:
+ """
+ Use this method to ban a user in a group, a supergroup or a channel.
+ In the case of supergroups and channels, the user will not be able to return to the chat on their
+ own using invite links, etc., unless unbanned first.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#banchatmember
+
+ :param chat_id: Unique identifier for the target group or username of the target supergroup
+ or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param until_date: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or
+ less than 30 seconds from the current time they are considered to be banned forever
+ :type until_date: :obj:`int` or :obj:`datetime`
+
+ :param revoke_messages: Pass True to delete all messages from the chat for the user that is being removed.
+ If False, the user will be able to see messages in the group that were sent before the user was removed.
+ Always True for supergroups and channels.
+ :type revoke_messages: :obj:`bool`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.ban_chat_member(
+ self.token, chat_id, user_id, until_date=until_date, revoke_messages=revoke_messages)
+
+
+ def unban_chat_member(
+ self, chat_id: Union[int, str], user_id: int,
+ only_if_banned: Optional[bool]=False) -> bool:
+ """
+ Use this method to unban a previously kicked user in a supergroup or channel.
+ The user will not return to the group or channel automatically, but will be able to join via link, etc.
+ The bot must be an administrator for this to work. By default, this method guarantees that after the call
+ the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat
+ they will also be removed from the chat. If you don't want this, use the parameter only_if_banned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unbanchatmember
+
+ :param chat_id: Unique identifier for the target group or username of the target supergroup or channel
+ (in the format @username)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param only_if_banned: Do nothing if the user is not banned
+ :type only_if_banned: :obj:`bool`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ return apihelper.unban_chat_member(self.token, chat_id, user_id, only_if_banned)
+
+
+ def restrict_chat_member(
+ self, chat_id: Union[int, str], user_id: int,
+ until_date: Optional[Union[int, datetime]]=None,
+ can_send_messages: Optional[bool]=None,
+ can_send_media_messages: Optional[bool]=None,
+ can_send_polls: Optional[bool]=None,
+ can_send_other_messages: Optional[bool]=None,
+ can_add_web_page_previews: Optional[bool]=None,
+ can_change_info: Optional[bool]=None,
+ can_invite_users: Optional[bool]=None,
+ can_pin_messages: Optional[bool]=None,
+ permissions: Optional[types.ChatPermissions]=None,
+ use_independent_chat_permissions: Optional[bool]=None) -> bool:
+ """
+ Use this method to restrict a user in a supergroup.
+ The bot must be an administrator in the supergroup for this to work and must have
+ the appropriate admin rights. Pass True for all boolean parameters to lift restrictions from a user.
+
+ Telegram documentation: https://core.telegram.org/bots/api#restrictchatmember
+
+ .. warning::
+ Individual parameters are deprecated and will be removed, use 'permissions' instead.
+
+ :param chat_id: Unique identifier for the target group or username of the target supergroup
+ or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param until_date: Date when restrictions will be lifted for the user, unix time.
+ If user is restricted for more than 366 days or less than 30 seconds from the current time,
+ they are considered to be restricted forever
+ :type until_date: :obj:`int` or :obj:`datetime`, optional
+
+ :param can_send_messages: deprecated
+ :type can_send_messages: :obj:`bool`
+
+ :param can_send_media_messages: deprecated
+ :type can_send_media_messages: :obj:`bool`
+
+ :param can_send_polls: deprecated
+ :type can_send_polls: :obj:`bool`
+
+ :param can_send_other_messages: deprecated
+ :type can_send_other_messages: :obj:`bool`
+
+ :param can_add_web_page_previews: deprecated
+ :type can_add_web_page_previews: :obj:`bool`
+
+ :param can_change_info: deprecated
+ :type can_change_info: :obj:`bool`
+
+ :param can_invite_users: deprecated
+ :type can_invite_users: :obj:`bool`
+
+ :param can_pin_messages: deprecated
+ :type can_pin_messages: :obj:`bool`
+
+ :param use_independent_chat_permissions: Pass True if chat permissions are set independently.
+ Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages,
+ can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes
+ permissions; the can_send_polls permission will imply the can_send_messages permission.
+ :type use_independent_chat_permissions: :obj:`bool`, optional
+
+ :param permissions: ChatPermissions object defining permissions.
+ :type permissions: :class:`telebot.types.ChatPermissions`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ if permissions is None:
+ logger.warning('The parameters "can_..." are deprecated, use "permissions" instead.')
+ permissions = types.ChatPermissions(
+ can_send_messages=can_send_messages,
+ can_send_media_messages=can_send_media_messages,
+ can_send_polls=can_send_polls,
+ can_send_other_messages=can_send_other_messages,
+ can_add_web_page_previews=can_add_web_page_previews,
+ can_change_info=can_change_info,
+ can_invite_users=can_invite_users,
+ can_pin_messages=can_pin_messages
+ )
+
+ return apihelper.restrict_chat_member(
+ self.token, chat_id, user_id, permissions, until_date=until_date,
+ use_independent_chat_permissions=use_independent_chat_permissions)
+
+
+ def promote_chat_member(
+ self, chat_id: Union[int, str], user_id: int,
+ can_change_info: Optional[bool]=None,
+ can_post_messages: Optional[bool]=None,
+ can_edit_messages: Optional[bool]=None,
+ can_delete_messages: Optional[bool]=None,
+ can_invite_users: Optional[bool]=None,
+ can_restrict_members: Optional[bool]=None,
+ can_pin_messages: Optional[bool]=None,
+ can_promote_members: Optional[bool]=None,
+ is_anonymous: Optional[bool]=None,
+ can_manage_chat: Optional[bool]=None,
+ can_manage_video_chats: Optional[bool]=None,
+ can_manage_voice_chats: Optional[bool]=None,
+ can_manage_topics: Optional[bool]=None,
+ can_post_stories: Optional[bool]=None,
+ can_edit_stories: Optional[bool]=None,
+ can_delete_stories: Optional[bool]=None,
+ can_manage_direct_messages: Optional[bool]=None) -> bool:
+ """
+ Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator
+ in the chat for this to work and must have the appropriate admin rights.
+ Pass False for all boolean parameters to demote a user.
+
+ Telegram documentation: https://core.telegram.org/bots/api#promotechatmember
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (
+ in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param can_change_info: Pass True, if the administrator can change chat title, photo and other settings
+ :type can_change_info: :obj:`bool`
+
+ :param can_post_messages: Pass True, if the administrator can create channel posts, channels only
+ :type can_post_messages: :obj:`bool`
+
+ :param can_edit_messages: Pass True, if the administrator can edit messages of other users, channels only
+ :type can_edit_messages: :obj:`bool`
+
+ :param can_delete_messages: Pass True, if the administrator can delete messages of other users
+ :type can_delete_messages: :obj:`bool`
+
+ :param can_invite_users: Pass True, if the administrator can invite new users to the chat
+ :type can_invite_users: :obj:`bool`
+
+ :param can_restrict_members: Pass True, if the administrator can restrict, ban or unban chat members
+ :type can_restrict_members: :obj:`bool`
+
+ :param can_pin_messages: Pass True, if the administrator can pin messages, supergroups only
+ :type can_pin_messages: :obj:`bool`
+
+ :param can_promote_members: Pass True, if the administrator can add new administrators with a subset
+ of his own privileges or demote administrators that he has promoted, directly or indirectly
+ (promoted by administrators that were appointed by him)
+ :type can_promote_members: :obj:`bool`
+
+ :param is_anonymous: Pass True, if the administrator's presence in the chat is hidden
+ :type is_anonymous: :obj:`bool`
+
+ :param can_manage_chat: Pass True, if the administrator can access the chat event log, chat statistics,
+ message statistics in channels, see channel members,
+ see anonymous administrators in supergroups and ignore slow mode.
+ Implied by any other administrator privilege
+ :type can_manage_chat: :obj:`bool`
+
+ :param can_manage_video_chats: Pass True, if the administrator can manage voice chats
+ For now, bots can use this privilege only for passing to other administrators.
+ :type can_manage_video_chats: :obj:`bool`
+
+ :param can_manage_voice_chats: Deprecated, use can_manage_video_chats.
+ :type can_manage_voice_chats: :obj:`bool`
+
+ :param can_manage_topics: Pass True if the user is allowed to create, rename, close,
+ and reopen forum topics, supergroups only
+ :type can_manage_topics: :obj:`bool`
+
+ :param can_post_stories: Pass True if the administrator can create the channel's stories
+ :type can_post_stories: :obj:`bool`
+
+ :param can_edit_stories: Pass True if the administrator can edit the channel's stories
+ :type can_edit_stories: :obj:`bool`
+
+ :param can_delete_stories: Pass True if the administrator can delete the channel's stories
+ :type can_delete_stories: :obj:`bool`
+
+ :param can_manage_direct_messages: Pass True if the administrator can manage direct messages
+ within the channel and decline suggested posts; for channels only
+ :type can_manage_direct_messages: :obj:`bool`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ if can_manage_voice_chats is not None:
+ logger.warning('The parameter "can_manage_voice_chats" is deprecated. Use "can_manage_video_chats" instead.')
+ if can_manage_video_chats is None:
+ can_manage_video_chats = can_manage_voice_chats
+
+ return apihelper.promote_chat_member(
+ self.token, chat_id, user_id, can_change_info=can_change_info, can_post_messages=can_post_messages,
+ can_edit_messages=can_edit_messages, can_delete_messages=can_delete_messages,
+ can_invite_users=can_invite_users, can_restrict_members=can_restrict_members,
+ can_pin_messages=can_pin_messages, can_promote_members=can_promote_members,
+ is_anonymous=is_anonymous, can_manage_chat=can_manage_chat,
+ can_manage_video_chats=can_manage_video_chats, can_manage_topics=can_manage_topics,
+ can_post_stories=can_post_stories, can_edit_stories=can_edit_stories,
+ can_delete_stories=can_delete_stories, can_manage_direct_messages=can_manage_direct_messages,
+ )
+
+
+ def set_chat_administrator_custom_title(
+ self, chat_id: Union[int, str], user_id: int, custom_title: str) -> bool:
+ """
+ Use this method to set a custom title for an administrator in a supergroup promoted by the bot.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatadministratorcustomtitle
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup
+ (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param custom_title: New custom title for the administrator;
+ 0-16 characters, emoji are not allowed
+ :type custom_title: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_chat_administrator_custom_title(self.token, chat_id, user_id, custom_title)
+
+
+ def ban_chat_sender_chat(self, chat_id: Union[int, str], sender_chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to ban a channel chat in a supergroup or a channel.
+ The owner of the chat will not be able to send messages and join live
+ streams on behalf of the chat, unless it is unbanned first.
+ The bot must be an administrator in the supergroup or channel
+ for this to work and must have the appropriate administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#banchatsenderchat
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param sender_chat_id: Unique identifier of the target sender chat
+ :type sender_chat_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.ban_chat_sender_chat(self.token, chat_id, sender_chat_id)
+
+
+ def unban_chat_sender_chat(self, chat_id: Union[int, str], sender_chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to unban a previously banned channel chat in a supergroup or channel.
+ The bot must be an administrator for this to work and must have the appropriate
+ administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unbanchatsenderchat
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param sender_chat_id: Unique identifier of the target sender chat.
+ :type sender_chat_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.unban_chat_sender_chat(self.token, chat_id, sender_chat_id)
+
+
+ def set_chat_permissions(
+ self, chat_id: Union[int, str], permissions: types.ChatPermissions,
+ use_independent_chat_permissions: Optional[bool]=None) -> bool:
+ """
+ Use this method to set default chat permissions for all members.
+ The bot must be an administrator in the group or a supergroup for this to work
+ and must have the can_restrict_members admin rights.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatpermissions
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup
+ (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param permissions: New default chat permissions
+ :type permissions: :class:`telebot.types..ChatPermissions`
+
+ :param use_independent_chat_permissions: Pass True if chat permissions are set independently. Otherwise,
+ the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages,
+ can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and
+ can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.
+ :type use_independent_chat_permissions: :obj:`bool`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_chat_permissions(
+ self.token, chat_id, permissions, use_independent_chat_permissions=use_independent_chat_permissions)
+
+
+ def create_chat_invite_link(
+ self, chat_id: Union[int, str],
+ name: Optional[str]=None,
+ expire_date: Optional[Union[int, datetime]]=None,
+ member_limit: Optional[int]=None,
+ creates_join_request: Optional[bool]=None) -> types.ChatInviteLink:
+ """
+ Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and
+ must have the appropriate administrator rights.
+ The link can be revoked using the method revokeChatInviteLink.
+ Returns the new invite link as ChatInviteLink object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#createchatinvitelink
+
+ :param chat_id: Id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param name: Invite link name; 0-32 characters
+ :type name: :obj:`str`
+
+ :param expire_date: Point in time (Unix timestamp) when the link will expire
+ :type expire_date: :obj:`int` or :obj:`datetime`
+
+ :param member_limit: Maximum number of users that can be members of the chat simultaneously
+ :type member_limit: :obj:`int`
+
+ :param creates_join_request: True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified
+ :type creates_join_request: :obj:`bool`
+
+ :return: Returns the new invite link as ChatInviteLink object.
+ :rtype: :class:`telebot.types.ChatInviteLink`
+ """
+ return types.ChatInviteLink.de_json(
+ apihelper.create_chat_invite_link(self.token, chat_id, name, expire_date, member_limit, creates_join_request)
+ )
+
+
+ def edit_chat_invite_link(
+ self, chat_id: Union[int, str],
+ invite_link: Optional[str] = None,
+ name: Optional[str]=None,
+ expire_date: Optional[Union[int, datetime]]=None,
+ member_limit: Optional[int]=None,
+ creates_join_request: Optional[bool]=None) -> types.ChatInviteLink:
+ """
+ Use this method to edit a non-primary invite link created by the bot.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editchatinvitelink
+
+ :param chat_id: Id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param name: Invite link name; 0-32 characters
+ :type name: :obj:`str`
+
+ :param invite_link: The invite link to edit
+ :type invite_link: :obj:`str`
+
+ :param expire_date: Point in time (Unix timestamp) when the link will expire
+ :type expire_date: :obj:`int` or :obj:`datetime`
+
+ :param member_limit: Maximum number of users that can be members of the chat simultaneously
+ :type member_limit: :obj:`int`
+
+ :param creates_join_request: True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified
+ :type creates_join_request: :obj:`bool`
+
+ :return: Returns the new invite link as ChatInviteLink object.
+ :rtype: :class:`telebot.types.ChatInviteLink`
+ """
+ return types.ChatInviteLink.de_json(
+ apihelper.edit_chat_invite_link(self.token, chat_id, invite_link, name, expire_date, member_limit, creates_join_request)
+ )
+
+ def create_chat_subscription_invite_link(
+ self, chat_id: Union[int, str], subscription_period: int, subscription_price: int,
+ name: Optional[str]=None) -> types.ChatInviteLink:
+ """
+ Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights.
+ The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink.
+ Returns the new invite link as a ChatInviteLink object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#createchatsubscriptioninvitelink
+
+ :param chat_id: Unique identifier for the target channel chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param name: Invite link name; 0-32 characters
+ :type name: :obj:`str`
+
+ :param subscription_period: The number of seconds the subscription will be active for before the next payment.
+ Currently, it must always be 2592000 (30 days).
+ :type subscription_period: :obj:`int`
+
+ :param subscription_price: The amount of Telegram Stars a user must pay initially and after each subsequent
+ subscription period to be a member of the chat; 1-2500
+ :type subscription_price: :obj:`int`
+
+ :return: Returns the new invite link as a ChatInviteLink object.
+ :rtype: :class:`telebot.types.ChatInviteLink`
+ """
+ return types.ChatInviteLink.de_json(
+ apihelper.create_chat_subscription_invite_link(self.token, chat_id, subscription_period, subscription_price, name=name)
+ )
+
+ def edit_chat_subscription_invite_link(
+ self, chat_id: Union[int, str], invite_link: str, name: Optional[str]=None) -> types.ChatInviteLink:
+ """
+ Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights.
+ Returns the edited invite link as a ChatInviteLink object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editchatsubscriptioninvitelink
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param invite_link: The invite link to edit
+ :type invite_link: :obj:`str`
+
+ :param name: Invite link name; 0-32 characters
+ :type name: :obj:`str`
+
+ :return: Returns the edited invite link as a ChatInviteLink object.
+ :rtype: :class:`telebot.types.ChatInviteLink`
+ """
+ return types.ChatInviteLink.de_json(
+ apihelper.edit_chat_subscription_invite_link(self.token, chat_id, invite_link, name=name)
+ )
+
+ def revoke_chat_invite_link(
+ self, chat_id: Union[int, str], invite_link: str) -> types.ChatInviteLink:
+ """
+ Use this method to revoke an invite link created by the bot.
+ Note: If the primary link is revoked, a new link is automatically generated The bot must be an administrator
+ in the chat for this to work and must have the appropriate admin rights.
+
+ Telegram documentation: https://core.telegram.org/bots/api#revokechatinvitelink
+
+ :param chat_id: Id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param invite_link: The invite link to revoke
+ :type invite_link: :obj:`str`
+
+ :return: Returns the new invite link as ChatInviteLink object.
+ :rtype: :class:`telebot.types.ChatInviteLink`
+ """
+ return types.ChatInviteLink.de_json(
+ apihelper.revoke_chat_invite_link(self.token, chat_id, invite_link)
+ )
+
+
+ def export_chat_invite_link(self, chat_id: Union[int, str]) -> str:
+ """
+ Use this method to export an invite link to a supergroup or a channel. The bot must be an administrator
+ in the chat for this to work and must have the appropriate admin rights.
+
+ Telegram documentation: https://core.telegram.org/bots/api#exportchatinvitelink
+
+ :param chat_id: Id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: exported invite link as String on success.
+ :rtype: :obj:`str`
+ """
+ return apihelper.export_chat_invite_link(self.token, chat_id)
+
+
+ def approve_chat_join_request(self, chat_id: Union[str, int], user_id: Union[int, str]) -> bool:
+ """
+ Use this method to approve a chat join request.
+ The bot must be an administrator in the chat for this to work and must have
+ the can_invite_users administrator right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#approvechatjoinrequest
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup
+ (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.approve_chat_join_request(self.token, chat_id, user_id)
+
+
+ def decline_chat_join_request(self, chat_id: Union[str, int], user_id: Union[int, str]) -> bool:
+ """
+ Use this method to decline a chat join request.
+ The bot must be an administrator in the chat for this to work and must have
+ the can_invite_users administrator right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#declinechatjoinrequest
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup
+ (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.decline_chat_join_request(self.token, chat_id, user_id)
+
+
+ def set_chat_photo(self, chat_id: Union[int, str], photo: Any) -> bool:
+ """
+ Use this method to set a new profile photo for the chat. Photos can't be changed for private chats.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+ Note: In regular groups (non-supergroups), this method will only work if the ‘All Members Are Admins’
+ setting is off in the target group.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatphoto
+
+ :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param photo: InputFile: New chat photo, uploaded using multipart/form-data
+ :type photo: :obj:`typing.Union[file_like, str]`
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_chat_photo(self.token, chat_id, photo)
+
+
+ def delete_chat_photo(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to delete a chat photo. Photos can't be changed for private chats.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+ Note: In regular groups (non-supergroups), this method will only work if the ‘All Members Are Admins’ setting is off in the target group.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletechatphoto
+
+ :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.delete_chat_photo(self.token, chat_id)
+
+
+ def get_my_commands(self, scope: Optional[types.BotCommandScope]=None,
+ language_code: Optional[str]=None) -> List[types.BotCommand]:
+ """
+ Use this method to get the current list of the bot's commands.
+ Returns List of BotCommand on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getmycommands
+
+ :param scope: The scope of users for which the commands are relevant.
+ Defaults to BotCommandScopeDefault.
+ :type scope: :class:`telebot.types.BotCommandScope`
+
+ :param language_code: A two-letter ISO 639-1 language code. If empty,
+ commands will be applied to all users from the given scope,
+ for whose language there are no dedicated commands
+ :type language_code: :obj:`str`
+
+ :return: List of BotCommand on success.
+ :rtype: :obj:`list` of :class:`telebot.types.BotCommand`
+ """
+ result = apihelper.get_my_commands(self.token, scope=scope, language_code=language_code)
+ return [types.BotCommand.de_json(cmd) for cmd in result]
+
+
+ def set_my_name(self, name: Optional[str]=None, language_code: Optional[str]=None):
+ """
+ Use this method to change the bot's name. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setmyname
+
+ :param name: Optional. New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.
+ :type name: :obj:`str`
+
+ :param language_code: Optional. A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose
+ language there is no dedicated name.
+ :type language_code: :obj:`str`
+
+ :return: True on success.
+ """
+ return apihelper.set_my_name(self.token, name=name, language_code=language_code)
+
+
+ def get_my_name(self, language_code: Optional[str]=None):
+ """
+ Use this method to get the current bot name for the given user language.
+ Returns BotName on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getmyname
+
+ :param language_code: Optional. A two-letter ISO 639-1 language code or an empty string
+ :type language_code: :obj:`str`
+
+ :return: :class:`telebot.types.BotName`
+ """
+ return types.BotName.de_json(
+ apihelper.get_my_name(self.token, language_code=language_code)
+ )
+
+
+ def set_my_description(self, description: Optional[str]=None, language_code: Optional[str]=None):
+ """
+ Use this method to change the bot's description, which is shown in
+ the chat with the bot if the chat is empty.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setmydescription
+
+ :param description: New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.
+ :type description: :obj:`str`
+
+ :param language_code: A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for
+ whose language there is no dedicated description.
+ :type language_code: :obj:`str`
+
+ :return: True on success.
+ """
+
+ return apihelper.set_my_description(
+ self.token, description=description, language_code=language_code)
+
+
+ def get_my_description(self, language_code: Optional[str]=None):
+ """
+ Use this method to get the current bot description for the given user language.
+ Returns BotDescription on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getmydescription
+
+ :param language_code: A two-letter ISO 639-1 language code or an empty string
+ :type language_code: :obj:`str`
+
+ :return: :class:`telebot.types.BotDescription`
+ """
+ return types.BotDescription.de_json(
+ apihelper.get_my_description(self.token, language_code=language_code))
+
+
+ def set_my_short_description(self, short_description:Optional[str]=None, language_code:Optional[str]=None):
+ """
+ Use this method to change the bot's short description, which is shown on the bot's profile page and
+ is sent together with the link when users share the bot.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setmyshortdescription
+
+ :param short_description: New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.
+ :type short_description: :obj:`str`
+
+ :param language_code: A two-letter ISO 639-1 language code.
+ If empty, the short description will be applied to all users for whose language there is no dedicated short description.
+ :type language_code: :obj:`str`
+
+ :return: True on success.
+ """
+ return apihelper.set_my_short_description(
+ self.token, short_description=short_description, language_code=language_code)
+
+
+ def get_my_short_description(self, language_code: Optional[str]=None):
+ """
+ Use this method to get the current bot short description for the given user language.
+ Returns BotShortDescription on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getmyshortdescription
+
+ :param language_code: A two-letter ISO 639-1 language code or an empty string
+ :type language_code: :obj:`str`
+
+ :return: :class:`telebot.types.BotShortDescription`
+ """
+ return types.BotShortDescription.de_json(
+ apihelper.get_my_short_description(self.token, language_code=language_code))
+
+
+ def set_chat_menu_button(self, chat_id: Union[int, str]=None, menu_button: types.MenuButton=None) -> bool:
+ """
+ Use this method to change the bot's menu button in a private chat,
+ or the default menu button.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatmenubutton
+
+ :param chat_id: Unique identifier for the target private chat.
+ If not specified, default bot's menu button will be changed.
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param menu_button: A JSON-serialized object for the new bot's menu button. Defaults to MenuButtonDefault
+ :type menu_button: :class:`telebot.types.MenuButton`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_chat_menu_button(self.token, chat_id=chat_id, menu_button=menu_button)
+
+
+ def get_chat_menu_button(self, chat_id: Union[int, str]=None) -> types.MenuButton:
+ """
+ Use this method to get the current value of the bot's menu button
+ in a private chat, or the default menu button.
+ Returns MenuButton on success.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#getchatmenubutton
+
+ :param chat_id: Unique identifier for the target private chat.
+ If not specified, default bot's menu button will be returned.
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: types.MenuButton
+ :rtype: :class:`telebot.types.MenuButton`
+ """
+ return types.MenuButton.de_json(
+ apihelper.get_chat_menu_button(self.token, chat_id=chat_id))
+
+
+ def set_my_default_administrator_rights(self, rights: types.ChatAdministratorRights=None,
+ for_channels: Optional[bool]=None) -> bool:
+ """
+ Use this method to change the default administrator rights requested by the bot
+ when it's added as an administrator to groups or channels.
+ These rights will be suggested to users, but they are are free to modify
+ the list before adding the bot.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setmydefaultadministratorrights
+
+ :param rights: A JSON-serialized object describing new default administrator rights. If not specified,
+ the default administrator rights will be cleared.
+ :type rights: :class:`telebot.types.ChatAdministratorRights`
+
+ :param for_channels: Pass True to change the default administrator rights of the bot in channels.
+ Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.
+ :type for_channels: :obj:`bool`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_my_default_administrator_rights(self.token, rights=rights, for_channels=for_channels)
+
+
+ def get_my_default_administrator_rights(self, for_channels: Optional[bool]=None) -> types.ChatAdministratorRights:
+ """
+ Use this method to get the current default administrator rights of the bot.
+ Returns ChatAdministratorRights on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getmydefaultadministratorrights
+
+ :param for_channels: Pass True to get the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be returned.
+ :type for_channels: :obj:`bool`
+
+ :return: Returns ChatAdministratorRights on success.
+ :rtype: :class:`telebot.types.ChatAdministratorRights`
+ """
+ return types.ChatAdministratorRights.de_json(
+ apihelper.get_my_default_administrator_rights(self.token, for_channels=for_channels)
+ )
+
+
+ def get_business_connection(self, business_connection_id: str) -> types.BusinessConnection:
+ """
+ Use this method to get information about the connection of the bot with a business account.
+ Returns a BusinessConnection object on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getbusinessconnection
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: Returns a BusinessConnection object on success.
+ :rtype: :class:`telebot.types.BusinessConnection`
+ """
+
+ return types.BusinessConnection.de_json(
+ apihelper.get_business_connection(self.token, business_connection_id)
+ )
+
+
+ def set_my_commands(self, commands: List[types.BotCommand],
+ scope: Optional[types.BotCommandScope]=None,
+ language_code: Optional[str]=None) -> bool:
+ """
+ Use this method to change the list of the bot's commands.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setmycommands
+
+ :param commands: List of BotCommand. At most 100 commands can be specified.
+ :type commands: :obj:`list` of :class:`telebot.types.BotCommand`
+
+ :param scope: The scope of users for which the commands are relevant.
+ Defaults to BotCommandScopeDefault.
+ :type scope: :class:`telebot.types.BotCommandScope`
+
+ :param language_code: A two-letter ISO 639-1 language code. If empty,
+ commands will be applied to all users from the given scope,
+ for whose language there are no dedicated commands
+ :type language_code: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_my_commands(self.token, commands, scope=scope, language_code=language_code)
+
+
+ def delete_my_commands(self, scope: Optional[types.BotCommandScope]=None,
+ language_code: Optional[str]=None) -> bool:
+ """
+ Use this method to delete the list of the bot's commands for the given scope and user language.
+ After deletion, higher level commands will be shown to affected users.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletemycommands
+
+ :param scope: The scope of users for which the commands are relevant.
+ Defaults to BotCommandScopeDefault.
+ :type scope: :class:`telebot.types.BotCommandScope`
+
+ :param language_code: A two-letter ISO 639-1 language code. If empty,
+ commands will be applied to all users from the given scope,
+ for whose language there are no dedicated commands
+ :type language_code: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.delete_my_commands(self.token, scope=scope, language_code=language_code)
+
+
+ def set_chat_title(self, chat_id: Union[int, str], title: str) -> bool:
+ """
+ Use this method to change the title of a chat. Titles can't be changed for private chats.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+ Note: In regular groups (non-supergroups), this method will only work if the ‘All Members Are Admins’
+ setting is off in the target group.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchattitle
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param title: New chat title, 1-255 characters
+ :type title: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_chat_title(self.token, chat_id, title)
+
+
+ def set_chat_description(self, chat_id: Union[int, str], description: Optional[str]=None) -> bool:
+ """
+ Use this method to change the description of a supergroup or a channel.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatdescription
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param description: Str: New chat description, 0-255 characters
+ :type description: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_chat_description(self.token, chat_id, description)
+
+
+ def pin_chat_message(
+ self, chat_id: Union[int, str], message_id: int,
+ disable_notification: Optional[bool]=False, business_connection_id: Optional[str]=None) -> bool:
+ """
+ Use this method to pin a message in a supergroup.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#pinchatmessage
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Identifier of a message to pin
+ :type message_id: :obj:`int`
+
+ :param disable_notification: Pass True, if it is not necessary to send a notification
+ to all group members about the new pinned message
+ :type disable_notification: :obj:`bool`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+
+ return apihelper.pin_chat_message(self.token, chat_id, message_id, disable_notification=disable_notification,
+ business_connection_id=business_connection_id)
+
+
+ def unpin_chat_message(self, chat_id: Union[int, str], message_id: Optional[int]=None, business_connection_id: Optional[str]=None) -> bool:
+ """
+ Use this method to unpin specific pinned message in a supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unpinchatmessage
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Int: Identifier of a message to unpin
+ :type message_id: :obj:`int`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.unpin_chat_message(self.token, chat_id, message_id, business_connection_id=business_connection_id)
+
+
+ def unpin_all_chat_messages(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to unpin a all pinned messages in a supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unpinallchatmessages
+
+ :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.unpin_all_chat_messages(self.token, chat_id)
+
+
+ def edit_message_text(
+ self, text: str,
+ chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ entities: Optional[List[types.MessageEntity]]=None,
+ disable_web_page_preview: Optional[bool]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ link_preview_options : Optional[types.LinkPreviewOptions]=None,
+ business_connection_id: Optional[str]=None,
+ timeout: Optional[int]=None) -> Union[types.Message, bool]:
+ """
+ Use this method to edit text and game messages.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagetext
+
+ :param text: New text of the message, 1-4096 characters after entities parsing
+ :type text: :obj:`str`
+
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the sent message
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the message text.
+ :type parse_mode: :obj:`str`
+
+ :param entities: List of special entities that appear in the message text, which can be specified instead of parse_mode
+ :type entities: List of :obj:`telebot.types.MessageEntity`
+
+ :param disable_web_page_preview: deprecated.
+ :type disable_web_page_preview: :obj:`bool`
+
+ :param reply_markup: A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :obj:`InlineKeyboardMarkup`
+
+ :param link_preview_options: A JSON-serialized object for options used to automatically generate previews for links.
+ :type link_preview_options: :obj:`LinkPreviewOptions`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :return: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
+ :rtype: :obj:`types.Message` or :obj:`bool`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+
+ if disable_web_page_preview is not None:
+ # show a deprecation warning
+ logger.warning("The parameter 'disable_web_page_preview' is deprecated. Use 'link_preview_options' instead.")
+
+ if link_preview_options:
+ # show a conflict warning
+ logger.warning("Both 'link_preview_options' and 'disable_web_page_preview' parameters are set: conflicting, 'disable_web_page_preview' is deprecated")
+ else:
+ # create a LinkPreviewOptions object
+ link_preview_options = types.LinkPreviewOptions(is_disabled=disable_web_page_preview)
+
+ if link_preview_options and (link_preview_options.is_disabled is None):
+ link_preview_options.is_disabled = self.disable_web_page_preview
+
+ # Fix preview link options if link_preview_options not provided. Get param from class
+ if not link_preview_options and self.disable_web_page_preview:
+ # create a LinkPreviewOptions object
+ link_preview_options = types.LinkPreviewOptions(is_disabled=self.disable_web_page_preview)
+
+ result = apihelper.edit_message_text(
+ self.token, text, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id,
+ parse_mode=parse_mode, entities=entities, reply_markup=reply_markup, link_preview_options=link_preview_options,
+ business_connection_id=business_connection_id, timeout=timeout)
+
+ if isinstance(result, bool): # if edit inline message return is bool not Message.
+ return result
+ return types.Message.de_json(result)
+
+
+ def edit_message_media(
+ self, media: Any, chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ business_connection_id: Optional[str]=None,
+ timeout: Optional[int]=None) -> Union[types.Message, bool]:
+ """
+ Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages.
+ If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise.
+ When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL.
+ On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
+ Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagemedia
+
+ :param media: A JSON-serialized object for a new media content of the message
+ :type media: :obj:`InputMedia`
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the sent message
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :param reply_markup: A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :obj:`telebot.types.InlineKeyboardMarkup` or :obj:`ReplyKeyboardMarkup` or :obj:`ReplyKeyboardRemove` or :obj:`ForceReply`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :return: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
+ :rtype: :obj:`types.Message` or :obj:`bool`
+ """
+ result = apihelper.edit_message_media(
+ self.token, media, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id,
+ reply_markup=reply_markup, business_connection_id=business_connection_id, timeout=timeout)
+
+ if isinstance(result, bool): # if edit inline message return is bool not Message.
+ return result
+ return types.Message.de_json(result)
+
+
+ def edit_message_reply_markup(
+ self, chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ business_connection_id: Optional[str]=None,
+ timeout: Optional[int]=None) -> Union[types.Message, bool]:
+ """
+ Use this method to edit only the reply markup of messages.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagereplymarkup
+
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the sent message
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :param reply_markup: A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :obj:`InlineKeyboardMarkup` or :obj:`ReplyKeyboardMarkup` or :obj:`ReplyKeyboardRemove` or :obj:`ForceReply`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :return: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
+ :rtype: :obj:`types.Message` or :obj:`bool`
+ """
+ result = apihelper.edit_message_reply_markup(
+ self.token, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id,
+ reply_markup=reply_markup, business_connection_id=business_connection_id, timeout=timeout)
+
+ if isinstance(result, bool):
+ return result
+ return types.Message.de_json(result)
+
+
+ def send_game(
+ self, chat_id: Union[int, str], game_short_name: str,
+ disable_notification: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None) -> types.Message:
+ """
+ Used to send the game.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendgame
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.
+ :type game_short_name: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :obj:`InlineKeyboardMarkup` or :obj:`ReplyKeyboardMarkup` or :obj:`ReplyKeyboardRemove` or :obj:`ForceReply`
+
+ :param timeout: Timeout in seconds for waiting for a response from the bot.
+ :type timeout: :obj:`int`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The identifier of a message thread, in which the game message will be sent.
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters
+ :type reply_parameters: :obj:`ReplyParameters`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :obj:`types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ # show a deprecation warning
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ apihelper.send_game(
+ self.token, chat_id, game_short_name, disable_notification=disable_notification,
+ reply_markup=reply_markup, timeout=timeout, protect_content=protect_content,
+ message_thread_id=message_thread_id, reply_parameters=reply_parameters, business_connection_id=business_connection_id,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast)
+ )
+
+
+ def set_game_score(
+ self, user_id: Union[int, str], score: int,
+ force: Optional[bool]=None,
+ chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ disable_edit_message: Optional[bool]=None) -> Union[types.Message, bool]:
+ """
+ Sets the value of points in the game to a specific user.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setgamescore
+
+ :param user_id: User identifier
+ :type user_id: :obj:`int` or :obj:`str`
+
+ :param score: New score, must be non-negative
+ :type score: :obj:`int`
+
+ :param force: Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters
+ :type force: :obj:`bool`
+
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the sent message
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :param disable_edit_message: Pass True, if the game message should not be automatically edited to include the current scoreboard
+ :type disable_edit_message: :obj:`bool`
+
+ :return: On success, if the message was sent by the bot, returns the edited Message, otherwise returns True.
+ :rtype: :obj:`types.Message` or :obj:`bool`
+ """
+ result = apihelper.set_game_score(
+ self.token, user_id, score, force=force, disable_edit_message=disable_edit_message,
+ chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id)
+
+ if isinstance(result, bool):
+ return result
+ return types.Message.de_json(result)
+
+
+ def get_game_high_scores(
+ self, user_id: int, chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None) -> List[types.GameHighScore]:
+ """
+ Use this method to get data for high score tables. Will return the score of the specified user and several of
+ their neighbors in a game. On success, returns an Array of GameHighScore objects.
+
+ This method will currently return scores for the target user, plus two of their closest neighbors on each side.
+ Will also return the top three users if the user and their neighbors are not among them.
+ Please note that this behavior is subject to change.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getgamehighscores
+
+ :param user_id: User identifier
+ :type user_id: :obj:`int`
+
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the sent message
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :return: On success, returns an Array of GameHighScore objects.
+ :rtype: List[types.GameHighScore]
+ """
+ result = apihelper.get_game_high_scores(
+ self.token, user_id, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id)
+ return [types.GameHighScore.de_json(r) for r in result]
+
+
+ def send_invoice(
+ self, chat_id: Union[int, str], title: str, description: str,
+ invoice_payload: str, provider_token: Union[str, None], currency: str,
+ prices: List[types.LabeledPrice], start_parameter: Optional[str]=None,
+ photo_url: Optional[str]=None, photo_size: Optional[int]=None,
+ photo_width: Optional[int]=None, photo_height: Optional[int]=None,
+ need_name: Optional[bool]=None, need_phone_number: Optional[bool]=None,
+ need_email: Optional[bool]=None, need_shipping_address: Optional[bool]=None,
+ send_phone_number_to_provider: Optional[bool]=None,
+ send_email_to_provider: Optional[bool]=None,
+ is_flexible: Optional[bool]=None,
+ disable_notification: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ provider_data: Optional[str]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ max_tip_amount: Optional[int] = None,
+ suggested_tip_amounts: Optional[List[int]]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Sends invoice.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendinvoice
+
+ :param chat_id: Unique identifier for the target private chat
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param title: Product name, 1-32 characters
+ :type title: :obj:`str`
+
+ :param description: Product description, 1-255 characters
+ :type description: :obj:`str`
+
+ :param invoice_payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user,
+ use for your internal processes.
+ :type invoice_payload: :obj:`str`
+
+ :param provider_token: Payments provider token, obtained via @Botfather; Pass None to omit the parameter
+ to use "XTR" currency
+ :type provider_token: :obj:`str`
+
+ :param currency: Three-letter ISO 4217 currency code,
+ see https://core.telegram.org/bots/payments#supported-currencies
+ :type currency: :obj:`str`
+
+ :param prices: Price breakdown, a list of components
+ (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
+ :type prices: List[:obj:`types.LabeledPrice`]
+
+ :param start_parameter: Unique deep-linking parameter that can be used to generate this invoice
+ when used as a start parameter
+ :type start_parameter: :obj:`str`
+
+ :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods
+ or a marketing image for a service. People like it better when they see what they are paying for.
+ :type photo_url: :obj:`str`
+
+ :param photo_size: Photo size in bytes
+ :type photo_size: :obj:`int`
+
+ :param photo_width: Photo width
+ :type photo_width: :obj:`int`
+
+ :param photo_height: Photo height
+ :type photo_height: :obj:`int`
+
+ :param need_name: Pass True, if you require the user's full name to complete the order
+ :type need_name: :obj:`bool`
+
+ :param need_phone_number: Pass True, if you require the user's phone number to complete the order
+ :type need_phone_number: :obj:`bool`
+
+ :param need_email: Pass True, if you require the user's email to complete the order
+ :type need_email: :obj:`bool`
+
+ :param need_shipping_address: Pass True, if you require the user's shipping address to complete the order
+ :type need_shipping_address: :obj:`bool`
+
+ :param is_flexible: Pass True, if the final price depends on the shipping method
+ :type is_flexible: :obj:`bool`
+
+ :param send_phone_number_to_provider: Pass True, if user's phone number should be sent to provider
+ :type send_phone_number_to_provider: :obj:`bool`
+
+ :param send_email_to_provider: Pass True, if user's email address should be sent to provider
+ :type send_email_to_provider: :obj:`bool`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: A JSON-serialized object for an inline keyboard. If empty,
+ one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button
+ :type reply_markup: :obj:`str`
+
+ :param provider_data: A JSON-serialized data about the invoice, which will be shared with the payment provider.
+ A detailed description of required fields should be provided by the payment provider.
+ :type provider_data: :obj:`str`
+
+ :param timeout: Timeout of a request, defaults to None
+ :type timeout: :obj:`int`
+
+ :param max_tip_amount: The maximum accepted amount for tips in the smallest units of the currency
+ :type max_tip_amount: :obj:`int`
+
+ :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the smallest
+ units of the currency. At most 4 suggested tip amounts can be specified. The suggested tip
+ amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
+ :type suggested_tip_amounts: :obj:`list` of :obj:`int`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The identifier of a message thread, in which the invoice message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Required if the message is a reply. Additional interface options.
+ :type reply_parameters: :obj:`types.ReplyParameters`
+
+ :param message_effect_id: The identifier of a message effect, which will be applied to the sent message
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :obj:`types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ # show a deprecation warning
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ apihelper.send_invoice(
+ self.token, chat_id, title, description, invoice_payload, provider_token,
+ currency, prices, start_parameter=start_parameter, photo_url=photo_url,
+ photo_size=photo_size, photo_width=photo_width, photo_height=photo_height,
+ need_name=need_name, need_phone_number=need_phone_number, need_email=need_email,
+ need_shipping_address=need_shipping_address, send_phone_number_to_provider=send_phone_number_to_provider,
+ send_email_to_provider=send_email_to_provider, is_flexible=is_flexible,
+ disable_notification=disable_notification, reply_markup=reply_markup,
+ provider_data=provider_data, timeout=timeout, protect_content=protect_content,
+ message_thread_id=message_thread_id, reply_parameters=reply_parameters,
+ max_tip_amount=max_tip_amount, suggested_tip_amounts=suggested_tip_amounts,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters)
+ )
+
+ def create_invoice_link(self,
+ title: str, description: str, payload:str, provider_token: Union[str, None],
+ currency: str, prices: List[types.LabeledPrice],
+ max_tip_amount: Optional[int] = None,
+ suggested_tip_amounts: Optional[List[int]]=None,
+ provider_data: Optional[str]=None,
+ photo_url: Optional[str]=None,
+ photo_size: Optional[int]=None,
+ photo_width: Optional[int]=None,
+ photo_height: Optional[int]=None,
+ need_name: Optional[bool]=None,
+ need_phone_number: Optional[bool]=None,
+ need_email: Optional[bool]=None,
+ need_shipping_address: Optional[bool]=None,
+ send_phone_number_to_provider: Optional[bool]=None,
+ send_email_to_provider: Optional[bool]=None,
+ is_flexible: Optional[bool]=None,
+ subscription_period: Optional[int]=None,
+ business_connection_id: Optional[str]=None) -> str:
+
+ """
+ Use this method to create a link for an invoice.
+ Returns the created invoice link as String on success.
+
+ Telegram documentation:
+ https://core.telegram.org/bots/api#createinvoicelink
+
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the link will be created
+ :type business_connection_id: :obj:`str`
+
+ :param title: Product name, 1-32 characters
+ :type title: :obj:`str`
+
+ :param description: Product description, 1-255 characters
+ :type description: :obj:`str`
+
+ :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user,
+ use for your internal processes.
+ :type payload: :obj:`str`
+
+ :param provider_token: Payments provider token, obtained via @Botfather; Pass None to omit the parameter
+ to use "XTR" currency
+ :type provider_token: :obj:`str`
+
+ :param currency: Three-letter ISO 4217 currency code,
+ see https://core.telegram.org/bots/payments#supported-currencies
+ :type currency: :obj:`str`
+
+ :param prices: Price breakdown, a list of components
+ (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
+ :type prices: :obj:`list` of :obj:`types.LabeledPrice`
+
+ :param subscription_period: The number of seconds the subscription will be active for before the next payment.
+ The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always
+ be 2592000 (30 days) if specified.
+ :type subscription_period: :obj:`int`
+
+ :param max_tip_amount: The maximum accepted amount for tips in the smallest units of the currency
+ :type max_tip_amount: :obj:`int`
+
+ :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the smallest
+ units of the currency. At most 4 suggested tip amounts can be specified. The suggested tip
+ amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
+ :type suggested_tip_amounts: :obj:`list` of :obj:`int`
+
+ :param provider_data: A JSON-serialized data about the invoice, which will be shared with the payment provider.
+ A detailed description of required fields should be provided by the payment provider.
+ :type provider_data: :obj:`str`
+
+ :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods
+ or a photo of the invoice. People like it better when they see a photo of what they are paying for.
+ :type photo_url: :obj:`str`
+
+ :param photo_size: Photo size in bytes
+ :type photo_size: :obj:`int`
+
+ :param photo_width: Photo width
+ :type photo_width: :obj:`int`
+
+ :param photo_height: Photo height
+ :type photo_height: :obj:`int`
+
+ :param need_name: Pass True, if you require the user's full name to complete the order
+ :type need_name: :obj:`bool`
+
+ :param need_phone_number: Pass True, if you require the user's phone number to complete the order
+ :type need_phone_number: :obj:`bool`
+
+ :param need_email: Pass True, if you require the user's email to complete the order
+ :type need_email: :obj:`bool`
+
+ :param need_shipping_address: Pass True, if you require the user's shipping address to complete the order
+ :type need_shipping_address: :obj:`bool`
+
+ :param send_phone_number_to_provider: Pass True, if user's phone number should be sent to provider
+ :type send_phone_number_to_provider: :obj:`bool`
+
+ :param send_email_to_provider: Pass True, if user's email address should be sent to provider
+ :type send_email_to_provider: :obj:`bool`
+
+ :param is_flexible: Pass True, if the final price depends on the shipping method
+ :type is_flexible: :obj:`bool`
+
+ :return: Created invoice link as String on success.
+ :rtype: :obj:`str`
+ """
+ return apihelper.create_invoice_link(
+ self.token, title, description, payload, provider_token,
+ currency, prices, max_tip_amount=max_tip_amount, suggested_tip_amounts=suggested_tip_amounts,
+ provider_data=provider_data, photo_url=photo_url, photo_size=photo_size,
+ photo_width=photo_width, photo_height=photo_height, need_name=need_name,
+ need_phone_number=need_phone_number, need_email=need_email,
+ need_shipping_address=need_shipping_address, send_phone_number_to_provider=send_phone_number_to_provider,
+ send_email_to_provider=send_email_to_provider, is_flexible=is_flexible ,subscription_period=subscription_period,
+ business_connection_id=business_connection_id)
+
+
+ # noinspection PyShadowingBuiltins
+ def send_poll(
+ self, chat_id: Union[int, str], question: str, options: List[Union[str, types.InputPollOption]],
+ is_anonymous: Optional[bool]=None, type: Optional[str]=None,
+ allows_multiple_answers: Optional[bool]=None,
+ correct_option_id: Optional[int]=None,
+ explanation: Optional[str]=None,
+ explanation_parse_mode: Optional[str]=None,
+ open_period: Optional[int]=None,
+ close_date: Optional[Union[int, datetime]]=None,
+ is_closed: Optional[bool]=None,
+ disable_notification: Optional[bool]=False,
+ reply_to_message_id: Optional[int]=None, # deprecated, for backward compatibility
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ allow_sending_without_reply: Optional[bool]=None, # deprecated, for backward compatibility
+ timeout: Optional[int]=None,
+ explanation_entities: Optional[List[types.MessageEntity]]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ question_parse_mode: Optional[str] = None,
+ question_entities: Optional[List[types.MessageEntity]] = None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None) -> types.Message:
+ """
+ Use this method to send a native poll.
+ On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendpoll
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param question: Poll question, 1-300 characters
+ :type question: :obj:`str`
+
+ :param options: A JSON-serialized list of 2-12 answer options
+ :type options: :obj:`list` of :obj:`InputPollOption` | :obj:`list` of :obj:`str`
+
+ :param is_anonymous: True, if the poll needs to be anonymous, defaults to True
+ :type is_anonymous: :obj:`bool`
+
+ :param type: Poll type, “quiz” or “regular”, defaults to “regular”
+ :type type: :obj:`str`
+
+ :param allows_multiple_answers: True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False
+ :type allows_multiple_answers: :obj:`bool`
+
+ :param correct_option_id: 0-based identifier of the correct answer option. Available only for polls in quiz mode, defaults to None
+ :type correct_option_id: :obj:`int`
+
+ :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing
+ :type explanation: :obj:`str`
+
+ :param explanation_parse_mode: Mode for parsing entities in the explanation. See formatting options for more details.
+ :type explanation_parse_mode: :obj:`str`
+
+ :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.
+ :type open_period: :obj:`int`
+
+ :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed.
+ :type close_date: :obj:`int` | :obj:`datetime`
+
+ :param is_closed: Pass True, if the poll needs to be immediately closed. This can be useful for poll preview.
+ :type is_closed: :obj:`bool`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: deprecated. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: deprecated. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :obj:`InlineKeyboardMarkup` | :obj:`ReplyKeyboardMarkup` | :obj:`ReplyKeyboardRemove` | :obj:`ForceReply`
+
+ :param timeout: Timeout in seconds for waiting for a response from the user.
+ :type timeout: :obj:`int`
+
+ :param explanation_entities: A JSON-serialized list of special entities that appear in the explanation, which can be specified instead of parse_mode
+ :type explanation_entities: :obj:`list` of :obj:`MessageEntity`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The identifier of a message thread, in which the poll will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: reply parameters.
+ :type reply_parameters: :obj:`ReplyParameters`
+
+ :param business_connection_id: Identifier of the business connection to use for the poll
+ :type business_connection_id: :obj:`str`
+
+ :param question_parse_mode: Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed
+ :type question_parse_mode: :obj:`str`
+
+ :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode
+ :type question_entities: :obj:`list` of :obj:`MessageEntity`
+
+ :param message_effect_id: Unique identifier of the message effect to apply to the sent message
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :obj:`types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ # show a deprecation warning
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if isinstance(question, types.Poll):
+ raise RuntimeError("The send_poll signature was changed, please see send_poll function details.")
+
+ explanation_parse_mode = self.parse_mode if (explanation_parse_mode is None) else explanation_parse_mode
+ question_parse_mode = self.parse_mode if (question_parse_mode is None) else question_parse_mode
+
+ if options and (not isinstance(options[0], types.InputPollOption)):
+ # show a deprecation warning
+ logger.warning("The parameter 'options' changed, should be List[types.InputPollOption], other types are deprecated.")
+ # convert options to appropriate type
+ if isinstance(options[0], str):
+ options = [types.InputPollOption(option) for option in options]
+ elif isinstance(options[0], types.PollOption):
+ options = [types.InputPollOption(option.text, text_entities=option.text_entities) for option in options]
+ else:
+ raise RuntimeError("Type of 'options' items is unknown. Options should be List[types.InputPollOption], other types are deprecated.")
+
+ return types.Message.de_json(
+ apihelper.send_poll(
+ self.token, chat_id, question, options,
+ is_anonymous=is_anonymous, type=type, allows_multiple_answers=allows_multiple_answers,
+ correct_option_id=correct_option_id, explanation=explanation,
+ explanation_parse_mode=explanation_parse_mode, open_period=open_period,
+ close_date=close_date, is_closed=is_closed, disable_notification=disable_notification,
+ reply_markup=reply_markup, timeout=timeout, explanation_entities=explanation_entities,
+ protect_content=protect_content, message_thread_id=message_thread_id,
+ reply_parameters=reply_parameters, business_connection_id=business_connection_id,
+ question_parse_mode=question_parse_mode, question_entities=question_entities,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast)
+ )
+
+
+ def stop_poll(
+ self, chat_id: Union[int, str], message_id: int,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ business_connection_id: Optional[str]=None) -> types.Poll:
+ """
+ Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#stoppoll
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param message_id: Identifier of the original message with the poll
+ :type message_id: :obj:`int`
+
+ :param reply_markup: A JSON-serialized object for a new message markup.
+ :type reply_markup: :obj:`InlineKeyboardMarkup`
+
+ :param business_connection_id: Identifier of the business connection to use for the poll
+ :type business_connection_id: :obj:`str`
+
+ :return: On success, the stopped Poll is returned.
+ :rtype: :obj:`types.Poll`
+ """
+ return types.Poll.de_json(
+ apihelper.stop_poll(self.token, chat_id, message_id, reply_markup=reply_markup, business_connection_id=business_connection_id)
+ )
+
+
+ def answer_shipping_query(
+ self, shipping_query_id: str, ok: bool,
+ shipping_options: Optional[List[types.ShippingOption]]=None,
+ error_message: Optional[str]=None) -> bool:
+ """
+ Asks for an answer to a shipping question.
+
+ Telegram documentation: https://core.telegram.org/bots/api#answershippingquery
+
+ :param shipping_query_id: Unique identifier for the query to be answered
+ :type shipping_query_id: :obj:`str`
+
+ :param ok: Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)
+ :type ok: :obj:`bool`
+
+ :param shipping_options: Required if ok is True. A JSON-serialized array of available shipping options.
+ :type shipping_options: :obj:`list` of :obj:`ShippingOption`
+
+ :param error_message: Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order
+ (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
+ :type error_message: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.answer_shipping_query(
+ self.token, shipping_query_id, ok, shipping_options=shipping_options, error_message=error_message)
+
+
+ def answer_pre_checkout_query(
+ self, pre_checkout_query_id: str, ok: bool,
+ error_message: Optional[str]=None) -> bool:
+ """
+ Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the
+ field pre_checkout_query. Use this method to respond to such pre-checkout queries.
+ On success, True is returned.
+
+ .. note::
+ The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
+
+ Telegram documentation: https://core.telegram.org/bots/api#answerprecheckoutquery
+
+ :param pre_checkout_query_id: Unique identifier for the query to be answered
+ :type pre_checkout_query_id: :obj:`int`
+
+ :param ok: Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.
+ :type ok: :obj:`bool`
+
+ :param error_message: Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout
+ (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different
+ color or garment!"). Telegram will display this message to the user.
+ :type error_message: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.answer_pre_checkout_query(
+ self.token, pre_checkout_query_id, ok, error_message=error_message)
+
+ def get_my_star_balance(self) -> types.StarAmount:
+ """
+ Returns the bot's current Telegram Stars balance. On success, returns a StarAmount object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getmystarbalance
+
+ :return: On success, returns a StarAmount object.
+ :rtype: :obj:`types.StarAmount`
+ """
+ return types.StarAmount.de_json(apihelper.get_my_star_balance(self.token))
+
+
+ def get_star_transactions(self, offset: Optional[int]=None, limit: Optional[int]=None) -> types.StarTransactions:
+ """
+ Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getstartransactions
+
+ :param offset: Number of transactions to skip in the response
+ :type offset: :obj:`int`
+
+ :param limit: The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.
+ :type limit: :obj:`int`
+
+ :return: On success, returns a StarTransactions object.
+ :rtype: :obj:`types.StarTransactions`
+ """
+ return types.StarTransactions.de_json(
+ apihelper.get_star_transactions(self.token, offset=offset, limit=limit)
+ )
+
+
+ def refund_star_payment(self, user_id: int, telegram_payment_charge_id: str) -> bool:
+ """
+ Refunds a successful payment in Telegram Stars. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#refundstarpayment
+
+ :param user_id: Identifier of the user whose payment will be refunded
+ :type user_id: :obj:`int`
+
+ :param telegram_payment_charge_id: Telegram payment identifier
+ :type telegram_payment_charge_id: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.refund_star_payment(self.token, user_id, telegram_payment_charge_id)
+
+ def edit_user_star_subscription(self, user_id: int, telegram_payment_charge_id: str, is_canceled: bool) -> bool:
+ """
+ Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#edituserstarsubscription
+
+ :param user_id: Identifier of the user whose subscription will be edited
+ :type user_id: :obj:`int`
+
+ :param telegram_payment_charge_id: Telegram payment identifier for the subscription
+ :type telegram_payment_charge_id: :obj:`str`
+
+ :param is_canceled: Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.
+ :type is_canceled: :obj:`bool`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.edit_user_star_subscription(self.token, user_id, telegram_payment_charge_id, is_canceled)
+
+ def edit_message_caption(
+ self, caption: str, chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ show_caption_above_media: Optional[bool]=None,
+ business_connection_id: Optional[str]=None,
+ timeout: Optional[int]=None) -> Union[types.Message, bool]:
+ """
+ Use this method to edit captions of messages.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagecaption
+
+ :param caption: New caption of the message
+ :type caption: :obj:`str`
+
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified.
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if inline_message_id is not specified. Identifier of the inline message.
+ :type inline_message_id: :obj:`str`
+
+ :param parse_mode: New caption of the message, 0-1024 characters after entities parsing
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: A JSON-serialized array of objects that describe how the caption should be parsed.
+ :type caption_entities: :obj:`list` of :obj:`types.MessageEntity`
+
+ :param reply_markup: A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :obj:`InlineKeyboardMarkup`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.
+ :type show_caption_above_media: :obj:`bool`
+
+ :param business_connection_id: Identifier of the business connection to use for the message
+ :type business_connection_id: :obj:`str`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :return: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
+ :rtype: :obj:`types.Message` | :obj:`bool`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+
+ result = apihelper.edit_message_caption(
+ self.token, caption, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id,
+ parse_mode=parse_mode, caption_entities=caption_entities, reply_markup=reply_markup,
+ show_caption_above_media=show_caption_above_media, business_connection_id=business_connection_id,
+ timeout=timeout)
+
+ if isinstance(result, bool):
+ return result
return types.Message.de_json(result)
- def get_game_high_scores(self, user_id, chat_id=None, message_id=None, inline_message_id=None):
- result = apihelper.get_game_high_scores(self.token, user_id, chat_id, message_id, inline_message_id)
- ret = []
- for r in result:
- ret.append(types.GameHighScore.de_json(r))
- return ret
-
- def send_invoice(self, chat_id, title, description, invoice_payload, provider_token, currency, prices,
- start_parameter, photo_url=None, photo_size=None, photo_width=None, photo_height=None,
- need_name=None, need_phone_number=None, need_email=None, need_shipping_address=None,
- is_flexible=None, disable_notification=None, reply_to_message_id=None, reply_markup=None,
- provider_data=None):
- result = apihelper.send_invoice(self.token, chat_id, title, description, invoice_payload, provider_token,
- currency, prices, start_parameter, photo_url, photo_size, photo_width,
- photo_height,
- need_name, need_phone_number, need_email, need_shipping_address, is_flexible,
- disable_notification, reply_to_message_id, reply_markup, provider_data)
- return types.Message.de_json(result)
- def answer_shipping_query(self, shipping_query_id, ok, shipping_options=None, error_message=None):
- return apihelper.answer_shipping_query(self.token, shipping_query_id, ok, shipping_options, error_message)
+ def reply_to(self, message: types.Message, text: str, **kwargs) -> types.Message:
+ """
+ Convenience function for `send_message(message.chat.id, text, reply_parameters=(message.message_id...), **kwargs)`
+
+ :param message: Instance of :class:`telebot.types.Message`
+ :type message: :obj:`types.Message`
+
+ :param text: Text of the message.
+ :type text: :obj:`str`
+
+ :param kwargs: Additional keyword arguments which are passed to :meth:`telebot.TeleBot.send_message`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ if kwargs:
+ reply_parameters = kwargs.pop("reply_parameters", None)
+ if "allow_sending_without_reply" in kwargs:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+ else:
+ reply_parameters = None
+
+ if not reply_parameters:
+ reply_parameters = types.ReplyParameters(
+ message.message_id,
+ allow_sending_without_reply=kwargs.pop("allow_sending_without_reply", None) if kwargs else None
+ )
+
+ if not reply_parameters.message_id:
+ reply_parameters.message_id = message.message_id
+
+ return self.send_message(message.chat.id, text, reply_parameters=reply_parameters, **kwargs)
+
+
+ def answer_inline_query(
+ self, inline_query_id: str,
+ results: List[Any],
+ cache_time: Optional[int]=None,
+ is_personal: Optional[bool]=None,
+ next_offset: Optional[str]=None,
+ switch_pm_text: Optional[str]=None,
+ switch_pm_parameter: Optional[str]=None,
+ button: Optional[types.InlineQueryResultsButton]=None) -> bool:
+ """
+ Use this method to send answers to an inline query. On success, True is returned.
+ No more than 50 results per query are allowed.
+
+ Telegram documentation: https://core.telegram.org/bots/api#answerinlinequery
+
+ :param inline_query_id: Unique identifier for the answered query
+ :type inline_query_id: :obj:`str`
+
+ :param results: Array of results for the inline query
+ :type results: :obj:`list` of :obj:`types.InlineQueryResult`
+
+ :param cache_time: The maximum amount of time in seconds that the result of the inline query
+ may be cached on the server.
+ :type cache_time: :obj:`int`
+
+ :param is_personal: Pass True, if results may be cached on the server side only for
+ the user that sent the query.
+ :type is_personal: :obj:`bool`
+
+ :param next_offset: Pass the offset that a client should send in the next query with the same text
+ to receive more results.
+ :type next_offset: :obj:`str`
+
+ :param switch_pm_parameter: Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters,
+ only A-Z, a-z, 0-9, _ and - are allowed.
+ Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly.
+ To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a
+ private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline
+ button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.
+ :type switch_pm_parameter: :obj:`str`
+
+ :param switch_pm_text: Parameter for the start message sent to the bot when user presses the switch button
+ :type switch_pm_text: :obj:`str`
+
+ :param button: A JSON-serialized object describing a button to be shown above inline query results
+ :type button: :obj:`types.InlineQueryResultsButton`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ if not button and (switch_pm_text or switch_pm_parameter):
+ logger.warning("switch_pm_text and switch_pm_parameter are deprecated for answer_inline_query. Use button instead.")
+ button = types.InlineQueryResultsButton(text=switch_pm_text, start_parameter=switch_pm_parameter)
+
+ return apihelper.answer_inline_query(
+ self.token, inline_query_id, results, cache_time=cache_time, is_personal=is_personal,
+ next_offset=next_offset, button=button)
+
+
+ def unpin_all_general_forum_topic_messages(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to clear the list of pinned messages in a General forum topic.
+ The bot must be an administrator in the chat for this to work and must have the
+ can_pin_messages administrator right in the supergroup.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unpinAllGeneralForumTopicMessages
+
+ :param chat_id: Unique identifier for the target chat or username of chat
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.unpin_all_general_forum_topic_messages(self.token, chat_id)
+
+
+ def answer_callback_query(
+ self, callback_query_id: int,
+ text: Optional[str]=None, show_alert: Optional[bool]=None,
+ url: Optional[str]=None, cache_time: Optional[int]=None) -> bool:
+ """
+ Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to
+ the user as a notification at the top of the chat screen or as an alert.
+
+ Telegram documentation: https://core.telegram.org/bots/api#answercallbackquery
+
+ :param callback_query_id: Unique identifier for the query to be answered
+ :type callback_query_id: :obj:`int`
+
+ :param text: Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters
+ :type text: :obj:`str`
+
+ :param show_alert: If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
+ :type show_alert: :obj:`bool`
+
+ :param url: URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your
+ game - note that this will only work if the query comes from a callback_game button.
+ :type url: :obj:`str`
+
+ :param cache_time: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching
+ starting in version 3.14. Defaults to 0.
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.answer_callback_query(
+ self.token, callback_query_id, text=text, show_alert=show_alert, url=url, cache_time=cache_time)
+
+
+ def get_user_chat_boosts(self, chat_id: Union[int, str], user_id: int) -> types.UserChatBoosts:
+ """
+ Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getuserchatboosts
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :return: On success, a UserChatBoosts object is returned.
+ :rtype: :class:`telebot.types.UserChatBoosts`
+ """
+ return types.UserChatBoosts.de_json(
+ apihelper.get_user_chat_boosts(self.token, chat_id, user_id)
+ )
+
+ # noinspection PyShadowingBuiltins
+ def set_sticker_set_thumbnail(self, name: str, user_id: int, thumbnail: Union[Any, str]=None, format: Optional[str]=None) -> bool:
+ """
+ Use this method to set the thumbnail of a sticker set.
+ Animated thumbnails can be set for animated sticker sets only. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setstickersetthumbnail
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param user_id: User identifier
+ :type user_id: :obj:`int`
+
+ :param thumbnail: A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation
+ with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements),
+ or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical
+ requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from
+ the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via
+ HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.
+ :type thumbnail: :obj:`filelike object`
+
+ :param format: Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a WEBM video
+ :type format: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ if not format:
+ logger.warning("Deprecation warning. 'format' parameter is required in set_sticker_set_thumbnail. Setting format to 'static'.")
+ format = "static"
+
+ return apihelper.set_sticker_set_thumbnail(self.token, name, user_id, thumbnail, format)
+
+
+ @util.deprecated(deprecation_text="Use set_sticker_set_thumbnail instead")
+ def set_sticker_set_thumb(self, name: str, user_id: int, thumb: Union[Any, str]=None):
+ """
+ Use this method to set the thumbnail of a sticker set.
+ Animated thumbnails can be set for animated sticker sets only. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setstickersetthumb
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param user_id: User identifier
+ :type user_id: :obj:`int`
+
+ :param thumb:
+ :type thumb: :obj:`filelike object`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ # deprecated
+ return self.set_sticker_set_thumbnail(name, user_id, thumbnail=thumb)
+
+
+ def get_sticker_set(self, name: str) -> types.StickerSet:
+ """
+ Use this method to get a sticker set. On success, a StickerSet object is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getstickerset
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :return: On success, a StickerSet object is returned.
+ :rtype: :class:`telebot.types.StickerSet`
+ """
+ return types.StickerSet.de_json(
+ apihelper.get_sticker_set(self.token, name)
+ )
+
+ def get_custom_emoji_stickers(self, custom_emoji_ids: List[str]) -> List[types.Sticker]:
+ """
+ Use this method to get information about custom emoji stickers by their identifiers.
+ Returns an Array of Sticker objects.
+
+ :param custom_emoji_ids: List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.
+ :type custom_emoji_ids: :obj:`list` of :obj:`str`
+
+ :return: Returns an Array of Sticker objects.
+ :rtype: :obj:`list` of :class:`telebot.types.Sticker`
+ """
+ result = apihelper.get_custom_emoji_stickers(self.token, custom_emoji_ids)
+ return [types.Sticker.de_json(sticker) for sticker in result]
+
+
+ def set_sticker_keywords(self, sticker: str, keywords: List[str]=None) -> bool:
+ """
+ Use this method to change search keywords assigned to a regular or custom emoji sticker.
+ The sticker must belong to a sticker set created by the bot.
+ Returns True on success.
+
+ :param sticker: File identifier of the sticker.
+ :type sticker: :obj:`str`
+
+ :param keywords: A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters
+ :type keywords: :obj:`list` of :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_sticker_keywords(self.token, sticker, keywords=keywords)
+
+
+ def set_sticker_mask_position(self, sticker: str, mask_position: types.MaskPosition=None) -> bool:
+ """
+ Use this method to change the mask position of a mask sticker.
+ The sticker must belong to a sticker set that was created by the bot.
+ Returns True on success.
+
+ :param sticker: File identifier of the sticker.
+ :type sticker: :obj:`str`
+
+ :param mask_position: A JSON-serialized object for position where the mask should be placed on faces.
+ :type mask_position: :class:`telebot.types.MaskPosition`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_sticker_mask_position(self.token, sticker, mask_position=mask_position)
+
+
+ def set_custom_emoji_sticker_set_thumbnail(self, name: str, custom_emoji_id: Optional[str]=None) -> bool:
+ """
+ Use this method to set the thumbnail of a custom emoji sticker set.
+ Returns True on success.
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param custom_emoji_id: Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.
+ :type custom_emoji_id: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_custom_emoji_sticker_set_thumbnail(self.token, name, custom_emoji_id=custom_emoji_id)
+
+
+ def set_sticker_set_title(self, name: str, title: str) -> bool:
+ """
+ Use this method to set the title of a created sticker set.
+ Returns True on success.
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param title: New sticker set title
+ :type title: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_sticker_set_title(self.token, name, title)
+
+
+ def delete_sticker_set(self, name:str) -> bool:
+ """
+ Use this method to delete a sticker set. Returns True on success.
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.delete_sticker_set(self.token, name)
+
+ def send_gift(self, user_id: Optional[Union[str, int]] = None, gift_id: str=None, text: Optional[str]=None, text_parse_mode: Optional[str]=None,
+ text_entities: Optional[List[types.MessageEntity]]=None, pay_for_upgrade: Optional[bool]=None,
+ chat_id: Optional[Union[str, int]] = None) -> bool:
+ """
+ Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendgift
+
+ :param gift_id: Identifier of the gift
+ :type gift_id: :obj:`str`
+
+ :param user_id: Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.
+ :type user_id::obj:`int` | :obj:`str`
+
+ :param chat_id: Required if user_id is not specified. Unique identifier for the chat or username of the channel
+ (in the format @channelusername) that will receive the gift.
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param pay_for_upgrade: Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver
+ :type pay_for_upgrade: :obj:`bool`
+
+ :param text: Text that will be shown along with the gift; 0-255 characters
+ :type text: :obj:`str`
+
+ :param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
+ :type text_parse_mode: :obj:`str`
+
+ :param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
+ :type text_entities: :obj:`list` of :obj:`types.MessageEntity`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ if user_id is None and chat_id is None:
+ raise ValueError("Either user_id or chat_id must be specified.")
+
+ if gift_id is None:
+ raise ValueError("gift_id must be specified.")
+
+ return apihelper.send_gift(self.token, gift_id, text=text, text_parse_mode=text_parse_mode, text_entities=text_entities,
+ pay_for_upgrade=pay_for_upgrade, chat_id=chat_id, user_id=user_id)
+
+ def verify_user(self, user_id: int, custom_description: Optional[str]=None) -> bool:
+ """
+ Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#verifyuser
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param custom_description: Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.
+ :type custom_description: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.verify_user(self.token, user_id, custom_description=custom_description)
+
+ def verify_chat(self, chat_id: Union[int, str], custom_description: Optional[str]=None) -> bool:
+ """
+ Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#verifychat
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param custom_description: Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.
+ :type custom_description: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.verify_chat(self.token, chat_id, custom_description=custom_description)
+
+ def remove_user_verification(self, user_id: int) -> bool:
+ """
+ Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#removeuserverification
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+
+ return apihelper.remove_user_verification(self.token, user_id)
+
+ def remove_chat_verification(self, chat_id: int) -> bool:
+ """
+ Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#removechatverification
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.remove_chat_verification(self.token, chat_id)
+
+ def read_business_message(self, business_connection_id: str, chat_id: Union[int, str], message_id: int) -> bool:
+ """
+ Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#readbusinessmessage
+
+ :param business_connection_id: Unique identifier of the business connection on behalf of which to read the message
+ :type business_connection_id: :obj:`str`
+
+ :param chat_id: Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param message_id: Unique identifier of the message to mark as read
+ :type message_id: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.read_business_message(self.token, business_connection_id, chat_id, message_id)
+
+ def delete_business_messages(self, business_connection_id: str, message_ids: List[int]) -> bool:
+ """
+ Delete messages on behalf of a business account. Requires the can_delete_outgoing_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletebusinessmessages
+
+ :param business_connection_id: Unique identifier of the business connection on behalf of which to delete the messages
+ :type business_connection_id: :obj:`str`
+
+ :param message_ids: A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted
+ :type message_ids: :obj:`list` of :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.delete_business_messages(self.token, business_connection_id, message_ids)
+
+ def set_business_account_name(self, business_connection_id: str, first_name: str, last_name: Optional[str]=None) -> bool:
+ """
+ Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setbusinessaccountname
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param first_name: The new value of the first name for the business account; 1-64 characters
+ :type first_name: :obj:`str`
+
+ :param last_name: The new value of the last name for the business account; 0-64 characters
+ :type last_name: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_business_account_name(self.token, business_connection_id, first_name, last_name=last_name)
+
+ def set_business_account_username(self, business_connection_id: str, username: Optional[str]=None) -> bool:
+ """
+ Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setbusinessaccountusername
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param username: The new value of the username for the business account; 0-32 characters
+ :type username: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+
+ """
+ return apihelper.set_business_account_username(self.token, business_connection_id, username=username)
+
+ def set_business_account_bio(self, business_connection_id: str, bio: Optional[str]=None) -> bool:
+ """
+ Changes the bio of a managed business account. Requires the can_change_bio business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setbusinessaccountbio
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param bio: The new value of the bio for the business account; 0-140 characters
+ :type bio: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_business_account_bio(self.token, business_connection_id, bio=bio)
+
+ def set_business_account_gift_settings(
+ self, business_connection_id: str, show_gift_button: bool, accepted_gift_types: types.AcceptedGiftTypes) -> bool:
+ """
+ Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can_change_gift_settings business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setbusinessaccountgiftsettings
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param show_gift_button: Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field
+ :type show_gift_button: :obj:`bool`
+
+ :param accepted_gift_types: Types of gifts accepted by the business account
+ :type accepted_gift_types: :class:`telebot.types.AcceptedGiftTypes`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_business_account_gift_settings(self.token, business_connection_id, show_gift_button, accepted_gift_types)
+
+
+ def get_business_account_star_balance(self, business_connection_id: str) -> types.StarAmount:
+ """
+ Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns StarAmount on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getbusinessaccountstarbalance
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: On success, a StarAmount object is returned.
+ :rtype: :class:`telebot.types.StarAmount`
+ """
+ return types.StarAmount.de_json(
+ apihelper.get_business_account_star_balance(self.token, business_connection_id)
+ )
+
+ def transfer_business_account_stars(self, business_connection_id: str, star_count: int) -> bool:
+ """
+ Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can_transfer_stars business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#transferbusinessaccountstars
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param star_count: Number of Telegram Stars to transfer; 1-10000
+ :type star_count: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.transfer_business_account_stars(self.token, business_connection_id, star_count)
+
+ def get_business_account_gifts(
+ self, business_connection_id: str,
+ exclude_unsaved: Optional[bool]=None,
+ exclude_saved: Optional[bool]=None,
+ exclude_unlimited: Optional[bool]=None,
+ exclude_limited: Optional[bool]=None,
+ exclude_unique: Optional[bool]=None,
+ sort_by_price: Optional[bool]=None,
+ offset: Optional[str]=None,
+ limit: Optional[int]=None) -> types.OwnedGifts:
+ """
+ Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns OwnedGifts on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getbusinessaccountgifts
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param exclude_unsaved: Pass True to exclude gifts that aren't saved to the account's profile page
+ :type exclude_unsaved: :obj:`bool`
+
+ :param exclude_saved: Pass True to exclude gifts that are saved to the account's profile page
+ :type exclude_saved: :obj:`bool`
+
+ :param exclude_unlimited: Pass True to exclude gifts that can be purchased an unlimited number of times
+ :type exclude_unlimited: :obj:`bool`
+
+ :param exclude_limited: Pass True to exclude gifts that can be purchased a limited number of times
+ :type exclude_limited: :obj:`bool`
+
+ :param exclude_unique: Pass True to exclude unique gifts
+ :type exclude_unique: :obj:`bool`
+
+ :param sort_by_price: Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.
+ :type sort_by_price: :obj:`bool`
+
+ :param offset: Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
+ :type offset: :obj:`str`
+
+ :param limit: The maximum number of gifts to be returned; 1-100. Defaults to 100
+ :type limit: :obj:`int`
+
+ :return: On success, a OwnedGifts object is returned.
+ :rtype: :class:`telebot.types.OwnedGifts`
+ """
+ return types.OwnedGifts.de_json(
+ apihelper.get_business_account_gifts(
+ self.token, business_connection_id,
+ exclude_unsaved=exclude_unsaved,
+ exclude_saved=exclude_saved,
+ exclude_unlimited=exclude_unlimited,
+ exclude_limited=exclude_limited,
+ exclude_unique=exclude_unique,
+ sort_by_price=sort_by_price,
+ offset=offset,
+ limit=limit
+ )
+ )
+
+ def convert_gift_to_stars(self, business_connection_id: str, owned_gift_id: str) -> bool:
+ """
+ Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#convertgifttostars
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param owned_gift_id: Unique identifier of the regular gift that should be converted to Telegram Stars
+ :type owned_gift_id: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.convert_gift_to_stars(self.token, business_connection_id, owned_gift_id)
+
+ def upgrade_gift(
+ self, business_connection_id: str, owned_gift_id: str,
+ keep_original_details: Optional[bool]=None,
+ star_count: Optional[int]=None) -> bool:
+ """
+ Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right.
+ Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#upgradegift
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param owned_gift_id: Unique identifier of the regular gift that should be upgraded to a unique one
+ :type owned_gift_id: :obj:`str`
+
+ :param keep_original_details: Pass True to keep the original gift text, sender and receiver in the upgraded gift
+ :type keep_original_details: :obj:`bool`
+
+ :param star_count: The amount of Telegram Stars that will be paid for the upgrade from the business account balance.
+ If gift.prepaid_upgrade_star_count > 0, then pass 0, otherwise, the can_transfer_stars business bot right is required and gift.upgrade_star_count must be passed.
+ :type star_count: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.upgrade_gift(
+ self.token, business_connection_id, owned_gift_id,
+ keep_original_details=keep_original_details,
+ star_count=star_count
+ )
+
+ def transfer_gift(
+ self, business_connection_id: str, owned_gift_id: str,
+ new_owner_chat_id: int,
+ star_count: Optional[int]=None) -> bool:
+ """
+ Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right.
+ Requires can_transfer_stars business bot right if the transfer is paid. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#transfergift
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param owned_gift_id: Unique identifier of the regular gift that should be transferred
+ :type owned_gift_id: :obj:`str`
+
+ :param new_owner_chat_id: Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.
+ :type new_owner_chat_id: :obj:`int`
+
+ :param star_count: The amount of Telegram Stars that will be paid for the transfer from the business account balance.
+ If positive, then the can_transfer_stars business bot right is required.
+ :type star_count: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.transfer_gift(
+ self.token, business_connection_id, owned_gift_id,
+ new_owner_chat_id,
+ star_count=star_count
+ )
+
+ def post_story(
+ self, business_connection_id: str, content: types.InputStoryContent,
+ active_period: int, caption: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ areas: Optional[List[types.StoryArea]]=None,
+ post_to_chat_page: Optional[bool]=None,
+ protect_content: Optional[bool]=None) -> types.Story:
+
+ """
+ Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#poststory
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param content: Content of the story
+ :type content: :class:`telebot.types.InputStoryContent`
+
+ :param active_period: Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400
+ :type active_period: :obj:`int`
+
+ :param caption: Caption of the story, 0-2048 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the story caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param areas: A JSON-serialized list of clickable areas to be shown on the story
+ :type areas: :obj:`list` of :class:`telebot.types.StoryArea`
+
+ :param post_to_chat_page: Pass True to keep the story accessible after it expires
+ :type post_to_chat_page: :obj:`bool`
+
+ :param protect_content: Pass True if the content of the story must be protected from forwarding and screenshotting
+ :type protect_content: :obj:`bool`
+
+ :return: On success, a Story object is returned.
+ :rtype: :class:`telebot.types.Story`
+ """
+ return types.Story.de_json(
+ apihelper.post_story(
+ self.token, business_connection_id, content,
+ active_period, caption=caption,
+ parse_mode=parse_mode,
+ caption_entities=caption_entities,
+ areas=areas,
+ post_to_chat_page=post_to_chat_page,
+ protect_content=protect_content
+ )
+ )
+
+ def edit_story(
+ self, business_connection_id: str, story_id: int,
+ content: types.InputStoryContent,
+ caption: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ areas: Optional[List[types.StoryArea]]=None) -> types.Story:
+ """
+ Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editstory
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param story_id: Unique identifier of the story to edit
+ :type story_id: :obj:`int`
+
+ :param content: Content of the story
+ :type content: :class:`telebot.types.InputStoryContent`
+
+ :param caption: Caption of the story, 0-2048 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the story caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param areas: A JSON-serialized list of clickable areas to be shown on the story
+ :type areas: :obj:`list` of :class:`telebot.types.StoryArea`
+
+ :return: On success, a Story object is returned.
+ :rtype: :class:`telebot.types.Story`
+
+ """
+ return types.Story.de_json(
+ apihelper.edit_story(
+ self.token, business_connection_id, story_id,
+ content, caption=caption,
+ parse_mode=parse_mode,
+ caption_entities=caption_entities,
+ areas=areas
+ )
+ )
+
+ def delete_story(self, business_connection_id: str, story_id: int) -> bool:
+ """
+ Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletestory
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param story_id: Unique identifier of the story to delete
+ :type story_id: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.delete_story(self.token, business_connection_id, story_id)
+
+ def gift_premium_subscription(
+ self, user_id: int, month_count: int, star_count: int,
+ text: Optional[str]=None, text_parse_mode: Optional[str]=None,
+ text_entities: Optional[List[types.MessageEntity]]=None) -> bool:
+ """
+ Gifts a Telegram Premium subscription to the given user. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#giftpremiumsubscription
+
+ :param user_id: Unique identifier of the target user who will receive a Telegram Premium subscription
+ :type user_id: :obj:`int`
+
+ :param month_count: Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12
+ :type month_count: :obj:`int`
+
+ :param star_count: Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months
+ :type star_count: :obj:`int`
+
+ :param text: Text that will be shown along with the service message about the subscription; 0-128 characters
+ :type text: :obj:`str`
+
+ :param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
+ :type text_parse_mode: :obj:`str`
+
+ :param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
+ :type text_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.gift_premium_subscription(
+ self.token, user_id, month_count, star_count,
+ text=text, text_parse_mode=text_parse_mode,
+ text_entities=text_entities
+ )
+
+ def set_business_account_profile_photo(
+ self, business_connection_id: str, photo: types.InputProfilePhoto,
+ is_public: Optional[bool]=None) -> bool:
+ """
+ Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setbusinessaccountprofilephoto
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param photo: The new profile photo to set
+ :type photo: :class:`telebot.types.InputProfilePhoto`
+
+ :param is_public: Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.
+ :type is_public: :obj:`bool`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_business_account_profile_photo(self.token, business_connection_id, photo, is_public=is_public)
+
+
+ def remove_business_account_profile_photo(
+ self, business_connection_id: str,
+ is_public: Optional[bool]=None) -> bool:
+ """
+ Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#removebusinessaccountprofilephoto
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param is_public: Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.
+ :type is_public: :obj:`bool`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.remove_business_account_profile_photo(self.token, business_connection_id, is_public=is_public)
+
+ def get_available_gifts(self) -> types.Gifts:
+ """
+ Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getavailablegifts
+
+ :return: On success, a Gifts object is returned.
+ :rtype: :class:`telebot.types.Gifts`
+ """
+ return types.Gifts.de_json(
+ apihelper.get_available_gifts(self.token)
+ )
+
+ def replace_sticker_in_set(self, user_id: int, name: str, old_sticker: str, sticker: types.InputSticker) -> bool:
+ """
+ Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet,
+ then setStickerPositionInSet. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#replaceStickerInSet
+
+ :param user_id: User identifier of the sticker set owner
+ :type user_id: :obj:`int`
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param old_sticker: File identifier of the replaced sticker
+ :type old_sticker: :obj:`str`
+
+ :param sticker: A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.
+ :type sticker: :class:`telebot.types.InputSticker`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.replace_sticker_in_set(self.token, user_id, name, old_sticker, sticker)
+
+
+ def set_sticker_emoji_list(self, sticker: str, emoji_list: List[str]) -> bool:
+ """
+ Use this method to set the emoji list of a custom emoji sticker set.
+ Returns True on success.
+
+ :param sticker: Sticker identifier
+ :type sticker: :obj:`str`
+
+ :param emoji_list: List of emoji
+ :type emoji_list: :obj:`list` of :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_sticker_emoji_list(self.token, sticker, emoji_list)
+
+
+ def upload_sticker_file(self, user_id: int, png_sticker: Union[Any, str]=None, sticker: Optional[types.InputFile]=None, sticker_format: Optional[str]=None) -> types.File:
+ """
+ Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet
+ methods (can be used multiple times). Returns the uploaded File on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#uploadstickerfile
+
+ :param user_id: User identifier of sticker set owner
+ :type user_id: :obj:`int`
+
+ :param png_sticker: DEPRECATED: PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px,
+ and either width or height must be exactly 512px.
+ :type png_sticker: :obj:`filelike object`
+
+ :param sticker: A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format.
+ See https://core.telegram.org/stickers for technical requirements. More information on Sending Files »
+ :type sticker: :class:`telebot.types.InputFile`
+
+ :param sticker_format: One of "static", "animated", "video".
+ :type sticker_format: :obj:`str`
+
+ :return: On success, the sent file is returned.
+ :rtype: :class:`telebot.types.File`
+ """
+ if png_sticker:
+ logger.warning('The parameter "png_sticker" is deprecated. Use "sticker" instead.')
+ sticker = png_sticker
+ sticker_format = "static"
+
+ return types.File.de_json(
+ apihelper.upload_sticker_file(self.token, user_id, sticker, sticker_format)
+ )
+
+
+ def create_new_sticker_set(
+ self, user_id: int, name: str, title: str,
+ emojis: Optional[List[str]]=None,
+ png_sticker: Union[Any, str]=None,
+ tgs_sticker: Union[Any, str]=None,
+ webm_sticker: Union[Any, str]=None,
+ contains_masks: Optional[bool]=None,
+ sticker_type: Optional[str]=None,
+ mask_position: Optional[types.MaskPosition]=None,
+ needs_repainting: Optional[bool]=None,
+ stickers: List[types.InputSticker]=None,
+ sticker_format: Optional[str]=None) -> bool:
+ """
+ Use this method to create new sticker set owned by a user.
+ The bot will be able to edit the created sticker set.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#createnewstickerset
+
+ .. note::
+ Fields *_sticker are deprecated, pass a list of stickers to stickers parameter instead.
+
+ :param user_id: User identifier of created sticker set owner
+ :type user_id: :obj:`int`
+
+ :param name: Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only English letters,
+ digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in "_by_".
+ is case insensitive. 1-64 characters.
+ :type name: :obj:`str`
+
+ :param title: Sticker set title, 1-64 characters
+ :type title: :obj:`str`
+
+ :param emojis: One or more emoji corresponding to the sticker
+ :type emojis: :obj:`str`
+
+ :param png_sticker: PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width
+ or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL
+ as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.
+ :type png_sticker: :obj:`str`
+
+ :param tgs_sticker: TGS animation with the sticker, uploaded using multipart/form-data.
+ :type tgs_sticker: :obj:`str`
+
+ :param webm_sticker: WebM animation with the sticker, uploaded using multipart/form-data.
+ :type webm_sticker: :obj:`str`
+
+ :param contains_masks: Pass True, if a set of mask stickers should be created. Deprecated since Bot API 6.2,
+ use sticker_type instead.
+ :type contains_masks: :obj:`bool`
+
+ :param sticker_type: Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created.
+ :type sticker_type: :obj:`str`
+
+ :param mask_position: A JSON-serialized object for position where the mask should be placed on faces
+ :type mask_position: :class:`telebot.types.MaskPosition`
+
+ :param needs_repainting: Pass True if stickers in the sticker set must be repainted to the color of text when used in messages,
+ the accent color if used as emoji status, white on chat photos, or another appropriate color based on context;
+ for custom emoji sticker sets only
+ :type needs_repainting: :obj:`bool`
+
+ :param stickers: List of stickers to be added to the set
+ :type stickers: :obj:`list` of :class:`telebot.types.InputSticker`
+
+ :param sticker_format: deprecated
+ :type sticker_format: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ if tgs_sticker:
+ sticker_format = 'animated'
+ elif webm_sticker:
+ sticker_format = 'video'
+ elif png_sticker:
+ sticker_format = 'static'
+
+ if contains_masks is not None:
+ logger.warning('The parameter "contains_masks" is deprecated, use "sticker_type" instead')
+ if sticker_type is None:
+ sticker_type = 'mask' if contains_masks else 'regular'
+
+ if stickers is None:
+ stickers = png_sticker or tgs_sticker or webm_sticker
+ if stickers is None:
+ raise ValueError('You must pass at least one sticker')
+ stickers = [types.InputSticker(sticker=stickers, emoji_list=emojis, mask_position=mask_position)]
+
+ if sticker_format:
+ logger.warning('The parameter "sticker_format" is deprecated since Bot API 7.2. Stickers can now be mixed')
+
+ return apihelper.create_new_sticker_set(
+ self.token, user_id, name, title, stickers, sticker_type=sticker_type, needs_repainting=needs_repainting)
+
+
+ def add_sticker_to_set(
+ self, user_id: int, name: str, emojis: Union[List[str], str],
+ png_sticker: Optional[Union[Any, str]]=None,
+ tgs_sticker: Optional[Union[Any, str]]=None,
+ webm_sticker: Optional[Union[Any, str]]=None,
+ mask_position: Optional[types.MaskPosition]=None,
+ sticker: Optional[types.InputSticker]=None) -> bool:
+ """
+ Use this method to add a new sticker to a set created by the bot.
+ The format of the added sticker must match the format of the other stickers in the set.
+ Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers.
+ Static sticker sets can have up to 120 stickers.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#addstickertoset
+
+ .. note::
+ **_sticker, mask_position, emojis parameters are deprecated, use stickers instead
+
+ :param user_id: User identifier of created sticker set owner
+ :type user_id: :obj:`int`
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param emojis: One or more emoji corresponding to the sticker
+ :type emojis: :obj:`str`
+
+ :param png_sticker: PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either
+ width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers,
+ pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.
+ :type png_sticker: :obj:`str` or :obj:`filelike object`
+
+ :param tgs_sticker: TGS animation with the sticker, uploaded using multipart/form-data.
+ :type tgs_sticker: :obj:`str` or :obj:`filelike object`
+
+ :param webm_sticker: WebM animation with the sticker, uploaded using multipart/form-data.
+ :type webm_sticker: :obj:`str` or :obj:`filelike object`
+
+ :param mask_position: A JSON-serialized object for position where the mask should be placed on faces
+ :type mask_position: :class:`telebot.types.MaskPosition`
+
+ :param sticker: A JSON-serialized object for sticker to be added to the sticker set
+ :type sticker: :class:`telebot.types.InputSticker`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+
+ # split emojis if string
+ if isinstance(emojis, str):
+ emojis = list(emojis)
+ # Replaced the parameters png_sticker, tgs_sticker, webm_sticker, emojis and mask_position
+ if sticker is None:
+ old_sticker = png_sticker or tgs_sticker or webm_sticker
+ if old_sticker is not None:
+ logger.warning('The parameters "..._sticker", "emojis" and "mask_position" are deprecated, use "sticker" instead')
+ if not old_sticker:
+ raise ValueError('You must pass at least one sticker.')
+ sticker = types.InputSticker(old_sticker, emojis, mask_position)
+
+ return apihelper.add_sticker_to_set(self.token, user_id, name, sticker)
+
+
+ def set_sticker_position_in_set(self, sticker: str, position: int) -> bool:
+ """
+ Use this method to move a sticker in a set created by the bot to a specific position . Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setstickerpositioninset
+
+ :param sticker: File identifier of the sticker
+ :type sticker: :obj:`str`
+
+ :param position: New sticker position in the set, zero-based
+ :type position: :obj:`int`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.set_sticker_position_in_set(self.token, sticker, position)
+
+
+ def delete_sticker_from_set(self, sticker: str) -> bool:
+ """
+ Use this method to delete a sticker from a set created by the bot. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletestickerfromset
+
+ :param sticker: File identifier of the sticker
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.delete_sticker_from_set(self.token, sticker)
+
+
+ def create_forum_topic(self,
+ chat_id: int, name: str, icon_color: Optional[int]=None,
+ icon_custom_emoji_id: Optional[str]=None) -> types.ForumTopic:
+ """
+ Use this method to create a topic in a forum supergroup chat. The bot must be an administrator
+ in the chat for this to work and must have the can_manage_topics administrator rights.
+ Returns information about the created topic as a ForumTopic object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#createforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param name: Name of the topic, 1-128 characters
+ :type name: :obj:`str`
+
+ :param icon_color: Color of the topic icon in RGB format. Currently, must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F
+ :type icon_color: :obj:`int`
+
+ :param icon_custom_emoji_id: Custom emoji for the topic icon. Must be an emoji of type “tgs” and must be exactly 1 character long
+ :type icon_custom_emoji_id: :obj:`str`
+
+ :return: On success, information about the created topic is returned as a ForumTopic object.
+ :rtype: :class:`telebot.types.ForumTopic`
+ """
+ return types.ForumTopic.de_json(
+ apihelper.create_forum_topic(
+ self.token, chat_id, name, icon_color=icon_color, icon_custom_emoji_id=icon_custom_emoji_id)
+ )
+
+
+ def edit_forum_topic(
+ self, chat_id: Union[int, str],
+ message_thread_id: int, name: Optional[str]=None,
+ icon_custom_emoji_id: Optional[str]=None
+ ) -> bool:
+ """
+ Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an
+ administrator in the chat for this to work and must have can_manage_topics administrator rights,
+ unless it is the creator of the topic. Returns True on success.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#editforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_thread_id: Identifier of the topic to edit
+ :type message_thread_id: :obj:`int`
+
+ :param name: Optional, New name of the topic, 1-128 characters. If not specififed or empty,
+ the current name of the topic will be kept
+ :type name: :obj:`str`
+
+ :param icon_custom_emoji_id: Optional, New unique identifier of the custom emoji shown as the topic icon.
+ Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the
+ icon. If not specified, the current icon will be kept
+ :type icon_custom_emoji_id: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.edit_forum_topic(
+ self.token, chat_id, message_thread_id, name=name, icon_custom_emoji_id=icon_custom_emoji_id)
+
+
+ def close_forum_topic(self, chat_id: Union[str, int], message_thread_id: int) -> bool:
+ """
+ Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator
+ in the chat for this to work and must have the can_manage_topics administrator rights, unless it is
+ the creator of the topic. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#closeforumtopic
+
+ :aram chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_thread_id: Identifier of the topic to close
+ :type message_thread_id: :obj:`int`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.close_forum_topic(self.token, chat_id, message_thread_id)
+
+
+ def reopen_forum_topic(self, chat_id: Union[str, int], message_thread_id: int) -> bool:
+ """
+ Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat
+ for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#reopenforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_thread_id: Identifier of the topic to reopen
+ :type message_thread_id: :obj:`int`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.reopen_forum_topic(self.token, chat_id, message_thread_id)
+
+
+ def delete_forum_topic(self, chat_id: Union[str, int], message_thread_id: int) -> bool:
+ """
+ Use this method to delete a topic in a forum supergroup chat. The bot must be an administrator in the chat for this
+ to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True
+ on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deleteforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_thread_id: Identifier of the topic to delete
+ :type message_thread_id: :obj:`int`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.delete_forum_topic(self.token, chat_id, message_thread_id)
+
+
+ def unpin_all_forum_topic_messages(self, chat_id: Union[str, int], message_thread_id: int) -> bool:
+ """
+ Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the
+ chat for this to work and must have the can_pin_messages administrator right in the supergroup.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unpinallforumtopicmessages
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_thread_id: Identifier of the topic
+ :type message_thread_id: :obj:`int`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return apihelper.unpin_all_forum_topic_messages(self.token, chat_id, message_thread_id)
+
+
+ def edit_general_forum_topic(self, chat_id: Union[int, str], name: str) -> bool:
+ """
+ Use this method to edit the name of the 'General' topic in a forum supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editgeneralforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param name: New topic name, 1-128 characters
+ :type name: :obj:`str`
+ """
+ return apihelper.edit_general_forum_topic(self.token, chat_id, name)
+
+
+ def close_general_forum_topic(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to close the 'General' topic in a forum supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#closegeneralforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+ """
+ return apihelper.close_general_forum_topic(self.token, chat_id)
+
+
+ def reopen_general_forum_topic(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to reopen the 'General' topic in a forum supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#reopengeneralforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+ """
+ return apihelper.reopen_general_forum_topic(self.token, chat_id)
+
+
+ def hide_general_forum_topic(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to hide the 'General' topic in a forum supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#hidegeneralforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+ """
+ return apihelper.hide_general_forum_topic(self.token, chat_id)
+
+
+ def unhide_general_forum_topic(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to unhide the 'General' topic in a forum supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unhidegeneralforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+ """
+ return apihelper.unhide_general_forum_topic(self.token, chat_id)
+
+
+ def get_forum_topic_icon_stickers(self) -> List[types.Sticker]:
+ """
+ Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user.
+ Requires no parameters. Returns an Array of Sticker objects.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getforumtopiciconstickers
+
+ :return: On success, a list of StickerSet objects is returned.
+ :rtype: List[:class:`telebot.types.StickerSet`]
+ """
+ return apihelper.get_forum_topic_icon_stickers(self.token)
+
+
+ def answer_web_app_query(self, web_app_query_id: str, result: types.InlineQueryResultBase) -> types.SentWebAppMessage:
+ """
+ Use this method to set the result of an interaction with a Web App and
+ send a corresponding message on behalf of the user to the chat from which
+ the query originated.
+ On success, a SentWebAppMessage object is returned.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#answerwebappquery
+
+ :param web_app_query_id: Unique identifier for the query to be answered
+ :type web_app_query_id: :obj:`str`
+
+ :param result: A JSON-serialized object describing the message to be sent
+ :type result: :class:`telebot.types.InlineQueryResultBase`
+
+ :return: On success, a SentWebAppMessage object is returned.
+ :rtype: :class:`telebot.types.SentWebAppMessage`
+ """
+ return apihelper.answer_web_app_query(self.token, web_app_query_id, result)
+
+ def save_prepared_inline_message(
+ self, user_id: int, result: types.InlineQueryResultBase, allow_user_chats: Optional[bool]=None,
+ allow_bot_chats: Optional[bool]=None, allow_group_chats: Optional[bool]=None,
+ allow_channel_chats: Optional[bool]=None) -> types.PreparedInlineMessage:
+ """
+ Use this method to store a message that can be sent by a user of a Mini App.
+ Returns a PreparedInlineMessage object.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#savepreparedinlinemessage
+
+ :param user_id: Unique identifier of the target user that can use the prepared message
+ :type user_id: :obj:`int`
+
+ :param result: A JSON-serialized object describing the message to be sent
+ :type result: :class:`telebot.types.InlineQueryResultBase`
+
+ :param allow_user_chats: Pass True if the message can be sent to private chats with users
+ :type allow_user_chats: :obj:`bool`
+
+ :param allow_bot_chats: Pass True if the message can be sent to private chats with bots
+ :type allow_bot_chats: :obj:`bool`
+
+ :param allow_group_chats: Pass True if the message can be sent to group and supergroup chats
+ :type allow_group_chats: :obj:`bool`
+
+ :param allow_channel_chats: Pass True if the message can be sent to channel chats
+ :type allow_channel_chats: :obj:`bool`
+
+ :return: On success, a PreparedInlineMessage object is returned.
+ :rtype: :class:`telebot.types.PreparedInlineMessage`
+ """
+ return types.PreparedInlineMessage.de_json(
+ apihelper.save_prepared_inline_message(
+ self.token, user_id, result, allow_user_chats=allow_user_chats, allow_bot_chats=allow_bot_chats,
+ allow_group_chats=allow_group_chats, allow_channel_chats=allow_channel_chats)
+ )
+
+ def register_for_reply(self, message: types.Message, callback: Callable, *args, **kwargs) -> None:
+ """
+ Registers a callback function to be notified when a reply to `message` arrives.
+
+ Warning: In case `callback` as lambda function, saving reply handlers will not work.
+
+ :param message: The message for which we are awaiting a reply.
+ :type message: :class:`telebot.types.Message`
+
+ :param callback: The callback function to be called when a reply arrives. Must accept one `message`
+ parameter, which will contain the replied message.
+ :type callback: :obj:`Callable[[telebot.types.Message], None]`
+
+ :param args: Optional arguments for the callback function.
+ :param kwargs: Optional keyword arguments for the callback function.
+
+ :return: None
+ """
+ self.register_for_reply_by_message_id(message.message_id, callback, *args, **kwargs)
+
+
+ def register_for_reply_by_message_id(
+ self, message_id: int, callback: Callable, *args, **kwargs) -> None:
+ """
+ Registers a callback function to be notified when a reply to `message` arrives.
+
+ Warning: In case `callback` as lambda function, saving reply handlers will not work.
+
+ :param message_id: The id of the message for which we are awaiting a reply.
+ :type message_id: :obj:`int`
+
+ :param callback: The callback function to be called when a reply arrives. Must accept one `message`
+ parameter, which will contain the replied message.
+ :type callback: :obj:`Callable[[telebot.types.Message], None]`
+
+ :param args: Optional arguments for the callback function.
+ :param kwargs: Optional keyword arguments for the callback function.
+
+ :return: None
+ """
+ self.reply_backend.register_handler(message_id, Handler(callback, *args, **kwargs))
+
+
+ def _notify_reply_handlers(self, new_messages) -> None:
+ """
+ Notify handlers of the answers
+
+ :param new_messages:
+ :return:
+ """
+ for message in new_messages:
+ if hasattr(message, "reply_to_message") and message.reply_to_message is not None:
+ handlers = self.reply_backend.get_handlers(message.reply_to_message.message_id)
+ if handlers:
+ for handler in handlers:
+ self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"])
+
+
+ def register_next_step_handler(self, message: types.Message, callback: Callable, *args, **kwargs) -> None:
+ """
+ Registers a callback function to be notified when new message arrives after `message`.
+
+ Warning: In case `callback` as lambda function, saving next step handlers will not work.
+
+ :param message: The message for which we want to handle new message in the same chat.
+ :type message: :class:`telebot.types.Message`
+
+ :param callback: The callback function which next new message arrives.
+ :type callback: :obj:`Callable[[telebot.types.Message], None]`
+
+ :param args: Args to pass in callback func
+
+ :param kwargs: Args to pass in callback func
+
+ :return: None
+ """
+ self.register_next_step_handler_by_chat_id(message.chat.id, callback, *args, **kwargs)
+
+
+ def setup_middleware(self, middleware: BaseMiddleware):
+ """
+ Registers class-based middleware.
+
+ :param middleware: Subclass of :class:`telebot.handler_backends.BaseMiddleware`
+ :type middleware: :class:`telebot.handler_backends.BaseMiddleware`
+ :return: None
+ """
+ if not self.use_class_middlewares:
+ logger.error('Class-based middlewares are not enabled. Pass use_class_middlewares=True to enable it.')
+ return
+
+ if not hasattr(middleware, 'update_types'):
+ logger.error('Middleware has no update_types parameter. Please add list of updates to handle.')
+ return
+
+ if not hasattr(middleware, 'update_sensitive'):
+ logger.warning('Middleware has no update_sensitive parameter. Parameter was set to False.')
+ middleware.update_sensitive = False
+
+ self.middlewares.append(middleware)
+
+
+ def set_state(self, user_id: int, state: Union[str, State], chat_id: Optional[int]=None,
+ business_connection_id: Optional[str]=None, message_thread_id: Optional[int]=None,
+ bot_id: Optional[int]=None) -> bool:
+ """
+ Sets a new state of a user.
+
+ .. note::
+
+ You should set both user id and chat id in order to set state for a user in a chat.
+ Otherwise, if you only set user_id, chat_id will equal to user_id, this means that
+ state will be set for the user in his private chat with a bot.
+
+ .. versionchanged:: 4.23.0
+
+ Added additional parameters to support topics, business connections, and message threads.
+
+ .. seealso::
+
+ For more details, visit the `custom_states.py example `_.
+
+ :param user_id: User's identifier
+ :type user_id: :obj:`int`
+
+ :param state: new state. can be string, or :class:`telebot.types.State`
+ :type state: :obj:`int` or :obj:`str` or :class:`telebot.types.State`
+
+ :param chat_id: Chat's identifier
+ :type chat_id: :obj:`int`
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: :obj:`int`
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: :obj:`str`
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: :obj:`int`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ return self.current_states.set_state(chat_id, user_id, state,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ def reset_data(self, user_id: int, chat_id: Optional[int]=None,
+ business_connection_id: Optional[str]=None,
+ message_thread_id: Optional[int]=None, bot_id: Optional[int]=None) -> bool:
+ """
+ Reset data for a user in chat: sets the 'data' field to an empty dictionary.
+
+ :param user_id: User's identifier
+ :type user_id: :obj:`int`
+
+ :param chat_id: Chat's identifier
+ :type chat_id: :obj:`int`
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: :obj:`int`
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: :obj:`str`
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: :obj:`int`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ return self.current_states.reset_data(chat_id, user_id,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ def delete_state(self, user_id: int, chat_id: Optional[int]=None, business_connection_id: Optional[str]=None,
+ message_thread_id: Optional[int]=None, bot_id: Optional[int]=None) -> bool:
+ """
+ Fully deletes the storage record of a user in chat.
+
+ .. warning::
+
+ This does NOT set state to None, but deletes the object from storage.
+
+ :param user_id: User's identifier
+ :type user_id: :obj:`int`
+
+ :param chat_id: Chat's identifier
+ :type chat_id: :obj:`int`
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: :obj:`int`
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: :obj:`str`
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: :obj:`int`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ return self.current_states.delete_state(chat_id, user_id,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ def retrieve_data(self, user_id: int, chat_id: Optional[int]=None, business_connection_id: Optional[str]=None,
+ message_thread_id: Optional[int]=None, bot_id: Optional[int]=None) -> Optional[Dict[str, Any]]:
+ """
+ Returns context manager with data for a user in chat.
+
+ :param user_id: User identifier
+ :type user_id: int
+
+ :param chat_id: Chat's unique identifier, defaults to user_id
+ :type chat_id: int, optional
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: int, optional
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: str, optional
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: int, optional
+
+ :return: Context manager with data for a user in chat
+ :rtype: Optional[Any]
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ return self.current_states.get_interactive_data(chat_id, user_id,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ def get_state(self, user_id: int, chat_id: Optional[int]=None,
+ business_connection_id: Optional[str]=None,
+ message_thread_id: Optional[int]=None, bot_id: Optional[int]=None) -> str:
+ """
+ Gets current state of a user.
+ Not recommended to use this method. But it is ok for debugging.
+
+ .. warning::
+
+ Even if you are using :class:`telebot.types.State`, this method will return a string.
+ When comparing(not recommended), you should compare this string with :class:`telebot.types.State`.name
+
+ :param user_id: User's identifier
+ :type user_id: :obj:`int`
+
+ :param chat_id: Chat's identifier
+ :type chat_id: :obj:`int`
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: :obj:`int`
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: :obj:`str`
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: :obj:`int`
+
+ :return: state of a user
+ :rtype: :obj:`int` or :obj:`str` or :class:`telebot.types.State`
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ return self.current_states.get_state(chat_id, user_id,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ def add_data(self, user_id: int, chat_id: Optional[int]=None,
+ business_connection_id: Optional[str]=None,
+ message_thread_id: Optional[int]=None,
+ bot_id: Optional[int]=None,
+ **kwargs) -> None:
+ """
+ Add data to states.
+
+ :param user_id: User's identifier
+ :type user_id: :obj:`int`
+
+ :param chat_id: Chat's identifier
+ :type chat_id: :obj:`int`
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: :obj:`int`
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: :obj:`str`
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: :obj:`int`
+
+ :param kwargs: Data to add
+ :return: None
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ for key, value in kwargs.items():
+ self.current_states.set_data(chat_id, user_id, key, value,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ def register_next_step_handler_by_chat_id(
+ self, chat_id: int, callback: Callable, *args, **kwargs) -> None:
+ """
+ Registers a callback function to be notified when new message arrives in the given chat.
+
+ Warning: In case `callback` as lambda function, saving next step handlers will not work.
+
+ :param chat_id: The chat (chat ID) for which we want to handle new message.
+ :type chat_id: :obj:`int`
+
+ :param callback: The callback function which next new message arrives.
+ :type callback: :obj:`Callable[[telebot.types.Message], None]`
+
+ :param args: Args to pass in callback func
+
+ :param kwargs: Args to pass in callback func
+
+ :return: None
+ """
+ self.next_step_backend.register_handler(chat_id, Handler(callback, *args, **kwargs))
+
+
+ def clear_step_handler(self, message: types.Message) -> None:
+ """
+ Clears all callback functions registered by register_next_step_handler().
+
+ :param message: The message for which we want to handle new message after that in same chat.
+ :type message: :class:`telebot.types.Message`
+
+ :return: None
+ """
+ self.clear_step_handler_by_chat_id(message.chat.id)
+
+
+ def clear_step_handler_by_chat_id(self, chat_id: Union[int, str]) -> None:
+ """
+ Clears all callback functions registered by register_next_step_handler().
+
+ :param chat_id: The chat for which we want to clear next step handlers
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: None
+ """
+ self.next_step_backend.clear_handlers(chat_id)
+
+
+ def clear_reply_handlers(self, message: types.Message) -> None:
+ """
+ Clears all callback functions registered by register_for_reply() and register_for_reply_by_message_id().
+
+ :param message: The message for which we want to clear reply handlers
+ :type message: :class:`telebot.types.Message`
+
+ :return: None
+ """
+ self.clear_reply_handlers_by_message_id(message.message_id)
+
+
+ def clear_reply_handlers_by_message_id(self, message_id: int) -> None:
+ """
+ Clears all callback functions registered by register_for_reply() and register_for_reply_by_message_id().
+
+ :param message_id: The message id for which we want to clear reply handlers
+ :type message_id: :obj:`int`
+
+ :return: None
+ """
+ self.reply_backend.clear_handlers(message_id)
+
+
+ def _notify_next_handlers(self, new_messages):
+ """
+ Description: TBD
+
+ :param new_messages:
+ :return:
+ """
+ for i, message in enumerate(new_messages):
+ need_pop = False
+ handlers = self.next_step_backend.get_handlers(message.chat.id)
+ if handlers:
+ for handler in handlers:
+ need_pop = True
+ self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"])
+ if need_pop:
+ # removing message that was detected with next_step_handler
+ new_messages.pop(i)
+
+
+ @staticmethod
+ def _build_handler_dict(handler, pass_bot=False, **filters):
+ """
+ Builds a dictionary for a handler
+
+ :param handler:
+ :param filters:
+ :return:
+ """
+ return {
+ 'function': handler,
+ 'pass_bot': pass_bot,
+ 'filters': {ftype: fvalue for ftype, fvalue in filters.items() if fvalue is not None}
+ # Remove None values, they are skipped in _test_filter anyway
+ #'filters': filters
+ }
+
+
+ def middleware_handler(self, update_types: Optional[List[str]]=None):
+ """
+ Function-based middleware handler decorator.
+
+ This decorator can be used to decorate functions that must be handled as middlewares before entering any other
+ message handlers
+ But, be careful and check type of the update inside the handler if more than one update_type is given
+
+ Example:
+
+ .. code-block:: python3
+ :caption: Usage of middleware_handler
+
+ bot = TeleBot('TOKEN')
+
+ # Print post message text before entering to any post_channel handlers
+ @bot.middleware_handler(update_types=['channel_post', 'edited_channel_post'])
+ def print_channel_post_text(bot_instance, channel_post):
+ print(channel_post.text)
+
+ # Print update id before entering to any handlers
+ @bot.middleware_handler()
+ def print_channel_post_text(bot_instance, update):
+ print(update.update_id)
+
+ :param update_types: Optional list of update types that can be passed into the middleware handler.
+ :type update_types: :obj:`list` of :obj:`str`
+
+ :return: function
+ """
+ def decorator(handler):
+ self.add_middleware_handler(handler, update_types)
+ return handler
+
+ return decorator
+
+
+ def add_middleware_handler(self, handler, update_types=None):
+ """
+ Add middleware handler.
+
+ :meta private:
+
+ :param handler:
+ :param update_types:
+ :return:
+ """
+ if not apihelper.ENABLE_MIDDLEWARE:
+ raise RuntimeError("Middleware is not enabled. Use apihelper.ENABLE_MIDDLEWARE before initialising TeleBot.")
+
+ if self.use_class_middlewares:
+ logger.error("middleware_handler/register_middleware_handler/add_middleware_handler cannot be used with use_class_middlewares=True. Skipped.")
+ return
+
+ added = False
+ if update_types and self.typed_middleware_handlers:
+ for update_type in update_types:
+ if update_type in self.typed_middleware_handlers:
+ added = True
+ self.typed_middleware_handlers[update_type].append(handler)
+ if not added:
+ self.default_middleware_handlers.append(handler)
+
+
+ # function register_middleware_handler
+ def register_middleware_handler(self, callback, update_types=None):
+ """
+ Adds function-based middleware handler.
+
+ This function will register your decorator function. Function-based middlewares are executed before handlers.
+ But, be careful and check type of the update inside the handler if more than one update_type is given
+
+ Example:
+
+ bot = TeleBot('TOKEN')
+
+ bot.register_middleware_handler(print_channel_post_text, update_types=['channel_post', 'edited_channel_post'])
+
+ :param callback: Function that will be used as a middleware handler.
+ :type callback: :obj:`function`
+
+ :param update_types: Optional list of update types that can be passed into the middleware handler.
+ :type update_types: :obj:`list` of :obj:`str`
+
+ :return: None
+ """
+ self.add_middleware_handler(callback, update_types)
+
+
+ @staticmethod
+ def check_commands_input(commands, method_name):
+ """
+ :meta private:
+ """
+ if not isinstance(commands, list) or not all(isinstance(item, str) for item in commands):
+ logger.error(f"{method_name}: Commands filter should be list of strings (commands), unknown type supplied to the 'commands' filter list. Not able to use the supplied type.")
+
+
+ @staticmethod
+ def check_regexp_input(regexp, method_name):
+ """
+ :meta private:
+ """
+ if not isinstance(regexp, str):
+ logger.error(f"{method_name}: Regexp filter should be string. Not able to use the supplied type.")
+
+
+ def message_handler(
+ self,
+ commands: Optional[List[str]]=None,
+ regexp: Optional[str]=None,
+ func: Optional[Callable]=None,
+ content_types: Optional[List[str]]=None,
+ chat_types: Optional[List[str]]=None,
+ **kwargs):
+ """
+ Handles New incoming message of any kind - text, photo, sticker, etc.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
+ All message handlers are tested in the order they were added.
+
+ Example:
+
+ .. code-block:: python3
+ :caption: Usage of message_handler
+
+ bot = TeleBot('TOKEN')
+
+ # Handles all messages which text matches regexp.
+ @bot.message_handler(regexp='someregexp')
+ def command_help(message):
+ bot.send_message(message.chat.id, 'Did someone call for help?')
+
+ # Handles messages in private chat
+ @bot.message_handler(chat_types=['private']) # You can add more chat types
+ def command_help(message):
+ bot.send_message(message.chat.id, 'Private chat detected, sir!')
+
+ # Handle all sent documents of type 'text/plain'.
+ @bot.message_handler(func=lambda message: message.document.mime_type == 'text/plain',
+ content_types=['document'])
+ def command_handle_document(message):
+ bot.send_message(message.chat.id, 'Document received, sir!')
+
+ # Handle all other messages.
+ @bot.message_handler(func=lambda message: True, content_types=['audio', 'photo', 'voice', 'video', 'document',
+ 'text', 'location', 'contact', 'sticker'])
+ def default_command(message):
+ bot.send_message(message.chat.id, "This is the default command handler.")
+
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
+
+ :param func: Optional lambda function. The lambda receives the message to test as the first parameter.
+ It must return True if the command should handle the message.
+ :type func: :obj:`lambda`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param chat_types: list of chat types
+ :type chat_types: :obj:`list` of :obj:`str`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: decorated function
+ """
+ if content_types is None:
+ content_types = ["text"]
+
+ method_name = "message_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ chat_types=chat_types,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_message_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_message_handler(self, handler_dict):
+ """
+ Adds a message handler
+ Note that you should use register_message_handler to add message_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.message_handlers.append(handler_dict)
+
+
+ def register_message_handler(self, callback: Callable, content_types: Optional[List[str]]=None, commands: Optional[List[str]]=None,
+ regexp: Optional[str]=None, func: Optional[Callable]=None, chat_types: Optional[List[str]]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers message handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param chat_types: List of chat types
+ :type chat_types: :obj:`list` of :obj:`str`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ method_name = "register_message_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("register_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+
+
+ handler_dict = self._build_handler_dict(callback,
+ chat_types=chat_types,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ pass_bot=pass_bot,
+ **kwargs)
+ self.add_message_handler(handler_dict)
+
+
+ def edited_message_handler(self, commands=None, regexp=None, func=None, content_types=None, chat_types=None, **kwargs):
+ """
+ Handles new version of a message that is known to the bot and was edited.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
+
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param chat_types: list of chat types
+ :type chat_types: :obj:`list` of :obj:`str`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ if content_types is None:
+ content_types = ["text"]
+
+ method_name = "edited_message_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("edited_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ chat_types=chat_types,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_edited_message_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_edited_message_handler(self, handler_dict):
+ """
+ Adds the edit message handler
+ Note that you should use register_edited_message_handler to add edited_message_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.edited_message_handlers.append(handler_dict)
+
+
+ def register_edited_message_handler(self, callback: Callable, content_types: Optional[List[str]]=None,
+ commands: Optional[List[str]]=None, regexp: Optional[str]=None, func: Optional[Callable]=None,
+ chat_types: Optional[List[str]]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers edited message handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param chat_types: True for private chat
+ :type chat_types: :obj:`bool`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ method_name = "register_edited_message_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("register_edited_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ handler_dict = self._build_handler_dict(callback,
+ chat_types=chat_types,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ pass_bot=pass_bot,
+ **kwargs)
+ self.add_edited_message_handler(handler_dict)
+
+
+ def channel_post_handler(self, commands=None, regexp=None, func=None, content_types=None, **kwargs):
+ """
+ Handles new incoming channel post of any kind - text, photo, sticker, etc.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
+
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ if content_types is None:
+ content_types = ["text"]
+
+ method_name = "channel_post_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("channel_post_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_channel_post_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_channel_post_handler(self, handler_dict):
+ """
+ Adds channel post handler
+ Note that you should use register_channel_post_handler to add channel_post_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.channel_post_handlers.append(handler_dict)
+
+
+ def register_channel_post_handler(
+ self, callback: Callable, content_types: Optional[List[str]]=None, commands: Optional[List[str]]=None,
+ regexp: Optional[str]=None, func: Optional[Callable]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers channel post message handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ method_name = "register_channel_post_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("register_channel_post_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ handler_dict = self._build_handler_dict(callback,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ pass_bot=pass_bot,
+ **kwargs)
+ self.add_channel_post_handler(handler_dict)
+
+
+ def edited_channel_post_handler(self, commands=None, regexp=None, func=None, content_types=None, **kwargs):
+ """
+ Handles new version of a channel post that is known to the bot and was edited.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
+
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return:
+ """
+ if content_types is None:
+ content_types = ["text"]
+
+ method_name = "edited_channel_post_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("edited_channel_post_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_edited_channel_post_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_edited_channel_post_handler(self, handler_dict):
+ """
+ Adds the edit channel post handler
+ Note that you should use register_edited_channel_post_handler to add edited_channel_post_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.edited_channel_post_handlers.append(handler_dict)
+
+
+ def register_edited_channel_post_handler(
+ self, callback: Callable, content_types: Optional[List[str]]=None, commands: Optional[List[str]]=None,
+ regexp: Optional[str]=None, func: Optional[Callable]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers edited channel post message handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: decorated function
+ """
+ method_name = "register_edited_channel_post_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("register_edited_channel_post_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ handler_dict = self._build_handler_dict(callback,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ pass_bot=pass_bot,
+ **kwargs)
+ self.add_edited_channel_post_handler(handler_dict)
+
+
+ def message_reaction_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming message reaction.
+ As a parameter to the decorator function, it passes :class:`telebot.types.MessageReactionUpdated` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return:
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_message_reaction_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_message_reaction_handler(self, handler_dict):
+ """
+ Adds message reaction handler
+ Note that you should use register_message_reaction_handler to add message_reaction_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.message_reaction_handlers.append(handler_dict)
+
+
+ def register_message_reaction_handler(self, callback: Callable, func: Callable=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers message reaction handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_message_reaction_handler(handler_dict)
+
+
+ def message_reaction_count_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming message reaction count.
+ As a parameter to the decorator function, it passes :class:`telebot.types.MessageReactionCountUpdated` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return:
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_message_reaction_count_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_message_reaction_count_handler(self, handler_dict):
+ """
+ Adds message reaction count handler
+ Note that you should use register_message_reaction_count_handler to add message_reaction_count_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.message_reaction_count_handlers.append(handler_dict)
+
+
+ def register_message_reaction_count_handler(self, callback: Callable, func: Callable=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers message reaction count handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_message_reaction_count_handler(handler_dict)
+
+
+ def inline_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming inline query.
+ As a parameter to the decorator function, it passes :class:`telebot.types.InlineQuery` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_inline_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_inline_handler(self, handler_dict):
+ """
+ Adds inline call handler
+ Note that you should use register_inline_handler to add inline_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.inline_handlers.append(handler_dict)
+
+
+ def register_inline_handler(self, callback: Callable, func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers inline handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: decorated function
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_inline_handler(handler_dict)
+
+
+ def chosen_inline_handler(self, func, **kwargs):
+ """
+ Handles the result of an inline query that was chosen by a user and sent to their chat partner.
+ Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
+ As a parameter to the decorator function, it passes :class:`telebot.types.ChosenInlineResult` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_chosen_inline_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_chosen_inline_handler(self, handler_dict):
+ """
+ Description: TBD
+ Note that you should use register_chosen_inline_handler to add chosen_inline_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.chosen_inline_handlers.append(handler_dict)
+
+
+ def register_chosen_inline_handler(self, callback: Callable, func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers chosen inline handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_chosen_inline_handler(handler_dict)
+
+
+ def callback_query_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming callback query.
+ As a parameter to the decorator function, it passes :class:`telebot.types.CallbackQuery` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_callback_query_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_callback_query_handler(self, handler_dict):
+ """
+ Adds a callback request handler
+ Note that you should use register_callback_query_handler to add callback_query_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.callback_query_handlers.append(handler_dict)
+
+
+ def register_callback_query_handler(self, callback: Callable, func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers callback query handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_callback_query_handler(handler_dict)
+
+
+ def shipping_query_handler(self, func, **kwargs):
+ """
+ Handles new incoming shipping query. Only for invoices with flexible price.
+ As a parameter to the decorator function, it passes :class:`telebot.types.ShippingQuery` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_shipping_query_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_shipping_query_handler(self, handler_dict):
+ """
+ Adds a shipping request handler.
+ Note that you should use register_shipping_query_handler to add shipping_query_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.shipping_query_handlers.append(handler_dict)
+
+
+ def register_shipping_query_handler(self, callback: Callable, func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers shipping query handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_shipping_query_handler(handler_dict)
+
+
+ def pre_checkout_query_handler(self, func, **kwargs):
+ """
+ New incoming pre-checkout query. Contains full information about checkout.
+ As a parameter to the decorator function, it passes :class:`telebot.types.PreCheckoutQuery` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_pre_checkout_query_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_pre_checkout_query_handler(self, handler_dict):
+ """
+ Adds a pre-checkout request handler
+ Note that you should use register_pre_checkout_query_handler to add pre_checkout_query_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.pre_checkout_query_handlers.append(handler_dict)
+
+
+ def register_pre_checkout_query_handler(self, callback: Callable, func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers pre-checkout request handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: decorated function
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_pre_checkout_query_handler(handler_dict)
+
+ def purchased_paid_media_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming purchased paid media.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_purchased_paid_media_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_purchased_paid_media_handler(self, handler_dict):
+ """
+ Adds a purchased paid media handler
+ Note that you should use register_purchased_paid_media_handler to add purchased_paid_media_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.purchased_paid_media_handlers.append(handler_dict)
+
+ def register_purchased_paid_media_handler(self, callback: Callable, func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers purchased paid media handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_purchased_paid_media_handler(handler_dict)
+
+ def poll_handler(self, func, **kwargs):
+ """
+ Handles new state of a poll. Bots receive only updates about stopped polls and polls, which are sent by the bot
+ As a parameter to the decorator function, it passes :class:`telebot.types.Poll` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_poll_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_poll_handler(self, handler_dict):
+ """
+ Adds a poll request handler
+ Note that you should use register_poll_handler to add poll_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.poll_handlers.append(handler_dict)
+
+
+ def register_poll_handler(self, callback: Callable, func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers poll handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_poll_handler(handler_dict)
+
+
+ def poll_answer_handler(self, func=None, **kwargs):
+ """
+ Handles change of user's answer in a non-anonymous poll(when user changes the vote).
+ Bots receive new votes only in polls that were sent by the bot itself.
+ As a parameter to the decorator function, it passes :class:`telebot.types.PollAnswer` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_poll_answer_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_poll_answer_handler(self, handler_dict):
+ """
+ Adds a poll_answer request handler.
+ Note that you should use register_poll_answer_handler to add poll_answer_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.poll_answer_handlers.append(handler_dict)
+
+
+ def register_poll_answer_handler(self, callback: Callable, func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers poll answer handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_poll_answer_handler(handler_dict)
+
+
+ def my_chat_member_handler(self, func=None, **kwargs):
+ """
+ Handles update in a status of a bot. For private chats,
+ this update is received only when the bot is blocked or unblocked by the user.
+ As a parameter to the decorator function, it passes :class:`telebot.types.ChatMemberUpdated` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_my_chat_member_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_my_chat_member_handler(self, handler_dict):
+ """
+ Adds a my_chat_member handler.
+ Note that you should use register_my_chat_member_handler to add my_chat_member_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.my_chat_member_handlers.append(handler_dict)
+
+
+ def register_my_chat_member_handler(self, callback: Callable, func: Optional[Callable]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers my chat member handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_my_chat_member_handler(handler_dict)
+
+
+ def chat_member_handler(self, func=None, **kwargs):
+ """
+ Handles update in a status of a user in a chat.
+ The bot must be an administrator in the chat and must explicitly specify “chat_member”
+ in the list of allowed_updates to receive these updates.
+ As a parameter to the decorator function, it passes :class:`telebot.types.ChatMemberUpdated` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_chat_member_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_chat_member_handler(self, handler_dict):
+ """
+ Adds a chat_member handler.
+ Note that you should use register_chat_member_handler to add chat_member_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.chat_member_handlers.append(handler_dict)
+
+
+ def register_chat_member_handler(
+ self, callback: Callable, func: Optional[Callable]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers chat member handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return:None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_chat_member_handler(handler_dict)
+
+
+ def chat_join_request_handler(self, func=None, **kwargs):
+ """
+ Handles a request to join the chat has been sent. The bot must have the can_invite_users
+ administrator right in the chat to receive these updates.
+ As a parameter to the decorator function, it passes :class:`telebot.types.ChatJoinRequest` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_chat_join_request_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_chat_join_request_handler(self, handler_dict):
+ """
+ Adds a chat_join_request handler.
+ Note that you should use register_chat_join_request_handler to add chat_join_request_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.chat_join_request_handlers.append(handler_dict)
+
+
+ def register_chat_join_request_handler(
+ self, callback: Callable, func: Optional[Callable]=None, pass_bot:Optional[bool]=False, **kwargs):
+ """
+ Registers chat join request handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- def answer_pre_checkout_query(self, pre_checkout_query_id, ok, error_message=None):
- return apihelper.answer_pre_checkout_query(self.token, pre_checkout_query_id, ok, error_message)
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
- def edit_message_caption(self, caption, chat_id=None, message_id=None, inline_message_id=None,
- parse_mode=None, reply_markup=None):
- result = apihelper.edit_message_caption(self.token, caption, chat_id, message_id, inline_message_id,
- parse_mode, reply_markup)
- if type(result) == bool:
- return result
- return types.Message.de_json(result)
+ :param kwargs: Optional keyword arguments(custom filters)
- def reply_to(self, message, text, **kwargs):
- """
- Convenience function for `send_message(message.chat.id, text, reply_to_message_id=message.message_id, **kwargs)`
+ :return: None
"""
- return self.send_message(message.chat.id, text, reply_to_message_id=message.message_id, **kwargs)
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_chat_join_request_handler(handler_dict)
- def answer_inline_query(self, inline_query_id, results, cache_time=None, is_personal=None, next_offset=None,
- switch_pm_text=None, switch_pm_parameter=None):
- """
- Use this method to send answers to an inline query. On success, True is returned.
- No more than 50 results per query are allowed.
- :param inline_query_id: Unique identifier for the answered query
- :param results: Array of results for the inline query
- :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server.
- :param is_personal: Pass True, if results may be cached on the server side only for the user that sent the query.
- :param next_offset: Pass the offset that a client should send in the next query with the same text to receive more results.
- :param switch_pm_parameter: If passed, clients will display a button with specified text that switches the user
- to a private chat with the bot and sends the bot a start message with the parameter switch_pm_parameter
- :param switch_pm_text: Parameter for the start message sent to the bot when user presses the switch button
- :return: True means success.
- """
- return apihelper.answer_inline_query(self.token, inline_query_id, results, cache_time, is_personal, next_offset,
- switch_pm_text, switch_pm_parameter)
- def answer_callback_query(self, callback_query_id, text=None, show_alert=None, url=None, cache_time=None):
- """
- Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to
- the user as a notification at the top of the chat screen or as an alert.
- :param callback_query_id:
- :param text:
- :param show_alert:
- :return:
+ def chat_boost_handler(self, func=None, **kwargs):
"""
- return apihelper.answer_callback_query(self.token, callback_query_id, text, show_alert, url, cache_time)
+ Handles new incoming chat boost state.
+ it passes :class:`telebot.types.ChatBoostUpdated` object.
- # def send_sticker(self, chat_id, sticker, disable_notification=None, reply_to_message_id=None, reply_markup=None):
- # """
- # Use this method to send .webp stickers. On success, the sent Message is returned.
- # :param chat_id:
- # :param sticker:
- # :param disable_notification:
- # :param reply_to_message_id:
- # :param reply_markup:
- # :return:
- # """
- # result = apihelper.send_sticker(self.token, chat_id, sticker, disable_notification, reply_markup, reply_markup)
- # return types.Message.de_json(result)
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- def get_sticker_set(self, name):
- """
- Use this method to get a sticker set. On success, a StickerSet object is returned.
- :param name:
- :return:
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
"""
- result = apihelper.get_sticker_set(self.token, name)
- return types.StickerSet.de_json(result)
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_chat_boost_handler(handler_dict)
+ return handler
- def upload_sticker_file(self, user_id, png_sticker):
- """
- Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet
- methods (can be used multiple times). Returns the uploaded File on success.
- :param user_id:
- :param png_sticker:
- :return:
- """
- result = apihelper.upload_sticker_file(self.token, user_id, png_sticker)
- return types.File.de_json(result)
+ return decorator
- def create_new_sticker_set(self, user_id, name, title, png_sticker, emojis, contains_masks=None,
- mask_position=None):
- """
- Use this method to create new sticker set owned by a user. The bot will be able to edit the created sticker set.
- Returns True on success.
- :param user_id:
- :param name:
- :param title:
- :param png_sticker:
- :param emojis:
- :param contains_masks:
- :param mask_position:
- :return:
- """
- return apihelper.create_new_sticker_set(self.token, user_id, name, title, png_sticker, emojis, contains_masks,
- mask_position)
- def add_sticker_to_set(self, user_id, name, png_sticker, emojis, mask_position=None):
- """
- Use this method to add a new sticker to a set created by the bot. Returns True on success.
- :param user_id:
- :param name:
- :param png_sticker:
- :param emojis:
- :param mask_position:
- :return:
+ def add_chat_boost_handler(self, handler_dict):
"""
- return apihelper.add_sticker_to_set(self.token, user_id, name, png_sticker, emojis, mask_position)
+ Adds a chat_boost handler.
+ Note that you should use register_chat_boost_handler to add chat_boost_handler to the bot.
- def set_sticker_position_in_set(self, sticker, position):
- """
- Use this method to move a sticker in a set created by the bot to a specific position . Returns True on success.
- :param sticker:
- :param position:
- :return:
- """
- return apihelper.set_sticker_position_in_set(self.token, sticker, position)
+ :meta private:
- def delete_sticker_from_set(self, sticker):
- """
- Use this method to delete a sticker from a set created by the bot. Returns True on success.
- :param sticker:
+ :param handler_dict:
:return:
"""
- return apihelper.delete_sticker_from_set(self.token, sticker)
+ self.chat_boost_handlers.append(handler_dict)
- def register_for_reply(self, message, callback, *args, **kwargs):
+
+ def register_chat_boost_handler(
+ self, callback: Callable, func: Optional[Callable]=None, pass_bot:Optional[bool]=False, **kwargs):
"""
- Registers a callback function to be notified when a reply to `message` arrives.
+ Registers chat boost handler.
- Warning: In case `callback` as lambda function, saving reply handlers will not work.
+ :param callback: function to be called
+ :type callback: :obj:`function`
- :param message: The message for which we are awaiting a reply.
- :param callback: The callback function to be called when a reply arrives. Must accept one `message`
- parameter, which will contain the replied message.
- """
- message_id = message.message_id
- self.register_for_reply_by_message_id(message_id, callback, *args, **kwargs)
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- def register_for_reply_by_message_id(self, message_id, callback, *args, **kwargs):
- """
- Registers a callback function to be notified when a reply to `message` arrives.
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
- Warning: In case `callback` as lambda function, saving reply handlers will not work.
+ :param kwargs: Optional keyword arguments(custom filters)
- :param message_id: The id of the message for which we are awaiting a reply.
- :param callback: The callback function to be called when a reply arrives. Must accept one `message`
- parameter, which will contain the replied message.
+ :return: None
"""
- if message_id in self.reply_handlers.keys():
- self.reply_handlers[message_id].append(Handler(callback, *args, **kwargs))
- else:
- self.reply_handlers[message_id] = [Handler(callback, *args, **kwargs)]
- if self.reply_saver is not None:
- self.reply_saver.start_save_timer()
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_chat_boost_handler(handler_dict)
- def _notify_reply_handlers(self, new_messages):
- for message in new_messages:
- if hasattr(message, "reply_to_message") and message.reply_to_message is not None:
- reply_msg_id = message.reply_to_message.message_id
- if reply_msg_id in self.reply_handlers.keys():
- handlers = self.reply_handlers[reply_msg_id]
- for handler in handlers:
- self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"])
- self.reply_handlers.pop(reply_msg_id)
- if self.reply_saver is not None:
- self.reply_saver.start_save_timer()
- def register_next_step_handler(self, message, callback, *args, **kwargs):
+ def removed_chat_boost_handler(self, func=None, **kwargs):
"""
- Registers a callback function to be notified when new message arrives after `message`.
+ Handles new incoming chat boost state.
+ it passes :class:`telebot.types.ChatBoostRemoved` object.
- Warning: In case `callback` as lambda function, saving next step handlers will not work.
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- :param message: The message for which we want to handle new message in the same chat.
- :param callback: The callback function which next new message arrives.
- :param args: Args to pass in callback func
- :param kwargs: Args to pass in callback func
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
"""
- chat_id = message.chat.id
- self.register_next_step_handler_by_chat_id(chat_id, callback, *args, **kwargs)
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_removed_chat_boost_handler(handler_dict)
+ return handler
- def register_next_step_handler_by_chat_id(self, chat_id, callback, *args, **kwargs):
- """
- Registers a callback function to be notified when new message arrives after `message`.
+ return decorator
- Warning: In case `callback` as lambda function, saving next step handlers will not work.
- :param chat_id: The chat for which we want to handle new message.
- :param callback: The callback function which next new message arrives.
- :param args: Args to pass in callback func
- :param kwargs: Args to pass in callback func
+ def add_removed_chat_boost_handler(self, handler_dict):
"""
- if chat_id in self.next_step_handlers.keys():
- self.next_step_handlers[chat_id].append(Handler(callback, *args, **kwargs))
- else:
- self.next_step_handlers[chat_id] = [Handler(callback, *args, **kwargs)]
+ Adds a removed_chat_boost handler.
+ Note that you should use register_removed_chat_boost_handler to add removed_chat_boost_handler to the bot.
- if self.next_step_saver is not None:
- self.next_step_saver.start_save_timer()
+ :meta private:
- def clear_step_handler(self, message):
+ :param handler_dict:
+ :return:
"""
- Clears all callback functions registered by register_next_step_handler().
+ self.removed_chat_boost_handlers.append(handler_dict)
- :param message: The message for which we want to handle new message after that in same chat.
+
+ def register_removed_chat_boost_handler(
+ self, callback: Callable, func: Optional[Callable]=None, pass_bot:Optional[bool]=False, **kwargs):
"""
- chat_id = message.chat.id
- self.clear_step_handler_by_chat_id(chat_id)
+ Registers removed chat boost handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
- def clear_step_handler_by_chat_id(self, chat_id):
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
"""
- Clears all callback functions registered by register_next_step_handler().
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_removed_chat_boost_handler(handler_dict)
- :param chat_id: The chat for which we want to clear next step handlers
+
+ def business_connection_handler(self, func=None, **kwargs):
"""
- self.next_step_handlers[chat_id] = []
+ Handles new incoming business connection state.
- if self.next_step_saver is not None:
- self.next_step_saver.start_save_timer()
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- def clear_reply_handlers(self, message):
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
"""
- Clears all callback functions registered by register_for_reply() and register_for_reply_by_message_id().
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_business_connection_handler(handler_dict)
+ return handler
- :param message: The message for which we want to clear reply handlers
+ return decorator
+
+
+ def add_business_connection_handler(self, handler_dict):
"""
- message_id = message.message_id
- self.clear_reply_handlers_by_message_id(message_id)
+ Adds a business_connection handler.
+ Note that you should use register_business_connection_handler to add business_connection_handler to the bot.
- def clear_reply_handlers_by_message_id(self, message_id):
+ :meta private:
+
+ :param handler_dict:
+ :return:
"""
- Clears all callback functions registered by register_for_reply() and register_for_reply_by_message_id().
+ self.business_connection_handlers.append(handler_dict)
- :param message_id: The message id for which we want to clear reply handlers
+
+ def register_business_connection_handler(
+ self, callback: Callable, func: Optional[Callable]=None, pass_bot:Optional[bool]=False, **kwargs):
"""
- self.reply_handlers[message_id] = []
+ Registers business connection handler.
- if self.reply_saver is not None:
- self.reply_saver.start_save_timer()
+ :param callback: function to be called
+ :type callback: :obj:`function`
- def _notify_next_handlers(self, new_messages):
- i = 0
- while i < len(new_messages):
- message = new_messages[i]
- chat_id = message.chat.id
- was_poped = False
- if chat_id in self.next_step_handlers.keys():
- handlers = self.next_step_handlers.pop(chat_id, None)
- if handlers:
- for handler in handlers:
- self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"])
- new_messages.pop(i) # removing message that detects with next_step_handler
- was_poped = True
- if self.next_step_saver is not None:
- self.next_step_saver.start_save_timer()
- if not was_poped:
- i += 1
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- @staticmethod
- def _build_handler_dict(handler, **filters):
- return {
- 'function': handler,
- 'filters' : filters
- }
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_business_connection_handler(handler_dict)
- def message_handler(self, commands=None, regexp=None, func=None, content_types=['text'], **kwargs):
+
+ def business_message_handler(
+ self,
+ commands: Optional[List[str]]=None,
+ regexp: Optional[str]=None,
+ func: Optional[Callable]=None,
+ content_types: Optional[List[str]]=None,
+ **kwargs):
"""
- Message handler decorator.
- This decorator can be used to decorate functions that must handle certain types of messages.
+ Handles New incoming message of any kind(for business accounts, see bot api 7.2 for more) - text, photo, sticker, etc.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
All message handlers are tested in the order they were added.
Example:
- bot = TeleBot('TOKEN')
+ .. code-block:: python3
+ :caption: Usage of business_message_handler
+
+ bot = TeleBot('TOKEN')
+
+ # Handles all messages which text matches regexp.
+ @bot.business_message_handler(regexp='someregexp')
+ def command_help(message):
+ bot.send_message(message.chat.id, 'Did someone call for help?')
- # Handles all messages which text matches regexp.
- @bot.message_handler(regexp='someregexp')
- def command_help(message):
- bot.send_message(message.chat.id, 'Did someone call for help?')
+ # Handle all sent documents of type 'text/plain'.
+ @bot.business_message_handler(func=lambda message: message.document.mime_type == 'text/plain',
+ content_types=['document'])
+ def command_handle_document(message):
+ bot.send_message(message.chat.id, 'Document received, sir!')
- # Handle all sent documents of type 'text/plain'.
- @bot.message_handler(func=lambda message: message.document.mime_type == 'text/plain', content_types=['document'])
- def command_handle_document(message):
- bot.send_message(message.chat.id, 'Document received, sir!')
+ # Handle all other messages.
+ @bot.business_message_handler(func=lambda message: True, content_types=['audio', 'photo', 'voice', 'video', 'document',
+ 'text', 'location', 'contact', 'sticker'])
+ def default_command(message):
+ bot.send_message(message.chat.id, "This is the default command handler.")
- # Handle all other commands.
- @bot.message_handler(func=lambda message: True, content_types=['audio', 'video', 'document', 'text', 'location', 'contact', 'sticker'])
- def default_command(message):
- bot.send_message(message.chat.id, "This is the default command handler.")
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
:param regexp: Optional regular expression.
- :param func: Optional lambda function. The lambda receives the message to test as the first parameter. It must return True if the command should handle the message.
- :param content_types: This commands' supported content types. Must be a list. Defaults to ['text'].
- """
+ :type regexp: :obj:`str`
- def decorator(handler):
- handler_dict = self._build_handler_dict(handler,
- commands=commands,
- regexp=regexp,
- func=func,
- content_types=content_types,
- **kwargs)
+ :param func: Optional lambda function. The lambda receives the message to test as the first parameter.
+ It must return True if the command should handle the message.
+ :type func: :obj:`lambda`
- self.add_message_handler(handler_dict)
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
- return handler
+ :param kwargs: Optional keyword arguments(custom filters)
- return decorator
+ :return: decorated function
+ """
+ if content_types is None:
+ content_types = ["text"]
- def add_message_handler(self, handler_dict):
- self.message_handlers.append(handler_dict)
+ method_name = "business_message_handler"
- def edited_message_handler(self, commands=None, regexp=None, func=None, content_types=['text'], **kwargs):
- def decorator(handler):
- handler_dict = self._build_handler_dict(handler,
- commands=commands,
- regexp=regexp,
- func=func,
- content_types=content_types,
- **kwargs)
- self.add_edited_message_handler(handler_dict)
- return handler
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
- return decorator
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
- def add_edited_message_handler(self, handler_dict):
- self.edited_message_handlers.append(handler_dict)
+ if isinstance(content_types, str):
+ logger.warning("business_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
- def channel_post_handler(self, commands=None, regexp=None, func=None, content_types=['text'], **kwargs):
def decorator(handler):
handler_dict = self._build_handler_dict(handler,
+ content_types=content_types,
commands=commands,
regexp=regexp,
func=func,
- content_types=content_types,
**kwargs)
- self.add_channel_post_handler(handler_dict)
+ self.add_business_message_handler(handler_dict)
return handler
return decorator
- def add_channel_post_handler(self, handler_dict):
- self.channel_post_handlers.append(handler_dict)
-
- def edited_channel_post_handler(self, commands=None, regexp=None, func=None, content_types=['text'], **kwargs):
- def decorator(handler):
- handler_dict = self._build_handler_dict(handler,
- commands=commands,
- regexp=regexp,
- func=func,
- content_types=content_types,
- **kwargs)
- self.add_edited_channel_post_handler(handler_dict)
- return handler
- return decorator
+ def add_business_message_handler(self, handler_dict):
+ """
+ Adds a business_message handler.
+ Note that you should use register_business_message_handler to add business_message_handler to the bot.
- def add_edited_channel_post_handler(self, handler_dict):
- self.edited_channel_post_handlers.append(handler_dict)
+ :meta private:
- def inline_handler(self, func, **kwargs):
- def decorator(handler):
- handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
- self.add_inline_handler(handler_dict)
- return handler
+ :param handler_dict:
+ :return:
+ """
+ self.business_message_handlers.append(handler_dict)
- return decorator
- def add_inline_handler(self, handler_dict):
- self.inline_handlers.append(handler_dict)
+ def register_business_message_handler(self,
+ callback: Callable,
+ commands: Optional[List[str]]=None,
+ regexp: Optional[str]=None,
+ func: Optional[Callable]=None,
+ content_types: Optional[List[str]]=None,
+ pass_bot: Optional[bool]=False,
+ **kwargs):
+ """
+ Registers business connection handler.
- def chosen_inline_handler(self, func, **kwargs):
- def decorator(handler):
- handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
- self.add_chosen_inline_handler(handler_dict)
- return handler
+ :param callback: function to be called
+ :type callback: :obj:`function`
- return decorator
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
- def add_chosen_inline_handler(self, handler_dict):
- self.chosen_inline_handlers.append(handler_dict)
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
- def callback_query_handler(self, func, **kwargs):
- def decorator(handler):
- handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
- self.add_callback_query_handler(handler_dict)
- return handler
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- return decorator
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
- def add_callback_query_handler(self, handler_dict):
- self.callback_query_handlers.append(handler_dict)
+ :param pass_bot: True, if bot instance should be passed to handler
+ :type pass_bot: :obj:`bool`
- def shipping_query_handler(self, func, **kwargs):
- def decorator(handler):
- handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
- self.add_shipping_query_handler(handler_dict)
- return handler
+ :param kwargs: Optional keyword arguments(custom filters)
- return decorator
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, content_types=content_types, commands=commands, regexp=regexp, func=func,
+ pass_bot=pass_bot, **kwargs)
+ self.add_business_message_handler(handler_dict)
- def add_shipping_query_handler(self, handler_dict):
- self.shipping_query_handlers.append(handler_dict)
- def pre_checkout_query_handler(self, func, **kwargs):
- def decorator(handler):
- handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
- self.add_pre_checkout_query_handler(handler_dict)
- return handler
+ def edited_business_message_handler(self, commands=None, regexp=None, func=None, content_types=None, **kwargs):
+ """
+ Handles new version of a message(business accounts) that is known to the bot and was edited.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
- return decorator
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
- def add_pre_checkout_query_handler(self, handler_dict):
- self.pre_checkout_query_handlers.append(handler_dict)
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
- def _test_message_handler(self, message_handler, message):
- for filter, filter_value in six.iteritems(message_handler['filters']):
- if filter_value is None:
- continue
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- if not self._test_filter(filter, filter_value, message):
- return False
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
- return True
+ :param kwargs: Optional keyword arguments(custom filters)
- @staticmethod
- def _test_filter(filter, filter_value, message):
- test_cases = {
- 'content_types': lambda msg: msg.content_type in filter_value,
- 'regexp': lambda msg: msg.content_type == 'text' and re.search(filter_value, msg.text, re.IGNORECASE),
- 'commands': lambda msg: msg.content_type == 'text' and util.extract_command(msg.text) in filter_value,
- 'func': lambda msg: filter_value(msg)
- }
+ :return: None
+ """
+ if content_types is None:
+ content_types = ["text"]
- return test_cases.get(filter, lambda msg: False)(message)
+ method_name = "edited_business_message_handler"
- def _notify_command_handlers(self, handlers, new_messages):
- for message in new_messages:
- for message_handler in handlers:
- if self._test_message_handler(message_handler, message):
- self._exec_task(message_handler['function'], message)
- break
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
-class AsyncTeleBot(TeleBot):
- def __init__(self, *args, **kwargs):
- TeleBot.__init__(self, *args, **kwargs)
+ if isinstance(content_types, str):
+ logger.warning("edited_business_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
- @util.async_dec()
- def enable_save_next_step_handlers(self, delay=120, filename="./.handler-saves/step.save"):
- return TeleBot.enable_save_next_step_handlers(self, delay, filename)
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_edited_business_message_handler(handler_dict)
+ return handler
- @util.async_dec()
- def enable_save_reply_handlers(self, delay=120, filename="./.handler-saves/reply.save"):
- return TeleBot.enable_save_reply_handlers(self, delay, filename)
+ return decorator
- @util.async_dec()
- def disable_save_next_step_handlers(self):
- return TeleBot.disable_save_next_step_handlers(self)
- @util.async_dec()
- def disable_save_reply_handlers(self):
- return TeleBot.enable_save_reply_handlers(self)
+ def add_edited_business_message_handler(self, handler_dict):
+ """
+ Adds the edit message handler
+ Note that you should use register_edited_business_message_handler to add edited_business_message_handler to the bot.
- @util.async_dec()
- def load_next_step_handlers(self, filename="./.handler-saves/step.save", del_file_after_loading=True):
- return TeleBot.load_next_step_handlers(self, filename, del_file_after_loading)
+ :meta private:
- @util.async_dec()
- def load_reply_handlers(self, filename="./.handler-saves/reply.save", del_file_after_loading=True):
- return TeleBot.load_reply_handlers(self, filename, del_file_after_loading)
+ :param handler_dict:
+ :return:
+ """
+ self.edited_business_message_handlers.append(handler_dict)
- @util.async_dec()
- def get_me(self):
- return TeleBot.get_me(self)
- @util.async_dec()
- def get_file(self, *args):
- return TeleBot.get_file(self, *args)
+ def register_edited_business_message_handler(self, callback: Callable, content_types: Optional[List[str]]=None,
+ commands: Optional[List[str]]=None, regexp: Optional[str]=None, func: Optional[Callable]=None,
+ pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers edited message handler for business accounts.
- @util.async_dec()
- def download_file(self, *args):
- return TeleBot.download_file(self, *args)
+ :param callback: function to be called
+ :type callback: :obj:`function`
- @util.async_dec()
- def get_user_profile_photos(self, *args, **kwargs):
- return TeleBot.get_user_profile_photos(self, *args, **kwargs)
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
- @util.async_dec()
- def get_chat(self, *args):
- return TeleBot.get_chat(self, *args)
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
- @util.async_dec()
- def leave_chat(self, *args):
- return TeleBot.leave_chat(self, *args)
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
- @util.async_dec()
- def get_chat_administrators(self, *args):
- return TeleBot.get_chat_administrators(self, *args)
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- @util.async_dec()
- def get_chat_members_count(self, *args):
- return TeleBot.get_chat_members_count(self, *args)
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
- @util.async_dec()
- def set_chat_sticker_set(self, *args):
- return TeleBot.set_chat_sticker_set(self, *args)
+ :param kwargs: Optional keyword arguments(custom filters)
- @util.async_dec()
- def delete_chat_sticker_set(self, *args):
- return TeleBot.delete_chat_sticker_set(self, *args)
+ :return: None
+ """
+ method_name = "edited_business_message_handler"
- @util.async_dec()
- def get_chat_member(self, *args):
- return TeleBot.get_chat_member(self, *args)
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
- @util.async_dec()
- def send_message(self, *args, **kwargs):
- return TeleBot.send_message(self, *args, **kwargs)
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
- @util.async_dec()
- def forward_message(self, *args, **kwargs):
- return TeleBot.forward_message(self, *args, **kwargs)
+ if isinstance(content_types, str):
+ logger.warning("edited_business_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
- @util.async_dec()
- def delete_message(self, *args):
- return TeleBot.delete_message(self, *args)
+ handler_dict = self._build_handler_dict(callback,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ pass_bot=pass_bot,
+ **kwargs)
+ self.add_edited_business_message_handler(handler_dict)
- @util.async_dec()
- def send_photo(self, *args, **kwargs):
- return TeleBot.send_photo(self, *args, **kwargs)
- @util.async_dec()
- def send_audio(self, *args, **kwargs):
- return TeleBot.send_audio(self, *args, **kwargs)
+ def deleted_business_messages_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming deleted messages state.
- @util.async_dec()
- def send_voice(self, *args, **kwargs):
- return TeleBot.send_voice(self, *args, **kwargs)
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- @util.async_dec()
- def send_document(self, *args, **kwargs):
- return TeleBot.send_document(self, *args, **kwargs)
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
- @util.async_dec()
- def send_sticker(self, *args, **kwargs):
- return TeleBot.send_sticker(self, *args, **kwargs)
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
- @util.async_dec()
- def send_video(self, *args, **kwargs):
- return TeleBot.send_video(self, *args, **kwargs)
+ self.add_deleted_business_messages_handler(handler_dict)
+ return handler
- @util.async_dec()
- def send_video_note(self, *args, **kwargs):
- return TeleBot.send_video_note(self, *args, **kwargs)
+ return decorator
- @util.async_dec()
- def send_media_group(self, *args, **kwargs):
- return TeleBot.send_media_group(self, *args, **kwargs)
- @util.async_dec()
- def send_location(self, *args, **kwargs):
- return TeleBot.send_location(self, *args, **kwargs)
+ def add_deleted_business_messages_handler(self, handler_dict):
+ """
+ Adds a deleted_business_messages handler.
+ Note that you should use register_deleted_business_messages_handler to add deleted_business_messages_handler to the bot.
- @util.async_dec()
- def edit_message_live_location(self, *args, **kwargs):
- return TeleBot.edit_message_live_location(self, *args, **kwargs)
+ :meta private:
+ """
+ self.deleted_business_messages_handlers.append(handler_dict)
- @util.async_dec()
- def stop_message_live_location(self, *args, **kwargs):
- return TeleBot.stop_message_live_location(self, *args, **kwargs)
- @util.async_dec()
- def send_venue(self, *args, **kwargs):
- return TeleBot.send_venue(self, *args, **kwargs)
+ def register_deleted_business_messages_handler(self, callback: Callable, func: Optional[Callable]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers deleted business messages handler.
- @util.async_dec()
- def send_contact(self, *args, **kwargs):
- return TeleBot.send_contact(self, *args, **kwargs)
+ :param callback: function to be called
+ :type callback: :obj:`function`
- @util.async_dec()
- def send_chat_action(self, *args, **kwargs):
- return TeleBot.send_chat_action(self, *args, **kwargs)
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
- @util.async_dec()
- def kick_chat_member(self, *args, **kwargs):
- return TeleBot.kick_chat_member(self, *args, **kwargs)
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
- @util.async_dec()
- def unban_chat_member(self, *args):
- return TeleBot.unban_chat_member(self, *args)
+ :param kwargs: Optional keyword arguments(custom filters)
- @util.async_dec()
- def restrict_chat_member(self, *args, **kwargs):
- return TeleBot.restrict_chat_member(self, *args, **kwargs)
+ :return: None
+ """
- @util.async_dec()
- def promote_chat_member(self, *args, **kwargs):
- return TeleBot.promote_chat_member(self, *args, **kwargs)
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_deleted_business_messages_handler(handler_dict)
- @util.async_dec()
- def export_chat_invite_link(self, *args):
- return TeleBot.export_chat_invite_link(self, *args)
- @util.async_dec()
- def set_chat_photo(self, *args):
- return TeleBot.set_chat_photo(self, *args)
+ def add_custom_filter(self, custom_filter: Union[SimpleCustomFilter, AdvancedCustomFilter]):
+ """
+ Create custom filter.
- @util.async_dec()
- def delete_chat_photo(self, *args):
- return TeleBot.delete_chat_photo(self, *args)
+ .. code-block:: python3
+ :caption: Example on checking the text of a message
- @util.async_dec()
- def set_chat_title(self, *args):
- return TeleBot.set_chat_title(self, *args)
+ class TextMatchFilter(AdvancedCustomFilter):
+ key = 'text'
- @util.async_dec()
- def set_chat_description(self, *args):
- return TeleBot.set_chat_description(self, *args)
+ def check(self, message, text):
+ return text == message.text
- @util.async_dec()
- def pin_chat_message(self, *args, **kwargs):
- return TeleBot.pin_chat_message(self, *args, **kwargs)
+ :param custom_filter: Class with check(message) method.
+ :param custom_filter: Custom filter class with key.
+ """
+ self.custom_filters[custom_filter.key] = custom_filter
- @util.async_dec()
- def unpin_chat_message(self, *args):
- return TeleBot.unpin_chat_message(self, *args)
- @util.async_dec()
- def edit_message_text(self, *args, **kwargs):
- return TeleBot.edit_message_text(self, *args, **kwargs)
+ def _test_message_handler(self, message_handler, message):
+ """
+ Test message handler
- @util.async_dec()
- def edit_message_media(self, *args, **kwargs):
- return TeleBot.edit_message_media(self, *args, **kwargs)
+ :param message_handler:
+ :param message:
+ :return:
+ """
+ for message_filter, filter_value in message_handler['filters'].items():
+ if filter_value is None:
+ continue
- @util.async_dec()
- def edit_message_reply_markup(self, *args, **kwargs):
- return TeleBot.edit_message_reply_markup(self, *args, **kwargs)
+ if not self._test_filter(message_filter, filter_value, message):
+ return False
- @util.async_dec()
- def send_game(self, *args, **kwargs):
- return TeleBot.send_game(self, *args, **kwargs)
+ return True
- @util.async_dec()
- def set_game_score(self, *args, **kwargs):
- return TeleBot.set_game_score(self, *args, **kwargs)
- @util.async_dec()
- def get_game_high_scores(self, *args, **kwargs):
- return TeleBot.get_game_high_scores(self, *args, **kwargs)
+ def _test_filter(self, message_filter, filter_value, message):
+ """
+ Test filters
- @util.async_dec()
- def send_invoice(self, *args, **kwargs):
- return TeleBot.send_invoice(self, *args, **kwargs)
+ :param message_filter: Filter type passed in handler
+ :param filter_value: Filter value passed in handler
+ :param message: Message to test
+ :return: True if filter conforms
+ """
+ if message_filter == 'content_types':
+ return message.content_type in filter_value
+ elif message_filter == 'regexp':
+ return message.content_type == 'text' and re.search(filter_value, message.text, re.IGNORECASE)
+ elif message_filter == 'commands':
+ return message.content_type == 'text' and util.extract_command(message.text) in filter_value
+ elif message_filter == 'chat_types':
+ return message.chat.type in filter_value
+ elif message_filter == 'func':
+ return filter_value(message)
+ elif self.custom_filters and message_filter in self.custom_filters:
+ return self._check_filter(message_filter,filter_value,message)
+ else:
+ return False
- @util.async_dec()
- def answer_shipping_query(self, *args, **kwargs):
- return TeleBot.answer_shipping_query(self, *args, **kwargs)
- @util.async_dec()
- def answer_pre_checkout_query(self, *args, **kwargs):
- return TeleBot.answer_pre_checkout_query(self, *args, **kwargs)
+ def _check_filter(self, message_filter, filter_value, message):
+ filter_check = self.custom_filters.get(message_filter)
+ if not filter_check:
+ return False
+ elif isinstance(filter_check, SimpleCustomFilter):
+ return filter_value == filter_check.check(message)
+ elif isinstance(filter_check, AdvancedCustomFilter):
+ return filter_check.check(message, filter_value)
+ else:
+ logger.error("Custom filter: wrong type. Should be SimpleCustomFilter or AdvancedCustomFilter.")
+ return False
- @util.async_dec()
- def edit_message_caption(self, *args, **kwargs):
- return TeleBot.edit_message_caption(self, *args, **kwargs)
- @util.async_dec()
- def answer_inline_query(self, *args, **kwargs):
- return TeleBot.answer_inline_query(self, *args, **kwargs)
+ # middleware check-up method
+ def _get_middlewares(self, update_type):
+ """
+ Check middleware
- @util.async_dec()
- def answer_callback_query(self, *args, **kwargs):
- return TeleBot.answer_callback_query(self, *args, **kwargs)
+ :param update_type:
+ :return:
+ """
+ middlewares = None
+ if self.middlewares:
+ middlewares = [i for i in self.middlewares if update_type in i.update_types]
+ return middlewares
- @util.async_dec()
- def send_sticker(self, *args, **kwargs):
- return TeleBot.send_sticker(self, *args, **kwargs)
- @util.async_dec()
- def get_sticker_set(self, *args, **kwargs):
- return TeleBot.get_sticker_set(self, *args, **kwargs)
+ def _run_middlewares_and_handler(self, message, handlers, middlewares, update_type):
+ """
+ This method is made to run handlers and middlewares in queue.
- @util.async_dec()
- def upload_sticker_file(self, *args, **kwargs):
- return TeleBot.upload_sticker_file(self, *args, **kwargs)
+ :param message: received message (update part) to process with handlers and/or middlewares
+ :param handlers: all created handlers (not filtered)
+ :param middlewares: middlewares that should be executed (already filtered)
+ :param update_type: handler/update type (Update field name)
+ :return:
+ """
+ if not self.use_class_middlewares:
+ if handlers:
+ for handler in handlers:
+ if self._test_message_handler(handler, message):
+ if handler.get('pass_bot', False):
+ result = handler['function'](message, bot=self)
+ else:
+ result = handler['function'](message)
+ if not isinstance(result, ContinueHandling):
+ break
+ return
+
+ data = {}
+ handler_error = None
+ skip_handlers = False
+
+ if middlewares:
+ for middleware in middlewares:
+ if middleware.update_sensitive:
+ if hasattr(middleware, f'pre_process_{update_type}'):
+ result = getattr(middleware, f'pre_process_{update_type}')(message, data)
+ else:
+ logger.error('Middleware {} does not have pre_process_{} method. pre_process function execution was skipped.'.format(middleware.__class__.__name__, update_type))
+ result = None
+ else:
+ result = middleware.pre_process(message, data)
+ # We will break this loop if CancelUpdate is returned
+ # Also, we will not run other middlewares
+ if isinstance(result, CancelUpdate):
+ return
+ elif isinstance(result, SkipHandler):
+ skip_handlers = True
+
+ if handlers and not skip_handlers:
+ try:
+ for handler in handlers:
+ params = []
+ process_handler = self._test_message_handler(handler, message)
+ if not process_handler: continue
+ for i in inspect.signature(handler['function']).parameters:
+ params.append(i)
+ if len(params) == 1:
+ result = handler['function'](message)
+ elif "data" in params:
+ if len(params) == 2:
+ result = handler['function'](message, data)
+ elif len(params) == 3:
+ result = handler['function'](message, data=data, bot=self)
+ else:
+ logger.error("It is not allowed to pass data and values inside data to the handler. Check your handler: {}".format(handler['function']))
+ return
+ else:
+ data_copy = data.copy()
+ for key in list(data_copy):
+ # remove data from data_copy if handler does not accept it
+ if key not in params:
+ del data_copy[key]
+ if handler.get('pass_bot'):
+ data_copy["bot"] = self
+ if len(data_copy) > len(params) - 1: # remove the message parameter
+ logger.error("You are passing more parameters than the handler needs. Check your handler: {}".format(handler['function']))
+ return
+ result = handler["function"](message, **data_copy)
+ if not isinstance(result, ContinueHandling):
+ break
+ except Exception as e:
+ handler_error = e
+ handled = self._handle_exception(e)
+ if not handled:
+ logger.error(str(e))
+ logger.debug("Exception traceback:\n%s", traceback.format_exc())
+
+ if middlewares:
+ for middleware in middlewares:
+ if middleware.update_sensitive:
+ if hasattr(middleware, f'post_process_{update_type}'):
+ getattr(middleware, f'post_process_{update_type}')(message, data, handler_error)
+ else:
+ logger.error("Middleware: {} does not have post_process_{} method. Post process function was not executed.".format(middleware.__class__.__name__, update_type))
+ else:
+ middleware.post_process(message, data, handler_error)
- @util.async_dec()
- def create_new_sticker_set(self, *args, **kwargs):
- return TeleBot.create_new_sticker_set(self, *args, **kwargs)
- @util.async_dec()
- def add_sticker_to_set(self, *args, **kwargs):
- return TeleBot.add_sticker_to_set(self, *args, **kwargs)
+ def _notify_command_handlers(self, handlers, new_messages, update_type):
+ """
+ Notifies command handlers.
- @util.async_dec()
- def set_sticker_position_in_set(self, *args, **kwargs):
- return TeleBot.set_sticker_position_in_set(self, *args, **kwargs)
+ :param handlers: all created handlers
+ :param new_messages: received messages to proceed
+ :param update_type: handler/update type (Update fields)
+ :return:
+ """
+ if (not handlers) and (not self.use_class_middlewares):
+ return
- @util.async_dec()
- def delete_sticker_from_set(self, *args, **kwargs):
- return TeleBot.delete_sticker_from_set(self, *args, **kwargs)
+ if self.use_class_middlewares:
+ middlewares = self._get_middlewares(update_type)
+ else:
+ middlewares = None
+ for message in new_messages:
+ self._exec_task(
+ self._run_middlewares_and_handler,
+ message,
+ handlers=handlers,
+ middlewares=middlewares,
+ update_type=update_type)
diff --git a/telebot/apihelper.py b/telebot/apihelper.py
index 839754f99..68f2418da 100644
--- a/telebot/apihelper.py
+++ b/telebot/apihelper.py
@@ -1,15 +1,20 @@
# -*- coding: utf-8 -*-
+import time
+from datetime import datetime
try:
+ # noinspection PyPackageRequirements
import ujson as json
except ImportError:
import json
import requests
+from requests.exceptions import HTTPError, ConnectionError, Timeout
+from requests.adapters import HTTPAdapter
try:
+ # noinspection PyUnresolvedReferences
from requests.packages.urllib3 import fields
-
format_header_param = fields.format_header_param
except ImportError:
format_header_param = None
@@ -18,20 +23,51 @@
from telebot import util
logger = telebot.logger
+
proxy = None
+session = None
+
+API_URL = None
+FILE_URL = None
+
+CONNECT_TIMEOUT = 15
+READ_TIMEOUT = 30
-API_URL = "https://api.telegram.org/bot{0}/{1}"
-FILE_URL = "https://api.telegram.org/file/bot{0}/{1}"
+LONG_POLLING_TIMEOUT = 10 # Should be positive, short polling should be used for testing purposes only (https://core.telegram.org/bots/api#getupdates)
-CONNECT_TIMEOUT = 3.5
-READ_TIMEOUT = 9999
+SESSION_TIME_TO_LIVE = 600 # In seconds. None - live forever, 0 - one-time
+
+RETRY_ON_ERROR = False
+RETRY_TIMEOUT = 2
+MAX_RETRIES = 15
+RETRY_ENGINE = 1
+
+CUSTOM_SERIALIZER = None
+CUSTOM_REQUEST_SENDER = None
+
+ENABLE_MIDDLEWARE = False
def _get_req_session(reset=False):
- return util.per_thread('req_session', lambda: requests.session(), reset)
+ if SESSION_TIME_TO_LIVE:
+ # If session TTL is set - check time passed
+ creation_date = util.per_thread('req_session_time', lambda: datetime.now(), reset)
+ # noinspection PyTypeChecker
+ if (datetime.now() - creation_date).total_seconds() > SESSION_TIME_TO_LIVE:
+ # Force session reset
+ reset = True
+ # Save reset time
+ util.per_thread('req_session_time', lambda: datetime.now(), True)
+
+ if SESSION_TIME_TO_LIVE == 0:
+ # Session is one-time use
+ return requests.sessions.Session()
+ else:
+ # Session lives some time or forever once created. Default
+ return util.per_thread('req_session', lambda: session if session else requests.sessions.Session(), reset)
-def _make_request(token, method_name, method='get', params=None, files=None, base_url=API_URL):
+def _make_request(token, method_name, method='get', params=None, files=None):
"""
Makes a request to the Telegram API.
:param token: The bot's API token. (Created with @BotFather)
@@ -41,19 +77,99 @@ def _make_request(token, method_name, method='get', params=None, files=None, bas
:param files: Optional files.
:return: The result parsed to a JSON dictionary.
"""
- request_url = base_url.format(token, method_name)
- logger.debug("Request: method={0} url={1} params={2} files={3}".format(method, request_url, params, files))
+ if not token:
+ raise Exception('Bot token is not defined')
+ if API_URL:
+ # noinspection PyUnresolvedReferences
+ request_url = API_URL.format(token, method_name)
+ else:
+ request_url = "https://api.telegram.org/bot{0}/{1}".format(token, method_name)
+
+ logger.debug("Request: method={0} url={1} params={2} files={3}".format(method, request_url, params, files).replace(token, token.split(':')[0] + ":{TOKEN}"))
read_timeout = READ_TIMEOUT
connect_timeout = CONNECT_TIMEOUT
+
+ if files:
+ files_copy = dict(files)
+ # process types.InputFile
+ for key, value in files_copy.items():
+ if isinstance(value, types.InputFile):
+ files[key] = (value.file_name, value.file)
+ elif isinstance(value, tuple) and (len(value) == 2) and isinstance(value[1], types.InputFile):
+ files[key] = (value[0], value[1].file)
+
+
if files and format_header_param:
fields.format_header_param = _no_encode(format_header_param)
if params:
- if 'timeout' in params: read_timeout = params['timeout'] + 10
- if 'connect-timeout' in params: connect_timeout = params['connect-timeout'] + 10
- result = _get_req_session().request(method, request_url, params=params, files=files,
- timeout=(connect_timeout, read_timeout), proxies=proxy)
+ if 'timeout' in params:
+ read_timeout = params.pop('timeout')
+ connect_timeout = read_timeout
+ if 'long_polling_timeout' in params:
+ # For getUpdates. It's the only function with timeout parameter on the BOT API side
+ long_polling_timeout = params.pop('long_polling_timeout')
+ params['timeout'] = long_polling_timeout
+ # Long polling hangs for a given time. Read timeout should be greater that long_polling_timeout
+ read_timeout = max(long_polling_timeout + 5, read_timeout)
+
+ params = params or None # Set params to None if empty
+ result = None
+
+ if CUSTOM_REQUEST_SENDER:
+ # noinspection PyCallingNonCallable
+ result = CUSTOM_REQUEST_SENDER(
+ method, request_url, params=params, files=files,
+ timeout=(connect_timeout, read_timeout), proxies=proxy)
+ elif RETRY_ON_ERROR and RETRY_ENGINE == 1:
+ got_result = False
+ current_try = 0
+ while not got_result and current_try None:
+
+ # update-related
+ self.token = token
+ self.offset = offset
+
+ # logs-related
+ if colorful_logs:
+ try:
+ import coloredlogs
+ coloredlogs.install(logger=logger, level=logger.level)
+ except ImportError:
+ raise ImportError(
+ 'Install coloredlogs module to use colorful_logs option.'
+ )
+
+ # properties
+ self.parse_mode = parse_mode
+ self.disable_web_page_preview = disable_web_page_preview
+ self.disable_notification = disable_notification
+ self.protect_content = protect_content
+ self.allow_sending_without_reply = allow_sending_without_reply
+
+ # states
+ self.current_states = state_storage
+
+ # handlers
+ self.update_listener = []
+ self.exception_handler = exception_handler
+ self.message_handlers = []
+ self.edited_message_handlers = []
+ self.channel_post_handlers = []
+ self.edited_channel_post_handlers = []
+ self.message_reaction_handlers = []
+ self.message_reaction_count_handlers = []
+ self.inline_handlers = []
+ self.chosen_inline_handlers = []
+ self.callback_query_handlers = []
+ self.shipping_query_handlers = []
+ self.pre_checkout_query_handlers = []
+ self.poll_handlers = []
+ self.poll_answer_handlers = []
+ self.my_chat_member_handlers = []
+ self.chat_member_handlers = []
+ self.chat_join_request_handlers = []
+ self.removed_chat_boost_handlers = []
+ self.chat_boost_handlers = []
+ self.business_connection_handlers = []
+ self.business_message_handlers = []
+ self.edited_business_message_handlers = []
+ self.deleted_business_messages_handlers = []
+ self.purchased_paid_media_handlers = []
+
+ self.custom_filters = {}
+ self.state_handlers = []
+ self.middlewares = []
+
+ self._user = None # set during polling
+
+ if validate_token:
+ util.validate_token(self.token)
+
+ self.bot_id: Union[int, None] = util.extract_bot_id(self.token) # subject to change, unspecified
+
+
+ @property
+ def user(self):
+ return self._user
+
+ async def close_session(self):
+ """
+ Closes existing session of aiohttp.
+ Use this function if you stop polling/webhooks.
+ """
+ await asyncio_helper.session_manager.session.close()
+
+ async def get_updates(self, offset: Optional[int]=None, limit: Optional[int]=None,
+ timeout: Optional[int]=20, allowed_updates: Optional[List]=None, request_timeout: Optional[int]=None) -> List[types.Update]:
+ """
+ Use this method to receive incoming updates using long polling (wiki). An Array of Update objects is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getupdates
+
+
+ :param offset: Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates.
+ By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset
+ higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue.
+ All previous updates will forgotten.
+ :type offset: :obj:`int`, optional
+
+ :param limit: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.
+ :type limit: :obj:`int`, optional
+
+ :param timeout: Request connection timeout
+ :type timeout: :obj:`int`, optional
+
+ :param allowed_updates: Array of string. List the types of updates you want your bot to receive.
+ :type allowed_updates: :obj:`list`, optional
+
+ :param request_timeout: Timeout in seconds for request.
+ :type request_timeout: :obj:`int`, optional
+
+ :return: An Array of Update objects is returned.
+ :rtype: :obj:`list` of :class:`telebot.types.Update`
+ """
+ json_updates = await asyncio_helper.get_updates(self.token, offset, limit, timeout, allowed_updates, request_timeout)
+ return [types.Update.de_json(ju) for ju in json_updates]
+
+ def _setup_change_detector(self, path_to_watch: str) -> None:
+ try:
+ from watchdog.observers import Observer
+ from telebot.ext.reloader import EventHandler
+ except ImportError:
+ raise ImportError(
+ 'Please install watchdog and psutil before using restart_on_change option.'
+ )
+
+ self.event_handler = EventHandler()
+ path = path_to_watch if path_to_watch else None
+ if path is None:
+ # Make it possible to specify --path argument to the script
+ path = sys.argv[sys.argv.index('--path') + 1] if '--path' in sys.argv else '.'
+
+ self.event_observer = Observer()
+ self.event_observer.schedule(self.event_handler, path, recursive=True)
+ self.event_observer.start()
+
+ async def polling(self, non_stop: bool=True, skip_pending=False, interval: int=0, timeout: int=20,
+ request_timeout: Optional[int]=None, allowed_updates: Optional[List[str]]=None,
+ none_stop: Optional[bool]=None, restart_on_change: Optional[bool]=False, path_to_watch: Optional[str]=None):
+ """
+ Runs bot in long-polling mode in a main loop.
+ This allows the bot to retrieve Updates automagically and notify listeners and message handlers accordingly.
+
+ Warning: Do not call this function more than once!
+
+ Always gets updates.
+
+ .. note::
+
+ Install watchdog and psutil before using restart_on_change option.
+
+ :param non_stop: Do not stop polling when an ApiException occurs.
+ :type non_stop: :obj:`bool`
+
+ :param skip_pending: skip old updates
+ :type skip_pending: :obj:`bool`
+
+ :param interval: Delay between two update retrivals
+ :type interval: :obj:`int`
+
+ :param timeout: Request connection timeout
+ :type timeout: :obj:`int`
+
+ :param request_timeout: Timeout in seconds for get_updates(Defaults to None)
+ :type request_timeout: :obj:`int`
+
+ :param allowed_updates: A list of the update types you want your bot to receive.
+ For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types.
+ See util.update_types for a complete list of available update types.
+ Specify an empty list to receive all update types except chat_member (default).
+ If not specified, the previous setting will be used.
+
+ Please note that this parameter doesn't affect updates created before the call to the get_updates,
+ so unwanted updates may be received for a short period of time.
+ :type allowed_updates: :obj:`list` of :obj:`str`
+
+ :param none_stop: Deprecated, use non_stop. Old typo, kept for backward compatibility.
+ :type none_stop: :obj:`bool`
+
+ :param restart_on_change: Restart a file on file(s) change. Defaults to False.
+ :type restart_on_change: :obj:`bool`
+
+ :param path_to_watch: Path to watch for changes. Defaults to current directory
+ :type path_to_watch: :obj:`str`
+
+ :return:
+ """
+ if none_stop is not None:
+ logger.warning('The parameter "none_stop" is deprecated. Use "non_stop" instead.')
+ non_stop = none_stop
+
+ if skip_pending:
+ await self.skip_updates()
+
+ if restart_on_change:
+ self._setup_change_detector(path_to_watch)
+
+ await self._process_polling(non_stop, interval, timeout, request_timeout, allowed_updates)
+
+ async def infinity_polling(self, timeout: Optional[int]=20, skip_pending: Optional[bool]=False, request_timeout: Optional[int]=None,
+ logger_level: Optional[int]=logging.ERROR, allowed_updates: Optional[List[str]]=None,
+ restart_on_change: Optional[bool]=False, path_to_watch: Optional[str]=None, *args, **kwargs):
+ """
+ Wrap polling with infinite loop and exception handling to avoid bot stops polling.
+
+ .. note::
+ Install watchdog and psutil before using restart_on_change option.
+
+ :param timeout: Timeout in seconds for get_updates(Defaults to None)
+ :type timeout: :obj:`int`
+
+ :param skip_pending: skip old updates
+ :type skip_pending: :obj:`bool`
+
+ :param request_timeout: Aiohttp's request timeout. Defaults to 5 minutes(aiohttp.ClientTimeout).
+ :type request_timeout: :obj:`int`
+
+ :param logger_level: Custom logging level for infinity_polling logging.
+ Use logger levels from logging as a value. None/NOTSET = no error logging
+ :type logger_level: :obj:`int`
+
+ :param allowed_updates: A list of the update types you want your bot to receive.
+ For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types.
+ See util.update_types for a complete list of available update types.
+ Specify an empty list to receive all update types except chat_member (default).
+ If not specified, the previous setting will be used.
+
+ Please note that this parameter doesn't affect updates created before the call to the get_updates,
+ so unwanted updates may be received for a short period of time.
+ :type allowed_updates: :obj:`list` of :obj:`str`
+
+ :param restart_on_change: Restart a file on file(s) change. Defaults to False
+ :type restart_on_change: :obj:`bool`
+
+ :param path_to_watch: Path to watch for changes. Defaults to current directory
+ :type path_to_watch: :obj:`str`
+
+ :return: None
+ """
+ if skip_pending:
+ await self.skip_updates()
+ self._polling = True
+
+ if restart_on_change:
+ self._setup_change_detector(path_to_watch)
+
+ while self._polling:
+ try:
+ await self._process_polling(non_stop=True, timeout=timeout, request_timeout=request_timeout,
+ allowed_updates=allowed_updates, *args, **kwargs)
+ except Exception as e:
+ if logger_level and logger_level >= logging.ERROR:
+ logger.error("Infinity polling exception: %s", self.__hide_token(str(e)))
+ if logger_level and logger_level >= logging.DEBUG:
+ logger.error("Exception traceback:\n%s", self.__hide_token(traceback.format_exc()))
+ await asyncio.sleep(3)
+ continue
+ if logger_level and logger_level >= logging.INFO:
+ logger.error("Infinity polling: polling exited")
+ if logger_level and logger_level >= logging.INFO:
+ logger.error("Break infinity polling")
+
+ async def _handle_exception(self, exception: Exception) -> bool:
+ if self.exception_handler is None:
+ return False
+
+ if iscoroutinefunction(self.exception_handler.handle):
+ handled = await self.exception_handler.handle(exception)
+ else:
+ handled = self.exception_handler.handle(exception) # noqa
+ return handled
+
+ def __hide_token(self, message: str) -> str:
+ if self.token in message:
+ code = self.token.split(':')[1]
+ return message.replace(code, "*" * len(code))
+ else:
+ return message
+
+ async def _handle_error_interval(self, error_interval: float):
+ logger.debug('Waiting for %s seconds before retrying', error_interval)
+ await asyncio.sleep(error_interval)
+ if error_interval * 2 < 60: # same logic as sync
+ error_interval *= 2
+ else:
+ error_interval = 60
+ return error_interval
+
+ async def _process_polling(self, non_stop: bool=False, interval: int=0, timeout: int=20,
+ request_timeout: int=None, allowed_updates: Optional[List[str]]=None):
+ """
+ Function to process polling.
+
+ :param non_stop: Do not stop polling when an ApiException occurs.
+ :param interval: Delay between two update retrivals
+ :param timeout: Request connection timeout
+ :param request_timeout: Timeout in seconds for long polling (see API docs)
+ :param allowed_updates: A list of the update types you want your bot to receive.
+ For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types.
+ See util.update_types for a complete list of available update types.
+ Specify an empty list to receive all update types except chat_member (default).
+ If not specified, the previous setting will be used.
+
+ Please note that this parameter doesn't affect updates created before the call to the get_updates,
+ so unwanted updates may be received for a short period of time.
+
+ :return:
+
+ """
+
+ if not non_stop:
+ # show warning
+ logger.warning("Setting non_stop to False will stop polling on API and system exceptions.")
+
+ self._user = await self.get_me()
+
+ logger.info('Starting your bot with username: [@%s]', self.user.username)
+
+ self._polling = True
+
+ error_interval = 0.25
+
+ try:
+ while self._polling:
+ try:
+ updates = await self.get_updates(offset=self.offset, allowed_updates=allowed_updates, timeout=timeout, request_timeout=request_timeout)
+ if updates:
+ self.offset = updates[-1].update_id + 1
+ # noinspection PyAsyncCall
+ asyncio.create_task(self.process_new_updates(updates)) # Seperate task for processing updates
+ if interval: await asyncio.sleep(interval)
+ error_interval = 0.25 # drop error_interval if no errors
+
+ except KeyboardInterrupt:
+ return
+ except asyncio.CancelledError:
+ return
+ except asyncio_helper.RequestTimeout as e:
+ handled = await self._handle_exception(e)
+ if not handled:
+ logger.error('Unhandled exception (full traceback for debug level): %s', self.__hide_token(str(e)))
+ logger.debug(self.__hide_token(traceback.format_exc()))
+
+ if non_stop:
+ error_interval = await self._handle_error_interval(error_interval)
+
+ if non_stop or handled:
+ continue
+ else:
+ return
+ except asyncio_helper.ApiException as e:
+ handled = await self._handle_exception(e)
+ if not handled:
+ logger.error('Unhandled exception (full traceback for debug level): %s', self.__hide_token(str(e)))
+ logger.debug(self.__hide_token(traceback.format_exc()))
+
+ if non_stop:
+ error_interval = await self._handle_error_interval(error_interval)
+
+ if non_stop or handled:
+ continue
+ else:
+ break
+ except Exception as e:
+ handled = await self._handle_exception(e)
+ if not handled:
+ logger.error('Unhandled exception (full traceback for debug level): %s', str(e))
+ logger.debug(traceback.format_exc())
+
+ if non_stop:
+ error_interval = await self._handle_error_interval(error_interval)
+
+ if non_stop or handled:
+ continue
+ else:
+ break
+ finally:
+ self._polling = False
+ await self.close_session()
+ logger.warning('Polling is stopped.')
+
+ @staticmethod
+ def _loop_create_task(coro):
+ return asyncio.create_task(coro)
+
+ async def _process_updates(self, handlers, messages, update_type):
+ """
+ Process updates.
+
+ :param handlers:
+ :param messages:
+ :return:
+ """
+ tasks = []
+ middlewares = await self._get_middlewares(update_type)
+ for message in messages:
+ tasks.append(self._run_middlewares_and_handlers(message, handlers, middlewares, update_type))
+ await asyncio.gather(*tasks)
+
+ async def _run_middlewares_and_handlers(self, message, handlers, middlewares, update_type):
+ """
+ This method is made to run handlers and middlewares in queue.
+
+ :param message: received message (update part) to process with handlers and/or middlewares
+ :param handlers: all created handlers (not filtered)
+ :param middlewares: middlewares that should be executed (already filtered)
+ :param update_type: handler/update type (Update field name)
+ :return:
+ """
+
+ handler_error = None
+ data = {}
+ skip_handlers = False
+
+ if middlewares:
+ for middleware in middlewares:
+ if middleware.update_sensitive:
+ if hasattr(middleware, f'pre_process_{update_type}'):
+ middleware_result = await getattr(middleware, f'pre_process_{update_type}')(message, data)
+ else:
+ logger.error('Middleware {} does not have pre_process_{} method. pre_process function execution was skipped.'.format(middleware.__class__.__name__, update_type))
+ middleware_result = None
+ else:
+ middleware_result = await middleware.pre_process(message, data)
+ if isinstance(middleware_result, CancelUpdate):
+ return
+ elif isinstance(middleware_result, SkipHandler):
+ skip_handlers = True
+
+ if handlers and not(skip_handlers):
+ try:
+ for handler in handlers:
+ params = []
+ process_update = await self._test_message_handler(handler, message)
+ if not process_update: continue
+ for i in signature(handler['function']).parameters:
+ params.append(i)
+ if len(params) == 1:
+ result = await handler['function'](message)
+ elif "data" in params:
+ if len(params) == 2:
+ result = await handler['function'](message, data)
+ elif len(params) == 3:
+ result = await handler['function'](message, data=data, bot=self)
+ else:
+ logger.error("It is not allowed to pass data and values inside data to the handler. Check your handler: {}".format(handler['function']))
+ return
+ else:
+ data_copy = data.copy()
+ for key in list(data_copy):
+ # remove data from data_copy if handler does not accept it
+ if key not in params:
+ del data_copy[key]
+ if handler.get('pass_bot'):
+ data_copy["bot"] = self
+ if len(data_copy) > len(params) - 1: # remove the message parameter
+ logger.error("You are passing more data than the handler needs. Check your handler: {}".format(handler['function']))
+ return
+ result = await handler["function"](message, **data_copy)
+ if not isinstance(result, ContinueHandling):
+ break
+ except Exception as e:
+ handler_error = e
+ handled = await self._handle_exception(e)
+ if not handled:
+ logger.error(str(e))
+ logger.debug("Exception traceback:\n%s", traceback.format_exc())
+
+ if middlewares:
+ for middleware in middlewares:
+ if middleware.update_sensitive:
+ if hasattr(middleware, f'post_process_{update_type}'):
+ await getattr(middleware, f'post_process_{update_type}')(message, data, handler_error)
+ else:
+ logger.error('Middleware {} does not have post_process_{} method. post_process function execution was skipped.'.format(middleware.__class__.__name__, update_type))
+ else: await middleware.post_process(message, data, handler_error)
+
+ async def process_new_updates(self, updates: List[types.Update]):
+ """
+ Process new updates.
+ Just pass list of updates - each update should be
+ instance of Update object.
+
+ :param updates: list of updates
+ :type updates: :obj:`list` of :obj:`telebot.types.Update`
+
+ :return: None
+ """
+ upd_count = len(updates)
+ logger.info('Received {0} new updates'.format(upd_count))
+ if upd_count == 0: return
+
+ new_messages = None
+ new_edited_messages = None
+ new_channel_posts = None
+ new_edited_channel_posts = None
+ new_message_reactions = None
+ new_message_reaction_count_handlers = None
+ new_inline_queries = None
+ new_chosen_inline_results = None
+ new_callback_queries = None
+ new_shipping_queries = None
+ new_pre_checkout_queries = None
+ new_polls = None
+ new_poll_answers = None
+ new_my_chat_members = None
+ new_chat_members = None
+ chat_join_request = None
+ removed_chat_boost_handlers = None
+ chat_boost_handlers = None
+ new_business_connections = None
+ new_business_messages = None
+ new_edited_business_messages = None
+ new_deleted_business_messages = None
+ new_purchased_paid_media = None
+
+
+ for update in updates:
+ logger.debug('Processing updates: {0}'.format(update))
+ if update.message:
+ if new_messages is None: new_messages = []
+ new_messages.append(update.message)
+ if update.edited_message:
+ if new_edited_messages is None: new_edited_messages = []
+ new_edited_messages.append(update.edited_message)
+ if update.channel_post:
+ if new_channel_posts is None: new_channel_posts = []
+ new_channel_posts.append(update.channel_post)
+ if update.edited_channel_post:
+ if new_edited_channel_posts is None: new_edited_channel_posts = []
+ new_edited_channel_posts.append(update.edited_channel_post)
+ if update.inline_query:
+ if new_inline_queries is None: new_inline_queries = []
+ new_inline_queries.append(update.inline_query)
+ if update.chosen_inline_result:
+ if new_chosen_inline_results is None: new_chosen_inline_results = []
+ new_chosen_inline_results.append(update.chosen_inline_result)
+ if update.callback_query:
+ if new_callback_queries is None: new_callback_queries = []
+ new_callback_queries.append(update.callback_query)
+ if update.shipping_query:
+ if new_shipping_queries is None: new_shipping_queries = []
+ new_shipping_queries.append(update.shipping_query)
+ if update.pre_checkout_query:
+ if new_pre_checkout_queries is None: new_pre_checkout_queries = []
+ new_pre_checkout_queries.append(update.pre_checkout_query)
+ if update.poll:
+ if new_polls is None: new_polls = []
+ new_polls.append(update.poll)
+ if update.poll_answer:
+ if new_poll_answers is None: new_poll_answers = []
+ new_poll_answers.append(update.poll_answer)
+ if update.my_chat_member:
+ if new_my_chat_members is None: new_my_chat_members = []
+ new_my_chat_members.append(update.my_chat_member)
+ if update.chat_member:
+ if new_chat_members is None: new_chat_members = []
+ new_chat_members.append(update.chat_member)
+ if update.chat_join_request:
+ if chat_join_request is None: chat_join_request = []
+ chat_join_request.append(update.chat_join_request)
+ if update.message_reaction:
+ if new_message_reactions is None: new_message_reactions = []
+ new_message_reactions.append(update.message_reaction)
+ if update.message_reaction_count:
+ if new_message_reaction_count_handlers is None: new_message_reaction_count_handlers = []
+ new_message_reaction_count_handlers.append(update.message_reaction_count)
+ if update.chat_boost:
+ if chat_boost_handlers is None: chat_boost_handlers = []
+ chat_boost_handlers.append(update.chat_boost)
+ if update.removed_chat_boost:
+ if removed_chat_boost_handlers is None: removed_chat_boost_handlers = []
+ removed_chat_boost_handlers.append(update.removed_chat_boost)
+ if update.business_connection:
+ if new_business_connections is None: new_business_connections = []
+ new_business_connections.append(update.business_connection)
+ if update.business_message:
+ if new_business_messages is None: new_business_messages = []
+ new_business_messages.append(update.business_message)
+ if update.edited_business_message:
+ if new_edited_business_messages is None: new_edited_business_messages = []
+ new_edited_business_messages.append(update.edited_business_message)
+ if update.deleted_business_messages:
+ if new_deleted_business_messages is None: new_deleted_business_messages = []
+ new_deleted_business_messages.append(update.deleted_business_messages)
+ if update.purchased_paid_media:
+ if new_purchased_paid_media is None: new_purchased_paid_media = []
+ new_purchased_paid_media.append(update.purchased_paid_media)
+
+
+ if new_messages:
+ await self.process_new_messages(new_messages)
+ if new_edited_messages:
+ await self.process_new_edited_messages(new_edited_messages)
+ if new_channel_posts:
+ await self.process_new_channel_posts(new_channel_posts)
+ if new_edited_channel_posts:
+ await self.process_new_edited_channel_posts(new_edited_channel_posts)
+ if new_inline_queries:
+ await self.process_new_inline_query(new_inline_queries)
+ if new_chosen_inline_results:
+ await self.process_new_chosen_inline_query(new_chosen_inline_results)
+ if new_callback_queries:
+ await self.process_new_callback_query(new_callback_queries)
+ if new_shipping_queries:
+ await self.process_new_shipping_query(new_shipping_queries)
+ if new_pre_checkout_queries:
+ await self.process_new_pre_checkout_query(new_pre_checkout_queries)
+ if new_polls:
+ await self.process_new_poll(new_polls)
+ if new_poll_answers:
+ await self.process_new_poll_answer(new_poll_answers)
+ if new_my_chat_members:
+ await self.process_new_my_chat_member(new_my_chat_members)
+ if new_chat_members:
+ await self.process_new_chat_member(new_chat_members)
+ if chat_join_request:
+ await self.process_chat_join_request(chat_join_request)
+ if new_message_reactions:
+ await self.process_new_message_reaction(new_message_reactions)
+ if new_message_reaction_count_handlers:
+ await self.process_new_message_reaction_count(new_message_reaction_count_handlers)
+ if chat_boost_handlers:
+ await self.process_new_chat_boost(chat_boost_handlers)
+ if new_business_connections:
+ await self.process_new_business_connection(new_business_connections)
+ if new_business_messages:
+ await self.process_new_business_message(new_business_messages)
+ if new_edited_business_messages:
+ await self.process_new_edited_business_message(new_edited_business_messages)
+ if new_deleted_business_messages:
+ await self.process_new_deleted_business_messages(new_deleted_business_messages)
+ if new_purchased_paid_media:
+ await self.process_new_purchased_paid_media(new_purchased_paid_media)
+
+ async def process_new_messages(self, new_messages):
+ """
+ :meta private:
+ """
+ await self.__notify_update(new_messages)
+ await self._process_updates(self.message_handlers, new_messages, 'message')
+
+ async def process_new_edited_messages(self, edited_message):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.edited_message_handlers, edited_message, 'edited_message')
+
+ async def process_new_channel_posts(self, channel_post):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.channel_post_handlers, channel_post , 'channel_post')
+
+ async def process_new_edited_channel_posts(self, edited_channel_post):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.edited_channel_post_handlers, edited_channel_post, 'edited_channel_post')
+
+ async def process_new_message_reaction(self, message_reaction):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.message_reaction_handlers, message_reaction, 'message_reaction')
+
+ async def process_new_message_reaction_count(self, message_reaction_count):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.message_reaction_count_handlers, message_reaction_count, 'message_reaction_count')
+
+ async def process_new_inline_query(self, new_inline_queries):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.inline_handlers, new_inline_queries, 'inline_query')
+
+ async def process_new_chosen_inline_query(self, new_chosen_inline_queries):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.chosen_inline_handlers, new_chosen_inline_queries, 'chosen_inline_query')
+
+ async def process_new_callback_query(self, new_callback_queries):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.callback_query_handlers, new_callback_queries, 'callback_query')
+
+ async def process_new_shipping_query(self, new_shipping_queries):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.shipping_query_handlers, new_shipping_queries, 'shipping_query')
+
+ async def process_new_pre_checkout_query(self, pre_checkout_queries):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.pre_checkout_query_handlers, pre_checkout_queries, 'pre_checkout_query')
+
+ async def process_new_poll(self, polls):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.poll_handlers, polls, 'poll')
+
+ async def process_new_poll_answer(self, poll_answers):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.poll_answer_handlers, poll_answers, 'poll_answer')
+
+ async def process_new_my_chat_member(self, my_chat_members):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.my_chat_member_handlers, my_chat_members, 'my_chat_member')
+
+ async def process_new_chat_member(self, chat_members):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.chat_member_handlers, chat_members, 'chat_member')
+
+ async def process_chat_join_request(self, chat_join_request):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.chat_join_request_handlers, chat_join_request, 'chat_join_request')
+
+ async def process_new_chat_boost(self, chat_boost):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.chat_boost_handlers, chat_boost, 'chat_boost')
+
+ async def process_new_removed_chat_boost(self, removed_chat_boost):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.removed_chat_boost_handlers, removed_chat_boost, 'removed_chat_boost')
+
+ async def process_new_business_connection(self, new_business_connections):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.business_connection_handlers, new_business_connections, 'business_connection')
+
+ async def process_new_business_message(self, new_business_messages):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.business_message_handlers, new_business_messages, 'business_message')
+
+ async def process_new_edited_business_message(self, new_edited_business_messages):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.edited_business_message_handlers, new_edited_business_messages, 'edited_business_message')
+
+ async def process_new_deleted_business_messages(self, new_deleted_business_messages):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.deleted_business_messages_handlers, new_deleted_business_messages, 'deleted_business_messages')
+
+ async def process_new_purchased_paid_media(self, new_purchased_paid_media):
+ """
+ :meta private:
+ """
+ await self._process_updates(self.purchased_paid_media_handlers, new_purchased_paid_media, 'purchased_paid_media')
+
+ async def _get_middlewares(self, update_type):
+ """
+ :meta private:
+ """
+ if self.middlewares:
+ middlewares = [middleware for middleware in self.middlewares if update_type in middleware.update_types]
+ return middlewares
+ return None
+
+ async def __notify_update(self, new_messages):
+ if len(self.update_listener) == 0:
+ return
+ for listener in self.update_listener:
+ self._loop_create_task(listener(new_messages))
+
+ async def _test_message_handler(self, message_handler, message):
+ """
+ Test message handler.
+
+ :param message_handler:
+ :param message:
+ :return:
+ """
+ for message_filter, filter_value in message_handler['filters'].items():
+ if filter_value is None:
+ continue
+
+ if not await self._test_filter(message_filter, filter_value, message):
+ return False
+
+ return True
+
+ def set_update_listener(self, func: Awaitable):
+ """
+ Update listener is a function that gets any update.
+
+ :param func: function that should get update.
+ :type func: :obj:`Awaitable`
+
+ .. code-block:: python3
+ :caption: Example on asynchronous update listeners.
+
+ async def update_listener(new_messages):
+ for message in new_messages:
+ print(message.text) # Prints message text
+
+ bot.set_update_listener(update_listener)
+
+ :return: None
+ """
+ self.update_listener.append(func)
+
+ def add_custom_filter(self, custom_filter: Union[asyncio_filters.SimpleCustomFilter, asyncio_filters.AdvancedCustomFilter]):
+ """
+ Create custom filter.
+
+ .. code-block:: python3
+ :caption: Example on checking the text of a message
+
+ class TextMatchFilter(AdvancedCustomFilter):
+ key = 'text'
+
+ async def check(self, message, text):
+ return text == message.text
+
+ :param custom_filter: Class with check(message) method.
+ :type custom_filter: :class:`telebot.asyncio_filters.SimpleCustomFilter` or :class:`telebot.asyncio_filters.AdvancedCustomFilter`
+
+ :return: None
+ """
+ self.custom_filters[custom_filter.key] = custom_filter
+
+ async def _test_filter(self, message_filter, filter_value, message):
+ """
+ Test filters.
+
+ :param message_filter: Filter type passed in handler
+ :param filter_value: Filter value passed in handler
+ :param message: Message to test
+ :return: True if filter conforms
+ """
+ # test_cases = {
+ # 'content_types': lambda msg: msg.content_type in filter_value,
+ # 'regexp': lambda msg: msg.content_type == 'text' and re.search(filter_value, msg.text, re.IGNORECASE),
+ # 'commands': lambda msg: msg.content_type == 'text' and util.extract_command(msg.text) in filter_value,
+ # 'func': lambda msg: filter_value(msg)
+ # }
+ # return test_cases.get(message_filter, lambda msg: False)(message)
+ if message_filter == 'content_types':
+ return message.content_type in filter_value
+ elif message_filter == 'regexp':
+ return message.content_type == 'text' and re.search(filter_value, message.text, re.IGNORECASE)
+ elif message_filter == 'commands':
+ return message.content_type == 'text' and util.extract_command(message.text) in filter_value
+ elif message_filter == 'chat_types':
+ return message.chat.type in filter_value
+ elif message_filter == 'func':
+ if iscoroutinefunction(filter_value):
+ return await filter_value(message)
+ return filter_value(message)
+ elif self.custom_filters and message_filter in self.custom_filters:
+ return await self._check_filter(message_filter,filter_value,message)
+ else:
+ return False
+
+ async def _check_filter(self, message_filter, filter_value, message):
+ """
+ Check up the filter.
+
+ :param message_filter:
+ :param filter_value:
+ :param message:
+ :return:
+ """
+ filter_check = self.custom_filters.get(message_filter)
+ if not filter_check:
+ return False
+ elif isinstance(filter_check, asyncio_filters.SimpleCustomFilter):
+ return filter_value == await filter_check.check(message)
+ elif isinstance(filter_check, asyncio_filters.AdvancedCustomFilter):
+ return await filter_check.check(message, filter_value)
+ else:
+ logger.error("Custom filter: wrong type. Should be SimpleCustomFilter or AdvancedCustomFilter.")
+ return False
+
+ def setup_middleware(self, middleware: BaseMiddleware):
+ """
+ Setup middleware.
+
+ .. note::
+
+ Take a look at the :class:`telebot.asyncio_handler_backends.BaseMiddleware` section for more.
+
+ :param middleware: Middleware-class.
+ :type middleware: :class:`telebot.asyncio_handler_backends.BaseMiddleware`
+
+ :return: None
+ """
+ if not hasattr(middleware, 'update_types'):
+ logger.error('Middleware has no update_types parameter. Please add list of updates to handle.')
+ return
+
+ if not hasattr(middleware, 'update_sensitive'):
+ logger.warning('Middleware has no update_sensitive parameter. Parameter was set to False.')
+ middleware.update_sensitive = False
+
+ self.middlewares.append(middleware)
+
+ @staticmethod
+ def check_commands_input(commands, method_name):
+ """
+ :meta private:
+ """
+ if not isinstance(commands, list) or not all(isinstance(item, str) for item in commands):
+ logger.error(f"{method_name}: Commands filter should be list of strings (commands), unknown type supplied to the 'commands' filter list. Not able to use the supplied type.")
+
+
+ @staticmethod
+ def check_regexp_input(regexp, method_name):
+ """
+ :meta private:
+ """
+ if not isinstance(regexp, str):
+ logger.error(f"{method_name}: Regexp filter should be string. Not able to use the supplied type.")
+
+ def message_handler(self, commands=None, regexp=None, func=None, content_types=None, chat_types=None, **kwargs):
+ """
+ Handles new incoming message of any kind - text, photo, sticker, etc.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
+ All message handlers are tested in the order they were added.
+
+ Example:
+
+ .. code-block:: python3
+ :caption: Usage of message_handler
+
+ bot = TeleBot('TOKEN')
+
+ # Handles all messages which text matches regexp.
+ @bot.message_handler(regexp='someregexp')
+ async def command_help(message):
+ await bot.send_message(message.chat.id, 'Did someone call for help?')
+
+ # Handles messages in private chat
+ @bot.message_handler(chat_types=['private']) # You can add more chat types
+ async def command_help(message):
+ await bot.send_message(message.chat.id, 'Private chat detected, sir!')
+
+ # Handle all sent documents of type 'text/plain'.
+ @bot.message_handler(func=lambda message: message.document.mime_type == 'text/plain',
+ content_types=['document'])
+ async def command_handle_document(message):
+ await bot.send_message(message.chat.id, 'Document received, sir!')
+
+ # Handle all other messages.
+ @bot.message_handler(func=lambda message: True, content_types=['audio', 'photo', 'voice', 'video', 'document',
+ 'text', 'location', 'contact', 'sticker'])
+ async def default_command(message):
+ await bot.send_message(message.chat.id, "This is the default command handler.")
+
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
+
+ :param func: Optional lambda function. The lambda receives the message to test as the first parameter.
+ It must return True if the command should handle the message.
+
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param chat_types: list of chat types
+ :type chat_types: :obj:`list` of :obj:`str`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: decorated function
+ """
+
+ if content_types is None:
+ content_types = ["text"]
+
+ if isinstance(commands, str):
+ logger.warning("message_handler: 'commands' filter should be List of strings (commands), not string.")
+ commands = [commands]
+
+ if isinstance(content_types, str):
+ logger.warning("message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ chat_types=chat_types,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_message_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_message_handler(self, handler_dict):
+ """
+ Adds a message handler.
+ Note that you should use register_message_handler to add message_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.message_handlers.append(handler_dict)
+
+ def register_message_handler(self, callback: Callable[[Any], Awaitable], content_types: Optional[List[str]]=None, commands: Optional[List[str]]=None,
+ regexp: Optional[str]=None, func: Optional[Callable]=None, chat_types: Optional[List[str]]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers message handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp:
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param chat_types: List of chat types
+ :type chat_types: :obj:`list` of :obj:`str`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ if content_types is None:
+ content_types = ["text"]
+ if isinstance(commands, str):
+ logger.warning("register_message_handler: 'commands' filter should be List of strings (commands), not string.")
+ commands = [commands]
+
+ if isinstance(content_types, str):
+ logger.warning("register_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ handler_dict = self._build_handler_dict(callback,
+ chat_types=chat_types,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ pass_bot=pass_bot,
+ **kwargs)
+ self.add_message_handler(handler_dict)
+
+ def edited_message_handler(self, commands=None, regexp=None, func=None, content_types=None, chat_types=None, **kwargs):
+ """
+ Handles new version of a message that is known to the bot and was edited.
+
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
+
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param chat_types: list of chat types
+ :type chat_types: :obj:`list` of :obj:`str`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ if content_types is None:
+ content_types = ["text"]
+
+ if isinstance(commands, str):
+ logger.warning("edited_message_handler: 'commands' filter should be List of strings (commands), not string.")
+ commands = [commands]
+
+ if isinstance(content_types, str):
+ logger.warning("edited_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ chat_types=chat_types,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_edited_message_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_edited_message_handler(self, handler_dict):
+ """
+ Adds the edit message handler.
+ Note that you should use register_edited_message_handler to add edited_message_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.edited_message_handlers.append(handler_dict)
+
+ def register_edited_message_handler(self, callback: Callable[[Any], Awaitable], content_types: Optional[List[str]]=None,
+ commands: Optional[List[str]]=None, regexp: Optional[str]=None, func: Optional[Callable]=None,
+ chat_types: Optional[List[str]]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers edited message handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param chat_types: True for private chat
+ :type chat_types: :obj:`bool`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ if isinstance(commands, str):
+ logger.warning("register_edited_message_handler: 'commands' filter should be List of strings (commands), not string.")
+ commands = [commands]
+
+ if isinstance(content_types, str):
+ logger.warning("register_edited_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ handler_dict = self._build_handler_dict(callback,
+ chat_types=chat_types,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ pass_bot=pass_bot,
+ **kwargs)
+ self.add_edited_message_handler(handler_dict)
+
+
+ def channel_post_handler(self, commands=None, regexp=None, func=None, content_types=None, **kwargs):
+ """
+ Handles new incoming channel post of any kind - text, photo, sticker, etc.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
+
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
+ """
+ if content_types is None:
+ content_types = ["text"]
+
+ if isinstance(commands, str):
+ logger.warning("channel_post_handler: 'commands' filter should be List of strings (commands), not string.")
+ commands = [commands]
+
+ if isinstance(content_types, str):
+ logger.warning("channel_post_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_channel_post_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_channel_post_handler(self, handler_dict):
+ """
+ Adds channel post handler.
+ Note that you should use register_channel_post_handler to add channel_post_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.channel_post_handlers.append(handler_dict)
+
+ def register_channel_post_handler(self, callback: Callable[[Any], Awaitable], content_types: Optional[List[str]]=None, commands: Optional[List[str]]=None,
+ regexp: Optional[str]=None, func: Optional[Callable]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers channel post message handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ if isinstance(commands, str):
+ logger.warning("register_channel_post_handler: 'commands' filter should be List of strings (commands), not string.")
+ commands = [commands]
+
+ if isinstance(content_types, str):
+ logger.warning("register_channel_post_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ handler_dict = self._build_handler_dict(callback,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ pass_bot=pass_bot,
+ **kwargs)
+ self.add_channel_post_handler(handler_dict)
+
+ def edited_channel_post_handler(self, commands=None, regexp=None, func=None, content_types=None, **kwargs):
+ """
+ Handles new version of a channel post that is known to the bot and was edited.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
+
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return:
+ """
+ if content_types is None:
+ content_types = ["text"]
+
+ if isinstance(commands, str):
+ logger.warning("edited_channel_post_handler: 'commands' filter should be List of strings (commands), not string.")
+ commands = [commands]
+
+ if isinstance(content_types, str):
+ logger.warning("edited_channel_post_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_edited_channel_post_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_edited_channel_post_handler(self, handler_dict):
+ """
+ Adds the edit channel post handler.
+ Note that you should use register_edited_channel_post_handler to add edited_channel_post_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.edited_channel_post_handlers.append(handler_dict)
+
+ def register_edited_channel_post_handler(self, callback: Callable[[Any], Awaitable], content_types: Optional[List[str]]=None,
+ commands: Optional[List[str]]=None, regexp: Optional[str]=None, func: Optional[Callable]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers edited channel post message handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: decorated function
+ """
+ if isinstance(commands, str):
+ logger.warning("register_edited_channel_post_handler: 'commands' filter should be List of strings (commands), not string.")
+ commands = [commands]
+
+ if isinstance(content_types, str):
+ logger.warning("register_edited_channel_post_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ handler_dict = self._build_handler_dict(callback,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ pass_bot=pass_bot,
+ **kwargs)
+ self.add_edited_channel_post_handler(handler_dict)
+
+ def message_reaction_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming message reaction.
+ As a parameter to the decorator function, it passes :class:`telebot.types.MessageReactionUpdated` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return:
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_message_reaction_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_message_reaction_handler(self, handler_dict):
+ """
+ Adds message reaction handler.
+ Note that you should use register_message_reaction_handler to add message_reaction_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.message_reaction_handlers.append(handler_dict)
+
+ def register_message_reaction_handler(self, callback: Callable[[Any], Awaitable], func: Callable=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers message reaction handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_message_reaction_handler(handler_dict)
+
+ def message_reaction_count_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming message reaction count.
+ As a parameter to the decorator function, it passes :class:`telebot.types.MessageReactionCountUpdated` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return:
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_message_reaction_count_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_message_reaction_count_handler(self, handler_dict):
+ """
+ Adds message reaction count handler
+ Note that you should use register_message_reaction_count_handler to add message_reaction_count_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.message_reaction_count_handlers.append(handler_dict)
+
+ def register_message_reaction_count_handler(self, callback: Callable[[Any], Awaitable], func: Callable=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers message reaction count handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_message_reaction_count_handler(handler_dict)
+
+
+ def inline_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming inline query.
+ As a parameter to the decorator function, it passes :class:`telebot.types.InlineQuery` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_inline_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_inline_handler(self, handler_dict):
+ """
+ Adds inline call handler.
+ Note that you should use register_inline_handler to add inline_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.inline_handlers.append(handler_dict)
+
+ def register_inline_handler(self, callback: Callable[[Any], Awaitable], func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers inline handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: decorated function
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_inline_handler(handler_dict)
+
+ def chosen_inline_handler(self, func, **kwargs):
+ """
+ The result of an inline query that was chosen by a user and sent to their chat partner.
+ Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
+ As a parameter to the decorator function, it passes :class:`telebot.types.ChosenInlineResult` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_chosen_inline_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_chosen_inline_handler(self, handler_dict):
+ """
+ Description: TBD
+ Note that you should use register_chosen_inline_handler to add chosen_inline_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.chosen_inline_handlers.append(handler_dict)
+
+ def register_chosen_inline_handler(self, callback: Callable[[Any], Awaitable], func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers chosen inline handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_chosen_inline_handler(handler_dict)
+
+ def callback_query_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming callback query.
+ As a parameter to the decorator function, it passes :class:`telebot.types.CallbackQuery` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_callback_query_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_callback_query_handler(self, handler_dict):
+ """
+ Adds a callback request handler.
+ Note that you should use register_callback_query_handler to add callback_query_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.callback_query_handlers.append(handler_dict)
+
+ def register_callback_query_handler(self, callback: Callable[[Any], Awaitable], func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers callback query handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_callback_query_handler(handler_dict)
+
+ def shipping_query_handler(self, func, **kwargs):
+ """
+ Handles new incoming shipping query. Only for invoices with flexible price.
+ As a parameter to the decorator function, it passes :class:`telebot.types.ShippingQuery` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_shipping_query_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_shipping_query_handler(self, handler_dict):
+ """
+ Adds a shipping request handler.
+ Note that you should use register_shipping_query_handler to add shipping_query_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.shipping_query_handlers.append(handler_dict)
+
+ def register_shipping_query_handler(self, callback: Callable[[Any], Awaitable], func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers shipping query handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_shipping_query_handler(handler_dict)
+
+ def pre_checkout_query_handler(self, func, **kwargs):
+ """
+ New incoming pre-checkout query. Contains full information about checkout.
+ As a parameter to the decorator function, it passes :class:`telebot.types.PreCheckoutQuery` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_pre_checkout_query_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_pre_checkout_query_handler(self, handler_dict):
+ """
+ Adds a pre-checkout request handler.
+ Note that you should use register_pre_checkout_query_handler to add pre_checkout_query_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.pre_checkout_query_handlers.append(handler_dict)
+
+ def register_pre_checkout_query_handler(self, callback: Callable[[Any], Awaitable], func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers pre-checkout request handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: decorated function
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_pre_checkout_query_handler(handler_dict)
+
+ def purchased_paid_media_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming purchased paid media.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_purchased_paid_media_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_purchased_paid_media_handler(self, handler_dict):
+ """
+ Adds a purchased paid media handler
+ Note that you should use register_purchased_paid_media_handler to add purchased_paid_media_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.purchased_paid_media_handlers.append(handler_dict)
+
+ def register_purchased_paid_media_handler(self, callback: Callable, func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers purchased paid media handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_purchased_paid_media_handler(handler_dict)
+
+ def poll_handler(self, func, **kwargs):
+ """
+ Handles new state of a poll. Bots receive only updates about stopped polls and polls, which are sent by the bot
+ As a parameter to the decorator function, it passes :class:`telebot.types.Poll` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_poll_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_poll_handler(self, handler_dict):
+ """
+ Adds a poll request handler.
+ Note that you should use register_poll_handler to add poll_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.poll_handlers.append(handler_dict)
+
+ def register_poll_handler(self, callback: Callable[[Any], Awaitable], func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers poll handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_poll_handler(handler_dict)
+
+ def poll_answer_handler(self, func=None, **kwargs):
+ """
+ Handles change of user's answer in a non-anonymous poll(when user changes the vote).
+ Bots receive new votes only in polls that were sent by the bot itself.
+ As a parameter to the decorator function, it passes :class:`telebot.types.PollAnswer` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_poll_answer_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_poll_answer_handler(self, handler_dict):
+ """
+ Adds a poll_answer request handler.
+ Note that you should use register_poll_answer_handler to add poll_answer_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.poll_answer_handlers.append(handler_dict)
+
+ def register_poll_answer_handler(self, callback: Callable[[Any], Awaitable], func: Callable, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers poll answer handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_poll_answer_handler(handler_dict)
+
+ def my_chat_member_handler(self, func=None, **kwargs):
+ """
+ Handles update in a status of a bot. For private chats,
+ this update is received only when the bot is blocked or unblocked by the user.
+ As a parameter to the decorator function, it passes :class:`telebot.types.ChatMemberUpdated` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_my_chat_member_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_my_chat_member_handler(self, handler_dict):
+ """
+ Adds a my_chat_member handler.
+ Note that you should use register_my_chat_member_handler to add my_chat_member_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.my_chat_member_handlers.append(handler_dict)
+
+ def register_my_chat_member_handler(self, callback: Callable[[Any], Awaitable], func: Optional[Callable]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers my chat member handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_my_chat_member_handler(handler_dict)
+
+ def chat_member_handler(self, func=None, **kwargs):
+ """
+ Handles update in a status of a user in a chat.
+ The bot must be an administrator in the chat and must explicitly specify “chat_member”
+ in the list of allowed_updates to receive these updates.
+ As a parameter to the decorator function, it passes :class:`telebot.types.ChatMemberUpdated` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_chat_member_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_chat_member_handler(self, handler_dict):
+ """
+ Adds a chat_member handler.
+ Note that you should use register_chat_member_handler to add chat_member_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.chat_member_handlers.append(handler_dict)
+
+ def register_chat_member_handler(self, callback: Callable[[Any], Awaitable], func: Optional[Callable]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers chat member handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable``
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return:None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_chat_member_handler(handler_dict)
+
+ def chat_join_request_handler(self, func=None, **kwargs):
+ """
+ Handles a request to join the chat has been sent. The bot must have the can_invite_users
+ administrator right in the chat to receive these updates.
+ As a parameter to the decorator function, it passes :class:`telebot.types.ChatJoinRequest` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_chat_join_request_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_chat_join_request_handler(self, handler_dict):
+ """
+ Adds a chat_join_request handler.
+ Note that you should use register_chat_join_request_handler to add chat_join_request_handler.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.chat_join_request_handlers.append(handler_dict)
+
+ def register_chat_join_request_handler(self, callback: Callable[[Any], Awaitable], func: Optional[Callable]=None, pass_bot:Optional[bool]=False, **kwargs):
+ """
+ Registers chat join request handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`Awaitable`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_chat_join_request_handler(handler_dict)
+
+
+ def chat_boost_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming chat boost state.
+ it passes :class:`telebot.types.ChatBoostUpdated` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_chat_boost_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_chat_boost_handler(self, handler_dict):
+ """
+ Adds a chat_boost handler.
+ Note that you should use register_chat_boost_handler to add chat_boost_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.chat_boost_handlers.append(handler_dict)
+
+ def register_chat_boost_handler(self, callback: Callable, func: Optional[Callable]=None, pass_bot:Optional[bool]=False, **kwargs):
+ """
+ Registers chat boost handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_chat_boost_handler(handler_dict)
+
+ def removed_chat_boost_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming chat boost state.
+ it passes :class:`telebot.types.ChatBoostRemoved` object.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_removed_chat_boost_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_removed_chat_boost_handler(self, handler_dict):
+ """
+ Adds a removed_chat_boost handler.
+ Note that you should use register_removed_chat_boost_handler to add removed_chat_boost_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.removed_chat_boost_handlers.append(handler_dict)
+
+ def register_removed_chat_boost_handler(self, callback: Callable, func: Optional[Callable]=None, pass_bot:Optional[bool]=False, **kwargs):
+ """
+ Registers removed chat boost handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_removed_chat_boost_handler(handler_dict)
+
+
+ def business_connection_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming business connection state.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+ self.add_business_connection_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_business_connection_handler(self, handler_dict):
+ """
+ Adds a business_connection handler.
+ Note that you should use register_business_connection_handler to add business_connection_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.business_connection_handlers.append(handler_dict)
+
+ def register_business_connection_handler(
+ self, callback: Callable, func: Optional[Callable]=None, pass_bot:Optional[bool]=False, **kwargs):
+ """
+ Registers business connection handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_business_connection_handler(handler_dict)
+
+ def business_message_handler(
+ self,
+ commands: Optional[List[str]]=None,
+ regexp: Optional[str]=None,
+ func: Optional[Callable]=None,
+ content_types: Optional[List[str]]=None,
+ **kwargs):
+ """
+ Handles New incoming message of any kind(for business accounts, see bot api 7.2 for more) - text, photo, sticker, etc.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
+ All message handlers are tested in the order they were added.
+
+ Example:
+
+ .. code-block:: python3
+ :caption: Usage of business_message_handler
+
+ bot = TeleBot('TOKEN')
+
+ # Handles all messages which text matches regexp.
+ @bot.business_message_handler(regexp='someregexp')
+ def command_help(message):
+ bot.send_message(message.chat.id, 'Did someone call for help?')
+
+ # Handle all sent documents of type 'text/plain'.
+ @bot.business_message_handler(func=lambda message: message.document.mime_type == 'text/plain',
+ content_types=['document'])
+ def command_handle_document(message):
+ bot.send_message(message.chat.id, 'Document received, sir!')
+
+ # Handle all other messages.
+ @bot.business_message_handler(func=lambda message: True, content_types=['audio', 'photo', 'voice', 'video', 'document',
+ 'text', 'location', 'contact', 'sticker'])
+ def default_command(message):
+ bot.send_message(message.chat.id, "This is the default command handler.")
+
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
+
+ :param func: Optional lambda function. The lambda receives the message to test as the first parameter.
+ It must return True if the command should handle the message.
+ :type func: :obj:`lambda`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: decorated function
+ """
+ if content_types is None:
+ content_types = ["text"]
+
+ method_name = "business_message_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("business_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_business_message_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_business_message_handler(self, handler_dict):
+ """
+ Adds a business_message handler.
+ Note that you should use register_business_message_handler to add business_message_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.business_message_handlers.append(handler_dict)
+
+ def register_business_message_handler(self,
+ callback: Callable,
+ commands: Optional[List[str]]=None,
+ regexp: Optional[str]=None,
+ func: Optional[Callable]=None,
+ content_types: Optional[List[str]]=None,
+ pass_bot: Optional[bool]=False,
+ **kwargs):
+ """
+ Registers business connection handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param pass_bot: True, if bot instance should be passed to handler
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ handler_dict = self._build_handler_dict(callback, content_types=content_types, commands=commands, regexp=regexp, func=func,
+ pass_bot=pass_bot,**kwargs)
+ self.add_business_message_handler(handler_dict)
+
+
+
+
+ def edited_business_message_handler(self, commands=None, regexp=None, func=None, content_types=None, **kwargs):
+ """
+ Handles new version of a message(business accounts) that is known to the bot and was edited.
+ As a parameter to the decorator function, it passes :class:`telebot.types.Message` object.
+
+ :param commands: Optional list of strings (commands to handle).
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Optional regular expression.
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ if content_types is None:
+ content_types = ["text"]
+
+ method_name = "edited_business_message_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("edited_business_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ **kwargs)
+ self.add_edited_business_message_handler(handler_dict)
+ return handler
+
+ return decorator
+
+
+ def add_edited_business_message_handler(self, handler_dict):
+ """
+ Adds the edit message handler
+ Note that you should use register_edited_business_message_handler to add edited_business_message_handler to the bot.
+
+ :meta private:
+
+ :param handler_dict:
+ :return:
+ """
+ self.edited_business_message_handlers.append(handler_dict)
+
+
+ def register_edited_business_message_handler(self, callback: Callable, content_types: Optional[List[str]]=None,
+ commands: Optional[List[str]]=None, regexp: Optional[str]=None, func: Optional[Callable]=None,
+ pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers edited message handler for business accounts.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param content_types: Supported message content types. Must be a list. Defaults to ['text'].
+ :type content_types: :obj:`list` of :obj:`str`
+
+ :param commands: list of commands
+ :type commands: :obj:`list` of :obj:`str`
+
+ :param regexp: Regular expression
+ :type regexp: :obj:`str`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+ method_name = "edited_business_message_handler"
+
+ if commands is not None:
+ self.check_commands_input(commands, method_name)
+ if isinstance(commands, str):
+ commands = [commands]
+
+ if regexp is not None:
+ self.check_regexp_input(regexp, method_name)
+
+ if isinstance(content_types, str):
+ logger.warning("edited_business_message_handler: 'content_types' filter should be List of strings (content types), not string.")
+ content_types = [content_types]
+
+ handler_dict = self._build_handler_dict(callback,
+ content_types=content_types,
+ commands=commands,
+ regexp=regexp,
+ func=func,
+ pass_bot=pass_bot,
+ **kwargs)
+ self.add_edited_business_message_handler(handler_dict)
+
+
+ def deleted_business_messages_handler(self, func=None, **kwargs):
+ """
+ Handles new incoming deleted messages state.
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+ :return: None
+
+ """
+ def decorator(handler):
+ handler_dict = self._build_handler_dict(handler, func=func, **kwargs)
+
+ self.add_deleted_business_messages_handler(handler_dict)
+ return handler
+
+ return decorator
+
+ def add_deleted_business_messages_handler(self, handler_dict):
+ """
+ Adds a deleted_business_messages handler.
+ Note that you should use register_deleted_business_messages_handler to add deleted_business_messages_handler to the bot.
+
+ :meta private:
+ """
+ self.deleted_business_messages_handlers.append(handler_dict)
+
+ def register_deleted_business_messages_handler(self, callback: Callable, func: Optional[Callable]=None, pass_bot: Optional[bool]=False, **kwargs):
+ """
+ Registers deleted business messages handler.
+
+ :param callback: function to be called
+ :type callback: :obj:`function`
+
+ :param func: Function executed as a filter
+ :type func: :obj:`function`
+
+ :param pass_bot: True if you need to pass TeleBot instance to handler(useful for separating handlers into different files)
+ :type pass_bot: :obj:`bool`
+
+ :param kwargs: Optional keyword arguments(custom filters)
+
+ :return: None
+ """
+
+ handler_dict = self._build_handler_dict(callback, func=func, pass_bot=pass_bot, **kwargs)
+ self.add_deleted_business_messages_handler(handler_dict)
+
+ @staticmethod
+ def _build_handler_dict(handler, pass_bot=False, **filters):
+ """
+ Builds a dictionary for a handler.
+
+ :param handler:
+ :param filters:
+ :return:
+ """
+ return {
+ 'function': handler,
+ 'pass_bot': pass_bot,
+ 'filters': {ftype: fvalue for ftype, fvalue in filters.items() if fvalue is not None}
+ # Remove None values, they are skipped in _test_filter anyway
+ #'filters': filters
+ }
+
+ async def skip_updates(self):
+ """
+ Skip existing updates.
+ Only last update will remain on server.
+ """
+ await self.get_updates(-1)
+ return True
+
+ # all methods begin here
+
+ async def get_me(self) -> types.User:
+ """
+ Returns basic information about the bot in form of a User object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getme
+ """
+ result = await asyncio_helper.get_me(self.token)
+ return types.User.de_json(result)
+
+ async def get_file(self, file_id: Optional[str]) -> types.File:
+ """
+ Use this method to get basic info about a file and prepare it for downloading.
+ For the moment, bots can download files of up to 20MB in size.
+ On success, a File object is returned.
+ It is guaranteed that the link will be valid for at least 1 hour.
+ When the link expires, a new one can be requested by calling get_file again.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getfile
+
+ :param file_id: File identifier
+ :type file_id: :obj:`str`
+
+ :return: :class:`telebot.types.File`
+ """
+ return types.File.de_json(await asyncio_helper.get_file(self.token, file_id))
+
+ async def get_file_url(self, file_id: Optional[str]) -> str:
+ """
+ Get a valid URL for downloading a file.
+
+ :param file_id: File identifier to get download URL for.
+ :type file_id: :obj:`str`
+
+ :return: URL for downloading the file.
+ :rtype: :obj:`str`
+ """
+ return await asyncio_helper.get_file_url(self.token, file_id)
+
+ async def download_file(self, file_path: Optional[str]) -> bytes:
+ """
+ Downloads file.
+
+ :param file_path: Path where the file should be downloaded.
+ :type file_path: str
+
+ :return: bytes
+ :rtype: :obj:`bytes`
+ """
+ return await asyncio_helper.download_file(self.token, file_path)
+
+ async def log_out(self) -> bool:
+ """
+ Use this method to log out from the cloud Bot API server before launching the bot locally.
+ You MUST log out the bot before running it locally, otherwise there is no guarantee
+ that the bot will receive updates.
+ After a successful call, you can immediately log in on a local server,
+ but will not be able to log in back to the cloud Bot API server for 10 minutes.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#logout
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.log_out(self.token)
+
+ async def close(self) -> bool:
+ """
+ Use this method to close the bot instance before moving it from one local server to another.
+ You need to delete the webhook before calling this method to ensure that the bot isn't launched again
+ after server restart.
+ The method will return error 429 in the first 10 minutes after the bot is launched.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#close
+
+ :return: :obj:`bool`
+ """
+ return await asyncio_helper.close(self.token)
+
+ def enable_saving_states(self, filename="./.state-save/states.pkl"):
+ """
+ Enable saving states (by default saving disabled)
+
+ .. note::
+ It is recommended to pass a :class:`~telebot.asyncio_storage.StatePickleStorage` instance as state_storage
+ to TeleBot class.
+
+ :param filename: Filename of saving file, defaults to "./.state-save/states.pkl"
+ :type filename: :obj:`str`, optional
+ """
+
+ self.current_states = StatePickleStorage(file_path=filename)
+
+ async def set_webhook(self, url: Optional[str]=None, certificate: Optional[Union[str, Any]]=None, max_connections: Optional[int]=None,
+ allowed_updates: Optional[List[str]]=None, ip_address: Optional[str]=None,
+ drop_pending_updates: Optional[bool] = None, timeout: Optional[int]=None,
+ secret_token: Optional[str]=None) -> bool:
+ """
+ Use this method to specify a URL and receive incoming updates via an outgoing webhook.
+ Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL,
+ containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after
+ a reasonable amount of attempts. Returns True on success.
+
+ If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token.
+ If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#setwebhook
+
+ :param url: HTTPS URL to send updates to. Use an empty string to remove webhook integration, defaults to None
+ :type url: :obj:`str`, optional
+
+ :param certificate: Upload your public key certificate so that the root certificate in use can be checked, defaults to None
+ :type certificate: :class:`str`, optional
+
+ :param max_connections: The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100.
+ Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput,
+ defaults to None
+ :type max_connections: :obj:`int`, optional
+
+ :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example,
+ specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update
+ for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default).
+ If not specified, the previous setting will be used.
+
+ Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received
+ for a short period of time. Defaults to None
+
+ :type allowed_updates: :obj:`list`, optional
+
+ :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address
+ resolved through DNS, defaults to None
+ :type ip_address: :obj:`str`, optional
+
+ :param drop_pending_updates: Pass True to drop all pending updates, defaults to None
+ :type drop_pending_updates: :obj:`bool`, optional
+
+ :param timeout: Timeout of a request, defaults to None
+ :type timeout: :obj:`int`, optional
+
+ :param secret_token: A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters.
+ Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you. Defaults to None
+ :type secret_token: :obj:`str`, optional
+
+ :return: True on success.
+ :rtype: :obj:`bool` if the request was successful.
+ """
+ return await asyncio_helper.set_webhook(self.token, url, certificate, max_connections, allowed_updates, ip_address,
+ drop_pending_updates, timeout, secret_token)
+
+
+ async def run_webhooks(self,
+ listen: Optional[str]="127.0.0.1",
+ port: Optional[int]=443,
+ url_path: Optional[str]=None,
+ certificate: Optional[str]=None,
+ certificate_key: Optional[str]=None,
+ webhook_url: Optional[str]=None,
+ max_connections: Optional[int]=None,
+ allowed_updates: Optional[List]=None,
+ ip_address: Optional[str]=None,
+ drop_pending_updates: Optional[bool] = None,
+ timeout: Optional[int]=None,
+ secret_token: Optional[str]=None,
+ secret_token_length: Optional[int]=20,
+ debug: Optional[bool]=False):
+ """
+ This class sets webhooks and listens to a given url and port.
+
+ :param listen: IP address to listen to. Defaults to 0.0.0.0
+ :param port: A port which will be used to listen to webhooks.
+ :param url_path: Path to the webhook. Defaults to /token
+ :param certificate: Path to the certificate file.
+ :param certificate_key: Path to the certificate key file.
+ :param webhook_url: Webhook URL.
+ :param max_connections: Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.
+ :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all updates regardless of type (default). If not specified, the previous setting will be used.
+ :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS
+ :param drop_pending_updates: Pass True to drop all pending updates
+ :param timeout: Integer. Request connection timeout
+ :param secret_token: Secret token to be used to verify the webhook request.
+ :param secret_token_length: Length of a secret token, defaults to 20
+ :param debug: Debug mode, defaults to False
+ :return:
+ """
+
+ # generate secret token if not set
+ if not secret_token:
+ secret_token = ''.join(random.choices(string.ascii_uppercase + string.digits, k=secret_token_length))
+
+ if not url_path:
+ url_path = self.token + '/'
+ if url_path[-1] != '/': url_path += '/'
+
+ protocol = "https" if certificate else "http"
+ if not webhook_url:
+ webhook_url = "{}://{}:{}/{}".format(protocol, listen, port, url_path)
+
+ if certificate and certificate_key:
+ ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
+ ssl_ctx.load_cert_chain(certificate, certificate_key)
+
+ # open certificate if it exists
+ cert_file = open(certificate, 'rb') if certificate else None
+ await self.set_webhook(
+ url=webhook_url,
+ certificate=cert_file,
+ max_connections=max_connections,
+ allowed_updates=allowed_updates,
+ ip_address=ip_address,
+ drop_pending_updates=drop_pending_updates,
+ timeout=timeout,
+ secret_token=secret_token
+ )
+ if cert_file: cert_file.close()
+
+ ssl_context = (certificate, certificate_key) if certificate else (None, None)
+ # for webhooks
+ try:
+ from telebot.ext.aio import AsyncWebhookListener
+ except (NameError, ImportError):
+ raise ImportError("Please install uvicorn and fastapi in order to use `run_webhooks` method.")
+ self.webhook_listener = AsyncWebhookListener(bot=self, secret_token=secret_token, host=listen, port=port, ssl_context=ssl_context, url_path='/'+url_path)
+ await self.webhook_listener.run_app()
+
+
+
+ async def delete_webhook(self, drop_pending_updates: Optional[bool]=None, timeout: Optional[int]=None) -> bool:
+ """
+ Use this method to remove webhook integration if you decide to switch back to getUpdates.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletewebhook
+
+ :param drop_pending_updates: Pass True to drop all pending updates, defaults to None
+ :type drop_pending_updates: :obj: `bool`, optional
+
+ :param timeout: Request connection timeout, defaults to None
+ :type timeout: :obj:`int`, optional
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.delete_webhook(self.token, drop_pending_updates, timeout)
+
+ async def remove_webhook(self) -> bool:
+ """
+ Alternative for delete_webhook but uses set_webhook
+ """
+ result = await self.set_webhook()
+ return result
+
+ async def get_webhook_info(self, timeout: Optional[int]=None) -> types.WebhookInfo:
+ """
+ Use this method to get current webhook status. Requires no parameters.
+ On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getwebhookinfo
+
+ :param timeout: Request connection timeout
+ :type timeout: :obj:`int`, optional
+
+ :return: On success, returns a WebhookInfo object.
+ :rtype: :class:`telebot.types.WebhookInfo`
+ """
+ result = await asyncio_helper.get_webhook_info(self.token, timeout)
+ return types.WebhookInfo.de_json(result)
+
+ async def set_message_reaction(self, chat_id: Union[int, str], message_id: int, reaction: Optional[List[types.ReactionType]]=None, is_big: Optional[bool]=None) -> bool:
+ """
+ Use this method to change the chosen reactions on a message.
+ Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same
+ available reactions as messages in the channel. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setmessagereaction
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Identifier of the message to set reaction to
+ :type message_id: :obj:`int`
+
+ :param reaction: New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message.
+ A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.
+ :type reaction: :obj:`list` of :class:`telebot.types.ReactionType`
+
+ :param is_big: Pass True to set the reaction with a big animation
+ :type is_big: :obj:`bool`
+
+ :return: :obj:`bool`
+ """
+ result = await asyncio_helper.set_message_reaction(self.token, chat_id, message_id, reaction, is_big)
+ return result
+
+ async def get_user_profile_photos(self, user_id: int, offset: Optional[int]=None,
+ limit: Optional[int]=None) -> types.UserProfilePhotos:
+ """
+ Use this method to get a list of profile pictures for a user.
+ Returns a :class:`telebot.types.UserProfilePhotos` object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getuserprofilephotos
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param offset: Sequential number of the first photo to be returned. By default, all photos are returned.
+ :type offset: :obj:`int`
+
+ :param limit: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.
+ :type limit: :obj:`int`
+
+ :return: `UserProfilePhotos `_
+ :rtype: :class:`telebot.types.UserProfilePhotos`
+
+ """
+ result = await asyncio_helper.get_user_profile_photos(self.token, user_id, offset, limit)
+ return types.UserProfilePhotos.de_json(result)
+
+ async def set_user_emoji_status(self, user_id: int, emoji_status_custom_emoji_id: Optional[str]=None, emoji_status_expiration_date: Optional[int]=None) -> bool:
+ """
+ Use this method to change the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setuseremojistatus
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param emoji_status_custom_emoji_id: Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.
+ :type emoji_status_custom_emoji_id: :obj:`str`, optional
+
+ :param emoji_status_expiration_date: Expiration date of the emoji status, if any
+ :type emoji_status_expiration_date: :obj:`int`, optional
+
+ :return: :obj:`bool`
+ """
+ result = await asyncio_helper.set_user_emoji_status(self.token, user_id, emoji_status_custom_emoji_id, emoji_status_expiration_date)
+ return result
+
+ async def get_chat(self, chat_id: Union[int, str]) -> types.ChatFullInfo:
+ """
+ Use this method to get up to date information about the chat (current name of the user for one-on-one
+ conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getchat
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: Chat information
+ :rtype: :class:`telebot.types.ChatFullInfo`
+ """
+ result = await asyncio_helper.get_chat(self.token, chat_id)
+ return types.ChatFullInfo.de_json(result)
+
+ async def leave_chat(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#leavechat
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: :obj:`bool`
+ """
+ result = await asyncio_helper.leave_chat(self.token, chat_id)
+ return result
+
+ async def get_chat_administrators(self, chat_id: Union[int, str]) -> List[types.ChatMember]:
+ """
+ Use this method to get a list of administrators in a chat.
+ On success, returns an Array of ChatMember objects that contains
+ information about all chat administrators except other bots.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getchatadministrators
+
+ :param chat_id: Unique identifier for the target chat or username
+ of the target supergroup or channel (in the format @channelusername)
+ :return: List made of ChatMember objects.
+ :rtype: :obj:`list` of :class:`telebot.types.ChatMember`
+ """
+ result = await asyncio_helper.get_chat_administrators(self.token, chat_id)
+ return [types.ChatMember.de_json(r) for r in result]
+
+ @util.deprecated(deprecation_text="Use get_chat_member_count instead")
+ async def get_chat_members_count(self, chat_id: Union[int, str]) -> int:
+ """
+ This function is deprecated. Use `get_chat_member_count` instead.
+
+ .. deprecated:: 4.0.0
+ This function is deprecated. Use `get_chat_member_count` instead.
+
+ Use this method to get the number of members in a chat.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getchatmembercount
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: Number of members in the chat.
+ :rtype: :obj:`int`
+ """
+ result = await asyncio_helper.get_chat_member_count(self.token, chat_id)
+ return result
+
+ async def get_chat_member_count(self, chat_id: Union[int, str]) -> int:
+ """
+ Use this method to get the number of members in a chat.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getchatmembercount
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: Number of members in the chat.
+ :rtype: :obj:`int`
+ """
+ result = await asyncio_helper.get_chat_member_count(self.token, chat_id)
+ return result
+
+ async def set_chat_sticker_set(self, chat_id: Union[int, str], sticker_set_name: str) -> types.StickerSet:
+ """
+ Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat
+ for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned
+ in getChat requests to check if the bot can use this method. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatstickerset
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param sticker_set_name: Name of the sticker set to be set as the group sticker set
+ :type sticker_set_name: :obj:`str`
+
+ :return: StickerSet object
+ :rtype: :class:`telebot.types.StickerSet`
+ """
+ result = await asyncio_helper.set_chat_sticker_set(self.token, chat_id, sticker_set_name)
+ return result
+
+ async def delete_chat_sticker_set(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat
+ for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set
+ optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletechatstickerset
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ result = await asyncio_helper.delete_chat_sticker_set(self.token, chat_id)
+ return result
+
+ async def answer_web_app_query(self, web_app_query_id: str, result: types.InlineQueryResultBase) -> types.SentWebAppMessage:
+ """
+ Use this method to set the result of an interaction with a Web App and
+ send a corresponding message on behalf of the user to the chat from which
+ the query originated.
+ On success, a SentWebAppMessage object is returned.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#answerwebappquery
+
+ :param web_app_query_id: Unique identifier for the query to be answered
+ :type web_app_query_id: :obj:`str`
+
+ :param result: A JSON-serialized object describing the message to be sent
+ :type result: :class:`telebot.types.InlineQueryResultBase`
+
+ :return: On success, a SentWebAppMessage object is returned.
+ :rtype: :class:`telebot.types.SentWebAppMessage`
+ """
+
+ return await asyncio_helper.answer_web_app_query(self.token, web_app_query_id, result)
+
+ async def save_prepared_inline_message(self, user_id: int, result: types.InlineQueryResultBase, allow_user_chats: Optional[bool]=None,
+ allow_bot_chats: Optional[bool]=None, allow_group_chats: Optional[bool]=None, allow_channel_chats: Optional[bool]=None) -> types.PreparedInlineMessage:
+ """
+ Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#savepreparedinlinemessage
+
+ :param user_id: Unique identifier of the target user that can use the prepared message
+ :type user_id: :obj:`int`
+
+ :param result: A JSON-serialized object describing the message to be sent
+ :type result: :class:`telebot.types.InlineQueryResultBase`
+
+ :param allow_user_chats: Pass True if the message can be sent to private chats with users
+ :type allow_user_chats: :obj:`bool`, optional
+
+ :param allow_bot_chats: Pass True if the message can be sent to private chats with bots
+ :type allow_bot_chats: :obj:`bool`, optional
+
+ :param allow_group_chats: Pass True if the message can be sent to group and supergroup chats
+ :type allow_group_chats: :obj:`bool`, optional
+
+ :param allow_channel_chats: Pass True if the message can be sent to channel chats
+ :type allow_channel_chats: :obj:`bool`, optional
+
+ :return: :class:`telebot.types.PreparedInlineMessage`
+ """
+ result = await asyncio_helper.save_prepared_inline_message(self.token, user_id, result, allow_user_chats, allow_bot_chats, allow_group_chats, allow_channel_chats)
+ return types.PreparedInlineMessage.de_json(result)
+
+ async def get_chat_member(self, chat_id: Union[int, str], user_id: int) -> types.ChatMember:
+ """
+ Use this method to get information about a member of a chat. Returns a ChatMember object on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getchatmember
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :return: Returns ChatMember object on success.
+ :rtype: :class:`telebot.types.ChatMember`
+ """
+ result = await asyncio_helper.get_chat_member(self.token, chat_id, user_id)
+ return types.ChatMember.de_json(result)
+
+ async def send_message(
+ self, chat_id: Union[int, str], text: str,
+ parse_mode: Optional[str]=None,
+ entities: Optional[List[types.MessageEntity]]=None,
+ disable_web_page_preview: Optional[bool]=None,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ link_preview_options: Optional[types.LinkPreviewOptions]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send text messages.
+
+ Warning: Do not send more than about 4096 characters each message, otherwise you'll risk an HTTP 414 error.
+ If you must send more than 4096 characters,
+ use the `split_string` or `smart_split` function in util.py.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendmessage
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param text: Text of the message to be sent
+ :type text: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the message text.
+ :type parse_mode: :obj:`str`
+
+ :param entities: List of special entities that appear in message text, which can be specified instead of parse_mode
+ :type entities: Array of :class:`telebot.types.MessageEntity`
+
+ :param disable_web_page_preview: Deprecated - Use link_preview_options instead.
+ :type disable_web_page_preview: :obj:`bool`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: If True, the message content will be hidden for all users except for the target user
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param link_preview_options: Options for previewing links.
+ :type link_preview_options: :class:`telebot.types.LinkPreviewOptions`
+
+ :param business_connection_id: Unique identifier for the target business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier for the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_web_page_preview = self.disable_web_page_preview if (disable_web_page_preview is None) else disable_web_page_preview
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if disable_web_page_preview is not None:
+ # show a deprecation warning
+ logger.warning("The parameter 'disable_web_page_preview' is deprecated. Use 'link_preview_options' instead.")
+
+ if link_preview_options:
+ # show a conflict warning
+ logger.warning("Both 'link_preview_options' and 'disable_web_page_preview' parameters are set: conflicting, 'disable_web_page_preview' is deprecated")
+ else:
+ # create a LinkPreviewOptions object
+ link_preview_options = types.LinkPreviewOptions(
+ is_disabled=disable_web_page_preview
+ )
+
+ if link_preview_options and (link_preview_options.is_disabled is None):
+ link_preview_options.is_disabled = self.disable_web_page_preview
+
+ # Fix preview link options if link_preview_options not provided. Get param from class
+ if not link_preview_options and self.disable_web_page_preview:
+ # create a LinkPreviewOptions object
+ link_preview_options = types.LinkPreviewOptions(is_disabled=self.disable_web_page_preview)
+
+ return types.Message.de_json(
+ await asyncio_helper.send_message(
+ self.token, chat_id, text,
+ reply_markup, parse_mode, disable_notification, timeout,
+ entities, protect_content, message_thread_id, reply_parameters, link_preview_options, business_connection_id,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ async def forward_message(
+ self, chat_id: Union[int, str], from_chat_id: Union[int, str],
+ message_id: int, disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ message_thread_id: Optional[int]=None,
+ video_start_timestamp: Optional[int]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to forward messages of any kind.
+
+ Telegram documentation: https://core.telegram.org/bots/api#forwardmessage
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound
+ :type disable_notification: :obj:`bool`
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
+ :type from_chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Message identifier in the chat specified in from_chat_id
+ :type message_id: :obj:`int`
+
+ :param video_start_timestamp: New start timestamp for the forwarded video in the message
+ :type video_start_timestamp: :obj:`int`
+
+ :param protect_content: Protects the contents of the forwarded message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :type message_thread_id: :obj:`int`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ return types.Message.de_json(
+ await asyncio_helper.forward_message(self.token, chat_id=chat_id, from_chat_id=from_chat_id, message_id=message_id,
+ disable_notification=disable_notification, protect_content=protect_content,
+ timeout=timeout, message_thread_id=message_thread_id, video_start_timestamp=video_start_timestamp,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters)
+ )
+
+ async def copy_message(
+ self, chat_id: Union[int, str],
+ from_chat_id: Union[int, str],
+ message_id: int,
+ caption: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ show_caption_above_media: Optional[bool]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ video_start_timestamp: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.MessageID:
+ """
+ Use this method to copy messages of any kind.
+ If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages,
+ and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous
+ to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array
+ of MessageId of the sent messages is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#copymessage
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
+ :type from_chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Message identifier in the chat specified in from_chat_id
+ :type message_id: :obj:`int`
+
+ :param video_start_timestamp: New start timestamp for the forwarded video in the message
+ :type video_start_timestamp: :obj:`int`
+
+ :param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the new caption.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode
+ :type caption_entities: Array of :class:`telebot.types.MessageEntity`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.
+ :type show_caption_above_media: :obj:`bool`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the MessageId of the sent message is returned.
+ :rtype: :class:`telebot.types.MessageID`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.MessageID.de_json(
+ await asyncio_helper.copy_message(self.token, chat_id=chat_id, from_chat_id=from_chat_id, message_id=message_id,
+ caption=caption, parse_mode=parse_mode, caption_entities=caption_entities,
+ disable_notification=disable_notification, protect_content=protect_content,
+ reply_parameters=reply_parameters, reply_markup=reply_markup, timeout=timeout,
+ message_thread_id=message_thread_id, show_caption_above_media=show_caption_above_media,
+ allow_paid_broadcast=allow_paid_broadcast, video_start_timestamp=video_start_timestamp,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ async def approve_suggested_post(self, chat_id: int, message_id: int, send_date: Optional[int]=None) -> bool:
+ """
+ Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#approvesuggestedpost
+
+ :param chat_id: Unique identifier for the target direct messages chat
+ :type chat_id: :obj:`int`
+
+ :param message_id: Identifier of a suggested post message to approve
+ :type message_id: :obj:`int`
+
+ :param send_date: Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created.
+ If specified, then the date must be not more than 2678400 seconds (30 days) in the future
+ :type send_date: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.approve_suggested_post(self.token, chat_id, message_id,
+ send_date=send_date)
+
+ async def decline_suggested_post(self, chat_id: int, message_id: int, comment: Optional[str]=None) -> bool:
+ """
+ Use this method to decline a suggested post in a direct messages chat. The bot must have
+ the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#declinesuggestedpost
+
+ :param chat_id: Unique identifier for the target direct messages chat
+ :type chat_id: :obj:`int`
+
+ :param message_id: Identifier of a suggested post message to decline
+ :type message_id: :obj:`int`
+
+ :param comment: Comment for the creator of the suggested post; 0-128 characters
+ :type comment: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.decline_suggested_post(self.token, chat_id, message_id,
+ comment=comment)
+
+ async def delete_message(self, chat_id: Union[int, str], message_id: int,
+ timeout: Optional[int]=None) -> bool:
+ """
+ Use this method to delete a message, including service messages, with the following limitations:
+ - A message can only be deleted if it was sent less than 48 hours ago.
+ - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
+ - Bots can delete outgoing messages in private chats, groups, and supergroups.
+ - Bots can delete incoming messages in private chats.
+ - Bots granted can_post_messages permissions can delete outgoing messages in channels.
+ - If the bot is an administrator of a group, it can delete any message there.
+ - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletemessage
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Identifier of the message to delete
+ :type message_id: :obj:`int`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.delete_message(self.token, chat_id, message_id, timeout)
+
+ async def delete_messages(self, chat_id: Union[int, str], message_ids: List[int]):
+ """
+ Use this method to delete multiple messages simultaneously.
+ If some of the specified messages can't be found, they are skipped. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletemessages
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_ids: Identifiers of the messages to be deleted
+ :type message_ids: :obj:`list` of :obj:`int`
+
+ :return: Returns True on success.
+
+ """
+ return await asyncio_helper.delete_messages(self.token, chat_id, message_ids)
+
+ async def forward_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, int], message_ids: List[int], disable_notification: Optional[bool]=None,
+ message_thread_id: Optional[int]=None, protect_content: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None) -> List[types.MessageID]:
+ """
+ Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded,
+ they are skipped. Service messages and messages with protected content can't be forwarded.
+ Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#forwardmessages
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
+ :type from_chat_id: :obj:`int` or :obj:`str`
+
+ :param message_ids: Message identifiers in the chat specified in from_chat_id
+ :type message_ids: :obj:`list`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound
+ :type disable_notification: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the messages will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param protect_content: Protects the contents of the forwarded message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.MessageID`
+ """
+
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+ result = await asyncio_helper.forward_messages(self.token, chat_id, from_chat_id, message_ids, disable_notification, message_thread_id, protect_content,
+ direct_messages_topic_id=direct_messages_topic_id)
+ return [types.MessageID.de_json(message_id) for message_id in result]
+
+ async def copy_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, int], message_ids: List[int],
+ disable_notification: Optional[bool] = None, message_thread_id: Optional[int] = None,
+ protect_content: Optional[bool] = None, remove_caption: Optional[bool] = None,
+ direct_messages_topic_id: Optional[int] = None) -> List[types.MessageID]:
+ """
+ Use this method to copy messages of any kind.
+ Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied.
+ A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method
+ forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#copymessages
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
+ :type from_chat_id: :obj:`int` or :obj:`str`
+
+ :param message_ids: Message identifiers in the chat specified in from_chat_id
+ :type message_ids: :obj:`list` of :obj:`int`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound
+ :type disable_notification: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the messages will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param protect_content: Protects the contents of the forwarded message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param remove_caption: Pass True to copy the messages without their captions
+ :type remove_caption: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :return: On success, an array of MessageId of the sent messages is returned.
+ :rtype: :obj:`list` of :class:`telebot.types.MessageID`
+ """
+ disable_notification = self.disable_notification if disable_notification is None else disable_notification
+ protect_content = self.protect_content if protect_content is None else protect_content
+ result = await asyncio_helper.copy_messages(self.token, chat_id, from_chat_id, message_ids, disable_notification, message_thread_id,
+ protect_content, remove_caption, direct_messages_topic_id)
+ return [types.MessageID.de_json(message_id) for message_id in result]
+
+ async def send_checklist(
+ self, business_connection_id: str, chat_id: Union[int, str],
+ checklist: types.InputChecklist,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ message_effect_id: Optional[str]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> types.Message:
+ """
+ Use this method to send a checklist on behalf of a connected business account. On success,
+ the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendchecklist
+
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param checklist: A JSON-serialized object for the checklist to send
+ :type checklist: :class:`telebot.types.InputChecklist`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :type message_effect_id: :obj:`str`
+
+ :param reply_parameters: Additional parameters for replies to messages
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ await asyncio_helper.send_checklist(
+ self.token, business_connection_id, chat_id, checklist, disable_notification=disable_notification,
+ protect_content=protect_content, message_effect_id=message_effect_id,
+ reply_parameters=reply_parameters, reply_markup=reply_markup))
+
+ async def edit_message_checklist(
+ self, business_connection_id: str, chat_id: Union[int, str],
+ message_id: int, checklist: types.InputChecklist,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None) -> types.Message:
+ """
+ Use this method to edit a checklist on behalf of a connected business account. On success,
+ the edited Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagechecklist
+
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Unique identifier for the target message
+ :type message_id: :obj:`int`
+
+ :param checklist: A JSON-serialized object for the new checklist
+ :type checklist: :class:`telebot.types.InputChecklist`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :return: On success, the edited Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ return types.Message.de_json(
+ await asyncio_helper.edit_message_checklist(
+ self.token, business_connection_id, chat_id, message_id, checklist, reply_markup=reply_markup))
+
+ async def send_dice(
+ self, chat_id: Union[int, str],
+ emoji: Optional[str]=None, disable_notification: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#senddice
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”.
+ Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”
+ :type emoji: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions
+ to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The identifier of a message thread, unique within the chat to which the message with the thread identifier belongs
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Unique identifier for the target business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier for the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ await asyncio_helper.send_dice(
+ self.token, chat_id, emoji, disable_notification,
+ reply_markup, timeout, protect_content, message_thread_id, reply_parameters, business_connection_id, message_effect_id=message_effect_id,
+ allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ async def send_photo(
+ self, chat_id: Union[int, str], photo: Union[Any, str],
+ caption: Optional[str]=None, parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ message_thread_id: Optional[int]=None,
+ has_spoiler: Optional[bool]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ show_caption_above_media: Optional[bool]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send photos. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendphoto
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended),
+ pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data.
+ The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20.
+ :type photo: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption: Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the photo caption.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions
+ to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param has_spoiler: Pass True, if the photo should be sent as a spoiler
+ :type has_spoiler: :obj:`bool`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Unique identifier for the target business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier for the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.
+ :type show_caption_above_media: :obj:`bool`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ await asyncio_helper.send_photo(
+ self.token, chat_id, photo, caption, reply_markup,
+ parse_mode, disable_notification, timeout, caption_entities,
+ protect_content, message_thread_id, has_spoiler, reply_parameters, business_connection_id, message_effect_id=message_effect_id,
+ show_caption_above_media=show_caption_above_media, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ async def send_audio(
+ self, chat_id: Union[int, str], audio: Union[Any, str],
+ caption: Optional[str]=None, duration: Optional[int]=None,
+ performer: Optional[str]=None, title: Optional[str]=None,
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ parse_mode: Optional[str]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ thumbnail: Optional[Union[Any, str]]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ thumb: Optional[Union[Any, str]]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send audio files, if you want Telegram clients to display them in the music player.
+ Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size,
+ this limit may be changed in the future.
+
+ For sending voice messages, use the send_voice method instead.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendaudio
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended),
+ pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data.
+ Audio must be in the .MP3 or .M4A format.
+ :type audio: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption: Audio caption, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param duration: Duration of the audio in seconds
+ :type duration: :obj:`int`
+
+ :param performer: Performer
+ :type performer: :obj:`str`
+
+ :param title: Track name
+ :type title: :obj:`str`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup:
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param parse_mode: Mode for parsing entities in the audio caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
+ The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320.
+ Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file,
+ so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under
+ :type thumbnail: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param thumb: Deprecated. Use thumbnail instead
+ :type thumb: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Unique identifier for the target business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier for the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if thumb is not None and thumbnail is None:
+ thumbnail = thumb
+ logger.warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ await asyncio_helper.send_audio(
+ self.token, chat_id, audio, caption, duration, performer, title,
+ reply_markup, parse_mode, disable_notification, timeout, thumbnail,
+ caption_entities, protect_content, message_thread_id, reply_parameters, business_connection_id, message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ async def send_voice(
+ self, chat_id: Union[int, str], voice: Union[Any, str],
+ caption: Optional[str]=None, duration: Optional[int]=None,
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ parse_mode: Optional[str]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendvoice
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended),
+ pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.
+ :type voice: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption: Voice message caption, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param duration: Duration of the voice message in seconds
+ :type duration: :obj:`int`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions
+ to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param parse_mode: Mode for parsing entities in the voice message caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Unique identifier for the target business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier for the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ await asyncio_helper.send_voice(
+ self.token, chat_id, voice, caption, duration, reply_markup,
+ parse_mode, disable_notification, timeout, caption_entities,
+ protect_content, message_thread_id, reply_parameters, business_connection_id, message_effect_id=message_effect_id,
+ allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ async def send_document(
+ self, chat_id: Union[int, str], document: Union[Any, str],
+ reply_to_message_id: Optional[int]=None,
+ caption: Optional[str]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ parse_mode: Optional[str]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ thumbnail: Optional[Union[Any, str]]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ visible_file_name: Optional[str]=None,
+ disable_content_type_detection: Optional[bool]=None,
+ data: Optional[Union[Any, str]]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ thumb: Optional[Union[Any, str]]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send general files.
+
+ Telegram documentation: https://core.telegram.org/bots/api#senddocument
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param document: (document) File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a
+ String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data
+ :type document: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param caption: Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param parse_mode: Mode for parsing entities in the document caption
+ :type parse_mode: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param thumbnail: InputFile or String : Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under
+ :type thumbnail: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param visible_file_name: allows to define file name that will be visible in the Telegram instead of original file name
+ :type visible_file_name: :obj:`str`
+
+ :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data
+ :type disable_content_type_detection: :obj:`bool`
+
+ :param data: function typo miss compatibility: do not use it
+ :type data: :obj:`str`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param thumb: Deprecated. Use thumbnail instead
+ :type thumb: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Unique identifier for the target business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier for the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if data and not(document):
+ # function typo miss compatibility
+ logger.warning('The parameter "data" is deprecated. Use "document" instead.')
+ document = data
+
+ if thumb is not None and thumbnail is None:
+ thumbnail = thumb
+ logger.warning('The parameter "thumb" is deprecated. Use "thumbnail" instead.')
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if isinstance(document, types.InputFile) and visible_file_name:
+ # inputfile name ignored, warn
+ logger.warning('Cannot use both InputFile and visible_file_name. InputFile name will be ignored.')
+
+ return types.Message.de_json(
+ await asyncio_helper.send_data(
+ self.token, chat_id, document, 'document',
+ reply_markup = reply_markup, parse_mode = parse_mode,
+ disable_notification = disable_notification, timeout = timeout, caption = caption, thumbnail= thumbnail,
+ caption_entities = caption_entities,
+ disable_content_type_detection = disable_content_type_detection, visible_file_name = visible_file_name, protect_content = protect_content,
+ message_thread_id = message_thread_id, reply_parameters=reply_parameters, business_connection_id=business_connection_id, message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ async def send_sticker(
+ self, chat_id: Union[int, str], sticker: Union[Any, str],
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ data: Union[Any, str]=None,
+ message_thread_id: Optional[int]=None,
+ emoji: Optional[str]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers.
+ On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendsticker
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL
+ as a String for Telegram to get a .webp file from the Internet, or upload a new one using multipart/form-data.
+ :type sticker: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param disable_notification: to disable the notification
+ :type disable_notification: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param data: function typo miss compatibility: do not use it
+ :type data: :obj:`str`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param emoji: Emoji associated with the sticker; only for just uploaded stickers
+ :type emoji: :obj:`str`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Unique identifier for the target business connection
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier for the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if data and not(sticker):
+ # function typo miss compatibility
+ logger.warning('The parameter "data" is deprecated. Use "sticker" instead.')
+ sticker = data
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ await asyncio_helper.send_data(
+ self.token, chat_id, sticker, 'sticker',
+ reply_markup=reply_markup,
+ disable_notification=disable_notification, timeout=timeout,
+ protect_content=protect_content,
+ message_thread_id=message_thread_id, emoji=emoji, reply_parameters=reply_parameters, business_connection_id=business_connection_id, message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ suggested_post_parameters=suggested_post_parameters, direct_messages_topic_id=direct_messages_topic_id
+ )
+ )
+
+ async def send_video(
+ self, chat_id: Union[int, str], video: Union[Any, str],
+ duration: Optional[int]=None,
+ width: Optional[int]=None,
+ height: Optional[int]=None,
+ thumbnail: Optional[Union[Any, str]]=None,
+ caption: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ supports_streaming: Optional[bool]=None,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ data: Optional[Union[Any, str]]=None,
+ message_thread_id: Optional[int]=None,
+ has_spoiler: Optional[bool]=None,
+ thumb: Optional[Union[Any, str]]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ show_caption_above_media: Optional[bool]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ cover: Optional[Union[Any, str]]=None,
+ start_timestamp: Optional[int]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document).
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendvideo
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param video: Video to send. You can either pass a file_id as String to resend a video that is already on the Telegram servers, or upload a new video file using multipart/form-data.
+ :type video: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param duration: Duration of sent video in seconds
+ :type duration: :obj:`int`
+
+ :param width: Video width
+ :type width: :obj:`int`
+
+ :param height: Video height
+ :type height: :obj:`int`
+
+ :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under .
+ :type thumbnail: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended),
+ pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under
+ name. More information on Sending Files »
+ :type cover: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param start_timestamp: Start timestamp for the video in the message
+ :type start_timestamp: :obj:`int`
+
+ :param caption: Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the video caption
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: List of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param supports_streaming: Pass True, if the uploaded video is suitable for streaming
+ :type supports_streaming: :obj:`bool`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param data: function typo miss compatibility: do not use it
+ :type data: :obj:`str`
+
+ :param message_thread_id: Identifier of a message thread, in which the video will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param has_spoiler: Pass True, if the video should be sent as a spoiler
+ :type has_spoiler: :obj:`bool`
+
+ :param thumb: Deprecated. Use thumbnail instead
+ :type thumb: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.
+ :type show_caption_above_media: :obj:`bool`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of a topic in a forum supergroup or channel, in which the message will be sent
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if data and not(video):
+ # function typo miss compatibility
+ logger.warning('The parameter "data" is deprecated. Use "video" instead.')
+ video = data
+
+ if thumb and not(thumbnail):
+ logger.warning('The parameter "thumb" is deprecated. Use "thumbnail" instead.')
+ thumbnail = thumb
+
+ return types.Message.de_json(
+ await asyncio_helper.send_video(
+ self.token, chat_id, video, duration, caption, reply_markup,
+ parse_mode, supports_streaming, disable_notification, timeout, thumbnail, width, height,
+ caption_entities, protect_content, message_thread_id, has_spoiler, reply_parameters, business_connection_id, message_effect_id=message_effect_id,
+ show_caption_above_media=show_caption_above_media, allow_paid_broadcast=allow_paid_broadcast, cover=cover, start_timestamp=start_timestamp,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters))
+
+ async def send_animation(
+ self, chat_id: Union[int, str], animation: Union[Any, str],
+ duration: Optional[int]=None,
+ width: Optional[int]=None,
+ height: Optional[int]=None,
+ thumbnail: Optional[Union[Any, str]]=None,
+ caption: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ message_thread_id: Optional[int]=None,
+ has_spoiler: Optional[bool]=None,
+ thumb: Optional[Union[Any, str]]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ show_caption_above_media: Optional[bool]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound).
+ On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendanimation
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended),
+ pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data.
+ :type animation: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param duration: Duration of sent animation in seconds
+ :type duration: :obj:`int`
+
+ :param width: Animation width
+ :type width: :obj:`int`
+
+ :param height: Animation height
+ :type height: :obj:`int`
+
+ :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
+ The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320.
+ Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file,
+ so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under .
+ :type thumbnail: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param caption: Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the animation caption
+ :type parse_mode: :obj:`str`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param caption_entities: List of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the video will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param has_spoiler: Pass True, if the animation should be sent as a spoiler
+ :type has_spoiler: :obj:`bool`
+
+ :param thumb: Deprecated. Use thumbnail instead
+ :type thumb: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.
+ :type show_caption_above_media: :obj:`bool`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if thumb is not None and thumbnail is None:
+ thumbnail = thumb
+ logger.warning('The parameter "thumb" is deprecated. Use "thumbnail" instead.')
+
+ return types.Message.de_json(
+ await asyncio_helper.send_animation(
+ self.token, chat_id, animation, duration, caption,
+ reply_markup, parse_mode, disable_notification, timeout, thumbnail,
+ caption_entities, width, height, protect_content, message_thread_id, has_spoiler, reply_parameters, business_connection_id,
+ message_effect_id=message_effect_id, show_caption_above_media=show_caption_above_media, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters))
+
+ async def send_video_note(
+ self, chat_id: Union[int, str], data: Union[Any, str],
+ duration: Optional[int]=None,
+ length: Optional[int]=None,
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ thumbnail: Optional[Union[Any, str]]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ thumb: Optional[Union[Any, str]]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long.
+ Use this method to send video messages. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendvideonote
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param data: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended)
+ or upload a new video using multipart/form-data. Sending video notes by a URL is currently unsupported
+ :type data: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param duration: Duration of sent video in seconds
+ :type duration: :obj:`int`
+
+ :param length: Video width and height, i.e. diameter of the video message
+ :type length: :obj:`int`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side.
+ The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320.
+ Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file,
+ so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under .
+ :type thumbnail: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the video note will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param thumb: Deprecated. Use thumbnail instead
+ :type thumb: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if thumb is not None and thumbnail is None:
+ thumbnail = thumb
+ logger.warning('The parameter "thumb" is deprecated. Use "thumbnail" instead.')
+
+ return types.Message.de_json(
+ await asyncio_helper.send_video_note(
+ self.token, chat_id, data, duration, length, reply_markup,
+ disable_notification, timeout, thumbnail, protect_content, message_thread_id, reply_parameters, business_connection_id, message_effect_id=message_effect_id,
+ allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ async def send_paid_media(
+ self, chat_id: Union[int, str], star_count: int, media: List[types.InputPaidMedia],
+ caption: Optional[str]=None, parse_mode: Optional[str]=None, caption_entities: Optional[List[types.MessageEntity]]=None,
+ show_caption_above_media: Optional[bool]=None, disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None, reply_parameters: Optional[types.ReplyParameters]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None, business_connection_id: Optional[str]=None,
+ payload: Optional[str]=None, allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send paid media to channel chats. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendpaidmedia
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param star_count: The number of Telegram Stars that must be paid to buy access to the media
+ :type star_count: :obj:`int`
+
+ :param media: A JSON-serialized array describing the media to be sent; up to 10 items
+ :type media: :obj:`list` of :class:`telebot.types.InputPaidMedia`
+
+ :param caption: Media caption, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the media caption
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: List of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media
+ :type show_caption_above_media: :obj:`bool`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_parameters: Description of the message to reply to
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove` or :class:`telebot.types.ForceReply`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param payload: Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes.
+ :type payload: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ return types.Message.de_json(
+ await asyncio_helper.send_paid_media(
+ self.token, chat_id, star_count, media, caption=caption, parse_mode=parse_mode,
+ caption_entities=caption_entities, show_caption_above_media=show_caption_above_media,
+ disable_notification=disable_notification, protect_content=protect_content,
+ reply_parameters=reply_parameters, reply_markup=reply_markup, business_connection_id=business_connection_id,
+ payload=payload, allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id,
+ suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ async def send_media_group(
+ self, chat_id: Union[int, str],
+ media: List[Union[
+ types.InputMediaAudio, types.InputMediaDocument,
+ types.InputMediaPhoto, types.InputMediaVideo]],
+ disable_notification: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None) -> List[types.Message]:
+ """
+ Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files
+ can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendmediagroup
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items
+ :type media: :obj:`list` of :obj:`types.InputMedia`
+
+ :param disable_notification: Sends the messages silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the messages will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :return: On success, an array of Messages that were sent is returned.
+ :rtype: List[types.Message]
+ """
+ if media:
+ # Pass default parse mode to Media items
+ for media_item in media:
+ if media_item.parse_mode is None:
+ media_item.parse_mode = self.parse_mode
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ result = await asyncio_helper.send_media_group(
+ self.token, chat_id, media, disable_notification, timeout, protect_content, message_thread_id, reply_parameters, business_connection_id, message_effect_id=message_effect_id,
+ allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id)
+ return [types.Message.de_json(msg) for msg in result]
+
+ async def send_location(
+ self, chat_id: Union[int, str],
+ latitude: float, longitude: float,
+ live_period: Optional[int]=None,
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ disable_notification: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ horizontal_accuracy: Optional[float]=None,
+ heading: Optional[int]=None,
+ proximity_alert_radius: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send point on the map. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendlocation
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param latitude: Latitude of the location
+ :type latitude: :obj:`float`
+
+ :param longitude: Longitude of the location
+ :type longitude: :obj:`float`
+
+ :param live_period: Period in seconds during which the location will be updated (see Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
+ :type live_period: :obj:`int`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard
+ or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
+ :type horizontal_accuracy: :obj:`float`
+
+ :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
+ :type heading: :obj:`int`
+
+ :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
+ :type proximity_alert_radius: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of a message thread, in which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ await asyncio_helper.send_location(
+ self.token, chat_id, latitude, longitude, live_period,
+ reply_markup, disable_notification, timeout,
+ horizontal_accuracy, heading, proximity_alert_radius,
+ protect_content, message_thread_id, reply_parameters, business_connection_id, message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ )
+
+ async def edit_message_live_location(
+ self, latitude: float, longitude: float,
+ chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ timeout: Optional[int]=None,
+ horizontal_accuracy: Optional[float]=None,
+ heading: Optional[int]=None,
+ proximity_alert_radius: Optional[int]=None,
+ live_period: Optional[int]=None,
+ business_connection_id: Optional[str]=None
+ ) -> types.Message:
+ """
+ Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly
+ disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message
+ is returned, otherwise True is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagelivelocation
+
+ :param latitude: Latitude of new location
+ :type latitude: :obj:`float`
+
+ :param longitude: Longitude of new location
+ :type longitude: :obj:`float`
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the message to edit
+ :type message_id: :obj:`int`
+
+ :param reply_markup: A JSON-serialized object for a new inline keyboard.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500
+ :type horizontal_accuracy: :obj:`float`
+
+ :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
+ :type heading: :obj:`int`
+
+ :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
+ :type proximity_alert_radius: :obj:`int`
+
+ :param live_period: New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged
+ :type live_period: :obj:`int`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be edited
+ :type business_connection_id: :obj:`str`
+
+ :return: On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
+ :rtype: :class:`telebot.types.Message` or bool
+ """
+ return types.Message.de_json(
+ await asyncio_helper.edit_message_live_location(
+ self.token, latitude, longitude, chat_id, message_id,
+ inline_message_id, reply_markup, timeout,
+ horizontal_accuracy, heading, proximity_alert_radius, live_period=live_period, business_connection_id=business_connection_id)
+ )
+
+ async def stop_message_live_location(
+ self, chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ timeout: Optional[int]=None,
+ business_connection_id: Optional[str]=None) -> types.Message:
+ """
+ Use this method to stop updating a live location message before live_period expires.
+ On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#stopmessagelivelocation
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the message with live location to stop
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message with live location to stop
+ :type inline_message_id: :obj:`str`
+
+ :param reply_markup: A JSON-serialized object for a new inline keyboard.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be edited
+ :type business_connection_id: :obj:`str`
+
+ :return: On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
+ :rtype: :class:`telebot.types.Message` or bool
+ """
+ return types.Message.de_json(
+ await asyncio_helper.stop_message_live_location(
+ self.token, chat_id, message_id, inline_message_id, reply_markup, timeout, business_connection_id))
+
+ async def send_venue(
+ self, chat_id: Union[int, str],
+ latitude: float, longitude: float,
+ title: str, address: str,
+ foursquare_id: Optional[str]=None,
+ foursquare_type: Optional[str]=None,
+ disable_notification: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ google_place_id: Optional[str]=None,
+ google_place_type: Optional[str]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send information about a venue. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendvenue
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param latitude: Latitude of the venue
+ :type latitude: :obj:`float`
+
+ :param longitude: Longitude of the venue
+ :type longitude: :obj:`float`
+
+ :param title: Name of the venue
+ :type title: :obj:`str`
+
+ :param address: Address of the venue
+ :type address: :obj:`str`
+
+ :param foursquare_id: Foursquare identifier of the venue
+ :type foursquare_id: :obj:`str`
+
+ :param foursquare_type: Foursquare type of the venue, if known. (For example, “arts_entertainment/default”,
+ “arts_entertainment/aquarium” or “food/icecream”.)
+ :type foursquare_type: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard,
+ custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if one of the specified
+ replied-to messages is not found.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param google_place_id: Google Places identifier of the venue
+ :type google_place_id: :obj:`str`
+
+ :param google_place_type: Google Places type of the venue.
+ :type google_place_type: :obj:`str`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The thread to which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ await asyncio_helper.send_venue(
+ self.token, chat_id, latitude, longitude, title, address, foursquare_id, foursquare_type,
+ disable_notification, reply_markup, timeout,
+ google_place_id, google_place_type, protect_content, message_thread_id, reply_parameters, business_connection_id, message_effect_id=message_effect_id,
+ allow_paid_broadcast=allow_paid_broadcast, direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters)
+ )
+
+ async def send_contact(
+ self, chat_id: Union[int, str], phone_number: str,
+ first_name: str, last_name: Optional[str]=None,
+ vcard: Optional[str]=None,
+ disable_notification: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Use this method to send phone contacts. On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendcontact
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param phone_number: Contact's phone number
+ :type phone_number: :obj:`str`
+
+ :param first_name: Contact's first name
+ :type first_name: :obj:`str`
+
+ :param last_name: Contact's last name
+ :type last_name: :obj:`str`
+
+ :param vcard: Additional data about the contact in the form of a vCard, 0-2048 bytes
+ :type vcard: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard,
+ custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
+ or :class:`telebot.types.ForceReply`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if one of the specified
+ replied-to messages is not found.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The thread to which the message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Unique identifier of the message effect
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ return types.Message.de_json(
+ await asyncio_helper.send_contact(
+ self.token, chat_id, phone_number, first_name, last_name, vcard,
+ disable_notification, reply_markup, timeout,
+ protect_content, message_thread_id, reply_parameters, business_connection_id, message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters)
+ )
+
+ async def send_chat_action(
+ self, chat_id: Union[int, str], action: str, timeout: Optional[int]=None, message_thread_id: Optional[int]=None,
+ business_connection_id: Optional[str]=None) -> bool:
+ """
+ Use this method when you need to tell the user that something is happening on the bot's side.
+ The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).
+ Returns True on success.
+
+ Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of
+ “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo. The user will see a “sending photo” status for the bot.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendchataction
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param action: Type of action to broadcast. Choose one, depending on what the user is about
+ to receive: typing for text messages, upload_photo for photos, record_video or upload_video
+ for videos, record_voice or upload_voice for voice notes, upload_document for general files,
+ choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes.
+ :type action: :obj:`str`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :param message_thread_id: The thread to which the message will be sent(supergroups only)
+ :type message_thread_id: :obj:`int`
+
+ :param business_connection_id: Identifier of a business connection, in which the message will be sent
+ :type business_connection_id: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.send_chat_action(self.token, chat_id, action, timeout, message_thread_id, business_connection_id)
+
+ async def kick_chat_member(
+ self, chat_id: Union[int, str], user_id: int,
+ until_date:Optional[Union[int, datetime]]=None,
+ revoke_messages: Optional[bool]=None) -> bool:
+ """
+ This function is deprecated. Use `ban_chat_member` instead
+ """
+ logger.info('kick_chat_member is deprecated. Use ban_chat_member instead.')
+ return await asyncio_helper.ban_chat_member(self.token, chat_id, user_id, until_date, revoke_messages)
+
+ async def ban_chat_member(
+ self, chat_id: Union[int, str], user_id: int,
+ until_date:Optional[Union[int, datetime]]=None,
+ revoke_messages: Optional[bool]=None) -> bool:
+ """
+ Use this method to ban a user in a group, a supergroup or a channel.
+ In the case of supergroups and channels, the user will not be able to return to the chat on their
+ own using invite links, etc., unless unbanned first.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#banchatmember
+
+ :param chat_id: Unique identifier for the target group or username of the target supergroup
+ or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param until_date: Date when the user will be unbanned, unix time. If user is banned for more than 366 days or
+ less than 30 seconds from the current time they are considered to be banned forever
+ :type until_date: :obj:`int` or :obj:`datetime`
+
+ :param revoke_messages: Bool: Pass True to delete all messages from the chat for the user that is being removed.
+ If False, the user will be able to see messages in the group that were sent before the user was removed.
+ Always True for supergroups and channels.
+ :type revoke_messages: :obj:`bool`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.ban_chat_member(self.token, chat_id, user_id, until_date, revoke_messages)
+
+ async def unban_chat_member(
+ self, chat_id: Union[int, str], user_id: int,
+ only_if_banned: Optional[bool]=False) -> bool:
+ """
+ Use this method to unban a previously kicked user in a supergroup or channel.
+ The user will not return to the group or channel automatically, but will be able to join via link, etc.
+ The bot must be an administrator for this to work. By default, this method guarantees that after the call
+ the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat
+ they will also be removed from the chat. If you don't want this, use the parameter only_if_banned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unbanchatmember
+
+ :param chat_id: Unique identifier for the target group or username of the target supergroup or channel
+ (in the format @username)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param only_if_banned: Do nothing if the user is not banned
+ :type only_if_banned: :obj:`bool`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.unban_chat_member(self.token, chat_id, user_id, only_if_banned)
+
+ async def restrict_chat_member(
+ self, chat_id: Union[int, str], user_id: int,
+ until_date: Optional[Union[int, datetime]]=None,
+ can_send_messages: Optional[bool]=None,
+ can_send_media_messages: Optional[bool]=None,
+ can_send_polls: Optional[bool]=None,
+ can_send_other_messages: Optional[bool]=None,
+ can_add_web_page_previews: Optional[bool]=None,
+ can_change_info: Optional[bool]=None,
+ can_invite_users: Optional[bool]=None,
+ can_pin_messages: Optional[bool]=None,
+ permissions: Optional[types.ChatPermissions]=None,
+ use_independent_chat_permissions: Optional[bool]=None) -> bool:
+ """
+ Use this method to restrict a user in a supergroup.
+ The bot must be an administrator in the supergroup for this to work and must have
+ the appropriate admin rights. Pass True for all boolean parameters to lift restrictions from a user.
+
+ Telegram documentation: https://core.telegram.org/bots/api#restrictchatmember
+
+ .. warning::
+ Individual parameters are deprecated and will be removed, use 'permissions' instead
+
+ :param chat_id: Unique identifier for the target group or username of the target supergroup
+ or channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param until_date: Date when restrictions will be lifted for the user, unix time.
+ If user is restricted for more than 366 days or less than 30 seconds from the current time,
+ they are considered to be restricted forever
+ :type until_date: :obj:`int` or :obj:`datetime`, optional
+
+ :param can_send_messages: deprecated
+ :type can_send_messages: :obj:`bool`
+
+ :param can_send_media_messages: deprecated
+ :type can_send_media_messages: :obj:`bool`
+
+ :param can_send_polls: deprecated
+ :type can_send_polls: :obj:`bool`
+
+ :param can_send_other_messages: deprecated
+ :type can_send_other_messages: :obj:`bool`
+
+ :param can_add_web_page_previews: deprecated
+ :type can_add_web_page_previews: :obj:`bool`
+
+ :param can_change_info: deprecated
+ :type can_change_info: :obj:`bool`
+
+ :param can_invite_users: deprecated
+ :type can_invite_users: :obj:`bool`
+
+ :param can_pin_messages: deprecated
+ :type can_pin_messages: :obj:`bool`
+
+ :param use_independent_chat_permissions: Pass True if chat permissions are set independently.
+ Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages,
+ can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes
+ permissions; the can_send_polls permission will imply the can_send_messages permission.
+ :type use_independent_chat_permissions: :obj:`bool`, optional
+
+ :param permissions: Pass ChatPermissions object to set all permissions at once. Use this parameter instead of
+ passing all boolean parameters to avoid backward compatibility problems in future.
+ :type permissions: :obj:`types.ChatPermissions`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ if permissions is None:
+ permissions = types.ChatPermissions(
+ can_send_messages=can_send_messages,
+ can_send_media_messages=can_send_media_messages,
+ can_send_polls=can_send_polls,
+ can_send_other_messages=can_send_other_messages,
+ can_add_web_page_previews=can_add_web_page_previews,
+ can_change_info=can_change_info,
+ can_invite_users=can_invite_users,
+ can_pin_messages=can_pin_messages
+ )
+ logger.warning('The parameters "can_..." are deprecated, use "permissions" instead.')
+ return await asyncio_helper.restrict_chat_member(
+ self.token, chat_id, user_id, permissions, until_date, use_independent_chat_permissions)
+
+ async def promote_chat_member(
+ self, chat_id: Union[int, str], user_id: int,
+ can_change_info: Optional[bool]=None,
+ can_post_messages: Optional[bool]=None,
+ can_edit_messages: Optional[bool]=None,
+ can_delete_messages: Optional[bool]=None,
+ can_invite_users: Optional[bool]=None,
+ can_restrict_members: Optional[bool]=None,
+ can_pin_messages: Optional[bool]=None,
+ can_promote_members: Optional[bool]=None,
+ is_anonymous: Optional[bool]=None,
+ can_manage_chat: Optional[bool]=None,
+ can_manage_video_chats: Optional[bool]=None,
+ can_manage_voice_chats: Optional[bool]=None,
+ can_manage_topics: Optional[bool]=None,
+ can_post_stories: Optional[bool]=None,
+ can_edit_stories: Optional[bool]=None,
+ can_delete_stories: Optional[bool]=None,
+ can_manage_direct_messages: Optional[bool]=None) -> bool:
+ """
+ Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator
+ in the chat for this to work and must have the appropriate admin rights.
+ Pass False for all boolean parameters to demote a user.
+
+ Telegram documentation: https://core.telegram.org/bots/api#promotechatmember
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (
+ in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param can_change_info: Pass True, if the administrator can change chat title, photo and other settings
+ :type can_change_info: :obj:`bool`
+
+ :param can_post_messages: Pass True, if the administrator can create channel posts, channels only
+ :type can_post_messages: :obj:`bool`
+
+ :param can_edit_messages: Pass True, if the administrator can edit messages of other users, channels only
+ :type can_edit_messages: :obj:`bool`
+
+ :param can_delete_messages: Pass True, if the administrator can delete messages of other users
+ :type can_delete_messages: :obj:`bool`
+
+ :param can_invite_users: Pass True, if the administrator can invite new users to the chat
+ :type can_invite_users: :obj:`bool`
+
+ :param can_restrict_members: Pass True, if the administrator can restrict, ban or unban chat members
+ :type can_restrict_members: :obj:`bool`
+
+ :param can_pin_messages: Pass True, if the administrator can pin messages, supergroups only
+ :type can_pin_messages: :obj:`bool`
+
+ :param can_promote_members: Pass True, if the administrator can add new administrators with a subset
+ of his own privileges or demote administrators that he has promoted, directly or indirectly
+ (promoted by administrators that were appointed by him)
+ :type can_promote_members: :obj:`bool`
+
+ :param is_anonymous: Pass True, if the administrator's presence in the chat is hidden
+ :type is_anonymous: :obj:`bool`
+
+ :param can_manage_chat: Pass True, if the administrator can access the chat event log, chat statistics,
+ message statistics in channels, see channel members,
+ see anonymous administrators in supergroups and ignore slow mode.
+ Implied by any other administrator privilege
+ :type can_manage_chat: :obj:`bool`
+
+ :param can_manage_video_chats: Pass True, if the administrator can manage voice chats
+ For now, bots can use this privilege only for passing to other administrators.
+ :type can_manage_video_chats: :obj:`bool`
+
+ :param can_manage_voice_chats: Deprecated, use can_manage_video_chats.
+ :type can_manage_voice_chats: :obj:`bool`
+
+ :param can_manage_topics: Pass True if the user is allowed to create, rename, close,
+ and reopen forum topics, supergroups only
+ :type can_manage_topics: :obj:`bool`
+
+ :param can_post_stories: Pass True if the administrator can create the channel's stories
+ :type can_post_stories: :obj:`bool`
+
+ :param can_edit_stories: Pass True if the administrator can edit the channel's stories
+ :type can_edit_stories: :obj:`bool`
+
+ :param can_delete_stories: Pass True if the administrator can delete the channel's stories
+ :type can_delete_stories: :obj:`bool`
+
+ :param can_manage_direct_messages: Pass True if the administrator can manage direct messages
+ within the channel and decline suggested posts; for channels only
+ :type can_manage_direct_messages: :obj:`bool`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+
+ if can_manage_voice_chats is not None:
+ logger.warning('The parameter "can_manage_voice_chats" is deprecated. Use "can_manage_video_chats" instead.')
+ if can_manage_video_chats is None:
+ can_manage_video_chats = can_manage_voice_chats
+
+ return await asyncio_helper.promote_chat_member(
+ self.token, chat_id, user_id, can_change_info, can_post_messages,
+ can_edit_messages, can_delete_messages, can_invite_users,
+ can_restrict_members, can_pin_messages, can_promote_members,
+ is_anonymous, can_manage_chat, can_manage_video_chats, can_manage_topics,
+ can_post_stories, can_edit_stories, can_delete_stories, can_manage_direct_messages=can_manage_direct_messages
+ )
+
+ async def set_chat_administrator_custom_title(
+ self, chat_id: Union[int, str], user_id: int, custom_title: str) -> bool:
+ """
+ Use this method to set a custom title for an administrator in a supergroup promoted by the bot.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatadministratorcustomtitle
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup
+ (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param custom_title: New custom title for the administrator;
+ 0-16 characters, emoji are not allowed
+ :type custom_title: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_chat_administrator_custom_title(self.token, chat_id, user_id, custom_title)
+
+
+ async def ban_chat_sender_chat(self, chat_id: Union[int, str], sender_chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to ban a channel chat in a supergroup or a channel.
+ The owner of the chat will not be able to send messages and join live
+ streams on behalf of the chat, unless it is unbanned first.
+ The bot must be an administrator in the supergroup or channel
+ for this to work and must have the appropriate administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#banchatsenderchat
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param sender_chat_id: Unique identifier of the target sender chat
+ :type sender_chat_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.ban_chat_sender_chat(self.token, chat_id, sender_chat_id)
+
+ async def unban_chat_sender_chat(self, chat_id: Union[int, str], sender_chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to unban a previously banned channel chat in a supergroup or channel.
+ The bot must be an administrator for this to work and must have the appropriate
+ administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unbanchatsenderchat
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param sender_chat_id: Unique identifier of the target sender chat.
+ :type sender_chat_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.unban_chat_sender_chat(self.token, chat_id, sender_chat_id)
+
+ async def set_chat_permissions(
+ self, chat_id: Union[int, str], permissions: types.ChatPermissions,
+ use_independent_chat_permissions: Optional[bool]=None) -> bool:
+ """
+ Use this method to set default chat permissions for all members.
+ The bot must be an administrator in the group or a supergroup for this to work
+ and must have the can_restrict_members admin rights.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatpermissions
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup
+ (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param permissions: New default chat permissions
+ :type permissions: :class:`telebot.types..ChatPermissions`
+
+ :param use_independent_chat_permissions: Pass True if chat permissions are set independently. Otherwise,
+ the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages,
+ can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and
+ can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission.
+ :type use_independent_chat_permissions: :obj:`bool`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_chat_permissions(self.token, chat_id, permissions, use_independent_chat_permissions)
+
+ async def create_chat_invite_link(
+ self, chat_id: Union[int, str],
+ name: Optional[str]=None,
+ expire_date: Optional[Union[int, datetime]]=None,
+ member_limit: Optional[int]=None,
+ creates_join_request: Optional[bool]=None) -> types.ChatInviteLink:
+ """
+ Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and
+ must have the appropriate administrator rights.
+ The link can be revoked using the method revokeChatInviteLink.
+ Returns the new invite link as ChatInviteLink object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#createchatinvitelink
+
+ :param chat_id: Id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param name: Invite link name; 0-32 characters
+ :type name: :obj:`str`
+
+ :param expire_date: Point in time (Unix timestamp) when the link will expire
+ :type expire_date: :obj:`int` or :obj:`datetime`
+
+ :param member_limit: Maximum number of users that can be members of the chat simultaneously
+ :type member_limit: :obj:`int`
+
+ :param creates_join_request: True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified
+ :type creates_join_request: :obj:`bool`
+
+ :return: Returns the new invite link as ChatInviteLink object.
+ :rtype: :class:`telebot.types.ChatInviteLink`
+ """
+ return types.ChatInviteLink.de_json(
+ await asyncio_helper.create_chat_invite_link(self.token, chat_id, name, expire_date, member_limit, creates_join_request)
+ )
+
+ async def edit_chat_invite_link(
+ self, chat_id: Union[int, str],
+ invite_link: Optional[str] = None,
+ name: Optional[str]=None,
+ expire_date: Optional[Union[int, datetime]]=None,
+ member_limit: Optional[int]=None,
+ creates_join_request: Optional[bool]=None) -> types.ChatInviteLink:
+ """
+ Use this method to edit a non-primary invite link created by the bot.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editchatinvitelink
+
+ :param chat_id: Id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param name: Invite link name; 0-32 characters
+ :type name: :obj:`str`
+
+ :param invite_link: The invite link to edit
+ :type invite_link: :obj:`str`
+
+ :param expire_date: Point in time (Unix timestamp) when the link will expire
+ :type expire_date: :obj:`int` or :obj:`datetime`
+
+ :param member_limit: Maximum number of users that can be members of the chat simultaneously
+ :type member_limit: :obj:`int`
+
+ :param creates_join_request: True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified
+ :type creates_join_request: :obj:`bool`
+
+ :return: Returns the new invite link as ChatInviteLink object.
+ :rtype: :class:`telebot.types.ChatInviteLink`
+ """
+ return types.ChatInviteLink.de_json(
+ await asyncio_helper.edit_chat_invite_link(self.token, chat_id, invite_link, name, expire_date, member_limit, creates_join_request)
+ )
+
+ async def create_chat_subscription_invite_link(
+ self, chat_id: Union[int, str], subscription_period: int, subscription_price: int,
+ name: Optional[str]=None) -> types.ChatInviteLink:
+ """
+ Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights.
+ The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink.
+ Returns the new invite link as a ChatInviteLink object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#createchatsubscriptioninvitelink
+
+ :param chat_id: Unique identifier for the target channel chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param name: Invite link name; 0-32 characters
+ :type name: :obj:`str`
+
+ :param subscription_period: The number of seconds the subscription will be active for before the next payment.
+ Currently, it must always be 2592000 (30 days).
+ :type subscription_period: :obj:`int`
+
+ :param subscription_price: The amount of Telegram Stars a user must pay initially and after each subsequent
+ subscription period to be a member of the chat; 1-2500
+ :type subscription_price: :obj:`int`
+
+ :return: Returns the new invite link as a ChatInviteLink object.
+ :rtype: :class:`telebot.types.ChatInviteLink`
+ """
+ return types.ChatInviteLink.de_json(
+ await asyncio_helper.create_chat_subscription_invite_link(self.token, chat_id, subscription_period, subscription_price, name=name)
+ )
+
+ async def edit_chat_subscription_invite_link(
+ self, chat_id: Union[int, str], invite_link: str, name: Optional[str]=None) -> types.ChatInviteLink:
+ """
+ Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights.
+ Returns the edited invite link as a ChatInviteLink object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editchatsubscriptioninvitelink
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param invite_link: The invite link to edit
+ :type invite_link: :obj:`str`
+
+ :param name: Invite link name; 0-32 characters
+ :type name: :obj:`str`
+
+ :return: Returns the edited invite link as a ChatInviteLink object.
+ :rtype: :class:`telebot.types.ChatInviteLink`
+ """
+ return types.ChatInviteLink.de_json(
+ await asyncio_helper.edit_chat_subscription_invite_link(self.token, chat_id, invite_link, name=name)
+ )
+
+ async def revoke_chat_invite_link(
+ self, chat_id: Union[int, str], invite_link: str) -> types.ChatInviteLink:
+ """
+ Use this method to revoke an invite link created by the bot.
+ Note: If the primary link is revoked, a new link is automatically generated The bot must be an administrator
+ in the chat for this to work and must have the appropriate admin rights.
+
+ Telegram documentation: https://core.telegram.org/bots/api#revokechatinvitelink
+
+ :param chat_id: Id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param invite_link: The invite link to revoke
+ :type invite_link: :obj:`str`
+
+ :return: Returns the new invite link as ChatInviteLink object.
+ :rtype: :class:`telebot.types.ChatInviteLink`
+ """
+ return types.ChatInviteLink.de_json(
+ await asyncio_helper.revoke_chat_invite_link(self.token, chat_id, invite_link)
+ )
+
+ async def export_chat_invite_link(self, chat_id: Union[int, str]) -> str:
+ """
+ Use this method to export an invite link to a supergroup or a channel. The bot must be an administrator
+ in the chat for this to work and must have the appropriate admin rights.
+
+ Telegram documentation: https://core.telegram.org/bots/api#exportchatinvitelink
+
+ :param chat_id: Id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: exported invite link as String on success.
+ :rtype: :obj:`str`
+ """
+ return await asyncio_helper.export_chat_invite_link(self.token, chat_id)
+
+
+ async def approve_chat_join_request(self, chat_id: Union[str, int], user_id: Union[int, str]) -> bool:
+ """
+ Use this method to approve a chat join request.
+ The bot must be an administrator in the chat for this to work and must have
+ the can_invite_users administrator right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#approvechatjoinrequest
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup
+ (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.approve_chat_join_request(self.token, chat_id, user_id)
+
+ async def decline_chat_join_request(self, chat_id: Union[str, int], user_id: Union[int, str]) -> bool:
+ """
+ Use this method to decline a chat join request.
+ The bot must be an administrator in the chat for this to work and must have
+ the can_invite_users administrator right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#declinechatjoinrequest
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup
+ (in the format @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.decline_chat_join_request(self.token, chat_id, user_id)
+
+ async def set_chat_photo(self, chat_id: Union[int, str], photo: Any) -> bool:
+ """
+ Use this method to set a new profile photo for the chat. Photos can't be changed for private chats.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+ Note: In regular groups (non-supergroups), this method will only work if the ‘All Members Are Admins’
+ setting is off in the target group.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatphoto
+
+ :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param photo: InputFile: New chat photo, uploaded using multipart/form-data
+ :type photo: :obj:`typing.Union[file_like, str]`
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_chat_photo(self.token, chat_id, photo)
+
+ async def delete_chat_photo(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to delete a chat photo. Photos can't be changed for private chats.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+ Note: In regular groups (non-supergroups), this method will only work if the ‘All Members Are Admins’ setting is off in the target group.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletechatphoto
+
+ :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.delete_chat_photo(self.token, chat_id)
+
+ async def set_my_description(self, description: Optional[str]=None, language_code: Optional[str]=None):
+ """
+ Use this method to change the bot's description, which is shown in
+ the chat with the bot if the chat is empty.
+ Returns True on success.
+
+ :param description: New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.
+ :type description: :obj:`str`
+
+ :param language_code: A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for
+ whose language there is no dedicated description.
+ :type language_code: :obj:`str`
+
+ :return: True on success.
+ """
+
+ return await asyncio_helper.set_my_description(self.token, description, language_code)
+
+ async def get_my_description(self, language_code: Optional[str]=None):
+ """
+ Use this method to get the current bot description for the given user language.
+ Returns BotDescription on success.
+
+ :param language_code: A two-letter ISO 639-1 language code or an empty string
+ :type language_code: :obj:`str`
+
+ :return: :class:`telebot.types.BotDescription`
+ """
+ result = await asyncio_helper.get_my_description(self.token, language_code)
+ return types.BotDescription.de_json(result)
+
+ async def set_my_short_description(self, short_description:Optional[str]=None, language_code:Optional[str]=None):
+ """
+ Use this method to change the bot's short description, which is shown on the bot's profile page and
+ is sent together with the link when users share the bot.
+ Returns True on success.
+
+ :param short_description: New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.
+ :type short_description: :obj:`str`
+
+ :param language_code: A two-letter ISO 639-1 language code.
+ If empty, the short description will be applied to all users for whose language there is no dedicated short description.
+ :type language_code: :obj:`str`
+
+ :return: True on success.
+ """
+
+ return await asyncio_helper.set_my_short_description(self.token, short_description, language_code)
+
+ async def get_my_short_description(self, language_code: Optional[str]=None):
+ """
+ Use this method to get the current bot short description for the given user language.
+ Returns BotShortDescription on success.
+
+ :param language_code: A two-letter ISO 639-1 language code or an empty string
+ :type language_code: :obj:`str`
+
+ :return: :class:`telebot.types.BotShortDescription`
+ """
+ result = await asyncio_helper.get_my_short_description(self.token, language_code)
+ return types.BotShortDescription.de_json(result)
+
+ async def get_my_commands(self, scope: Optional[types.BotCommandScope],
+ language_code: Optional[str]) -> List[types.BotCommand]:
+ """
+ Use this method to get the current list of the bot's commands.
+ Returns List of BotCommand on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getmycommands
+
+ :param scope: The scope of users for which the commands are relevant.
+ Defaults to BotCommandScopeDefault.
+ :type scope: :class:`telebot.types.BotCommandScope`
+
+ :param language_code: A two-letter ISO 639-1 language code. If empty,
+ commands will be applied to all users from the given scope,
+ for whose language there are no dedicated commands
+ :type language_code: :obj:`str`
+
+ :return: List of BotCommand on success.
+ :rtype: :obj:`list` of :class:`telebot.types.BotCommand`
+ """
+ result = await asyncio_helper.get_my_commands(self.token, scope, language_code)
+ return [types.BotCommand.de_json(cmd) for cmd in result]
+
+ async def set_my_name(self, name: Optional[str]=None, language_code: Optional[str]=None):
+ """
+ Use this method to change the bot's name. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setmyname
+
+ :param name: Optional. New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.
+ :type name: :obj:`str`
+
+ :param language_code: Optional. A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose
+ language there is no dedicated name.
+ :type language_code: :obj:`str`
+
+ :return: True on success.
+ """
+
+ return await asyncio_helper.set_my_name(self.token, name, language_code)
+
+ async def get_my_name(self, language_code: Optional[str]=None):
+ """
+ Use this method to get the current bot name for the given user language.
+ Returns BotName on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getmyname
+
+ :param language_code: Optional. A two-letter ISO 639-1 language code or an empty string
+ :type language_code: :obj:`str`
+
+ :return: :class:`telebot.types.BotName`
+ """
+
+ result = await asyncio_helper.get_my_name(self.token, language_code)
+ return types.BotName.de_json(result)
+
+ async def set_chat_menu_button(self, chat_id: Union[int, str]=None,
+ menu_button: types.MenuButton=None) -> bool:
+ """
+ Use this method to change the bot's menu button in a private chat,
+ or the default menu button.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatmenubutton
+
+ :param chat_id: Unique identifier for the target private chat.
+ If not specified, default bot's menu button will be changed.
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param menu_button: A JSON-serialized object for the new bot's menu button. Defaults to MenuButtonDefault
+ :type menu_button: :class:`telebot.types.MenuButton`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_chat_menu_button(self.token, chat_id, menu_button)
+
+
+ async def get_chat_menu_button(self, chat_id: Union[int, str]=None) -> types.MenuButton:
+ """
+ Use this method to get the current value of the bot's menu button
+ in a private chat, or the default menu button.
+ Returns MenuButton on success.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#getchatmenubutton
+
+ :param chat_id: Unique identifier for the target private chat.
+ If not specified, default bot's menu button will be returned.
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: types.MenuButton
+ :rtype: :class:`telebot.types.MenuButton`
+ """
+ return types.MenuButton.de_json(await asyncio_helper.get_chat_menu_button(self.token, chat_id))
+
+
+ async def set_my_default_administrator_rights(self, rights: types.ChatAdministratorRights=None,
+ for_channels: bool=None) -> bool:
+ """
+ Use this method to change the default administrator rights requested by the bot
+ when it's added as an administrator to groups or channels.
+ These rights will be suggested to users, but they are are free to modify
+ the list before adding the bot.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setmydefaultadministratorrights
+
+ :param rights: A JSON-serialized object describing new default administrator rights. If not specified,
+ the default administrator rights will be cleared.
+ :type rights: :class:`telebot.types.ChatAdministratorRights`
+
+ :param for_channels: Pass True to change the default administrator rights of the bot in channels.
+ Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.
+ :type for_channels: :obj:`bool`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+
+ return await asyncio_helper.set_my_default_administrator_rights(self.token, rights, for_channels)
+
+
+ async def get_my_default_administrator_rights(self, for_channels: bool=None) -> types.ChatAdministratorRights:
+ """
+ Use this method to get the current default administrator rights of the bot.
+ Returns ChatAdministratorRights on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getmydefaultadministratorrights
+
+ :param for_channels: Pass True to get the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be returned.
+ :type for_channels: :obj:`bool`
+
+ :return: Returns ChatAdministratorRights on success.
+ :rtype: :class:`telebot.types.ChatAdministratorRights`
+ """
+
+ return types.ChatAdministratorRights.de_json(await asyncio_helper.get_my_default_administrator_rights(self.token, for_channels))
+
+ async def get_business_connection(self, business_connection_id: str) -> types.BusinessConnection:
+ """
+ Use this method to get information about the connection of the bot with a business account.
+ Returns a BusinessConnection object on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getbusinessconnection
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: Returns a BusinessConnection object on success.
+ :rtype: :class:`telebot.types.BusinessConnection`
+ """
+ result = await asyncio_helper.get_business_connection(self.token, business_connection_id)
+
+ return types.BusinessConnection.de_json(
+ result
+ )
+
+
+ async def set_my_commands(self, commands: List[types.BotCommand],
+ scope: Optional[types.BotCommandScope]=None,
+ language_code: Optional[str]=None) -> bool:
+ """
+ Use this method to change the list of the bot's commands.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setmycommands
+
+ :param commands: List of BotCommand. At most 100 commands can be specified.
+ :type commands: :obj:`list` of :class:`telebot.types.BotCommand`
+
+ :param scope: The scope of users for which the commands are relevant.
+ Defaults to BotCommandScopeDefault.
+ :type scope: :class:`telebot.types.BotCommandScope`
+
+ :param language_code: A two-letter ISO 639-1 language code. If empty,
+ commands will be applied to all users from the given scope,
+ for whose language there are no dedicated commands
+ :type language_code: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_my_commands(self.token, commands, scope, language_code)
+
+ async def delete_my_commands(self, scope: Optional[types.BotCommandScope]=None,
+ language_code: Optional[int]=None) -> bool:
+ """
+ Use this method to delete the list of the bot's commands for the given scope and user language.
+ After deletion, higher level commands will be shown to affected users.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletemycommands
+
+ :param scope: The scope of users for which the commands are relevant.
+ Defaults to BotCommandScopeDefault.
+ :type scope: :class:`telebot.types.BotCommandScope`
+
+ :param language_code: A two-letter ISO 639-1 language code. If empty,
+ commands will be applied to all users from the given scope,
+ for whose language there are no dedicated commands
+ :type language_code: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.delete_my_commands(self.token, scope, language_code)
+
+ async def set_chat_title(self, chat_id: Union[int, str], title: str) -> bool:
+ """
+ Use this method to change the title of a chat. Titles can't be changed for private chats.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+ Note: In regular groups (non-supergroups), this method will only work if the ‘All Members Are Admins’
+ setting is off in the target group.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchattitle
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param title: New chat title, 1-255 characters
+ :type title: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_chat_title(self.token, chat_id, title)
+
+ async def set_chat_description(self, chat_id: Union[int, str], description: Optional[str]=None) -> bool:
+ """
+ Use this method to change the description of a supergroup or a channel.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setchatdescription
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param description: Str: New chat description, 0-255 characters
+ :type description: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_chat_description(self.token, chat_id, description)
+
+ async def pin_chat_message(
+ self, chat_id: Union[int, str], message_id: int,
+ disable_notification: Optional[bool]=False, business_connection_id: Optional[str]=None) -> bool:
+ """
+ Use this method to pin a message in a supergroup.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#pinchatmessage
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Identifier of a message to pin
+ :type message_id: :obj:`int`
+
+ :param disable_notification: Pass True, if it is not necessary to send a notification
+ to all group members about the new pinned message
+ :type disable_notification: :obj:`bool`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+
+ return await asyncio_helper.pin_chat_message(self.token, chat_id, message_id, disable_notification, business_connection_id)
+
+ async def unpin_chat_message(self, chat_id: Union[int, str], message_id: Optional[int]=None, business_connection_id: Optional[str]=None) -> bool:
+ """
+ Use this method to unpin specific pinned message in a supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unpinchatmessage
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Int: Identifier of a message to unpin
+ :type message_id: :obj:`int`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.unpin_chat_message(self.token, chat_id, message_id, business_connection_id)
+
+ async def unpin_all_chat_messages(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to unpin a all pinned messages in a supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unpinallchatmessages
+
+ :param chat_id: Int or Str: Unique identifier for the target chat or username of the target channel
+ (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.unpin_all_chat_messages(self.token, chat_id)
+
+ async def edit_message_text(
+ self, text: str,
+ chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ entities: Optional[List[types.MessageEntity]]=None,
+ disable_web_page_preview: Optional[bool]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ link_preview_options: Optional[types.LinkPreviewOptions]=None,
+ business_connection_id: Optional[str]=None,
+ timeout: Optional[int]=None) -> Union[types.Message, bool]:
+ """
+ Use this method to edit text and game messages.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagetext
+
+ :param text: New text of the message, 1-4096 characters after entities parsing
+ :type text: :obj:`str`
+
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the sent message
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the message text.
+ :type parse_mode: :obj:`str`
+
+ :param entities: List of special entities that appear in the message text, which can be specified instead of parse_mode
+ :type entities: List of :obj:`telebot.types.MessageEntity`
+
+ :param disable_web_page_preview: Deprecated - Use link_preview_options instead.
+ :type disable_web_page_preview: :obj:`bool`
+
+ :param reply_markup: A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :obj:`InlineKeyboardMarkup`
+
+ :param link_preview_options: A JSON-serialized object for options used to automatically generate Telegram link previews for messages.
+ :type link_preview_options: :obj:`LinkPreviewOptions`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :return: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
+ :rtype: :obj:`types.Message` or :obj:`bool`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+ disable_web_page_preview = self.disable_web_page_preview if (disable_web_page_preview is None) else disable_web_page_preview
+
+ if disable_web_page_preview is not None:
+ if link_preview_options:
+ # show a conflict warning
+ logger.warning("Both 'link_preview_options' and 'disable_web_page_preview' parameters are set: conflicting, 'disable_web_page_preview' is deprecated")
+ else:
+ # create a LinkPreviewOptions object
+ link_preview_options = types.LinkPreviewOptions(
+ is_disabled=disable_web_page_preview
+ )
+
+ if link_preview_options and (link_preview_options.is_disabled is None):
+ link_preview_options.is_disabled = self.disable_web_page_preview
+
+ # Fix preview link options if link_preview_options not provided. Get param from class
+ if not link_preview_options and self.disable_web_page_preview:
+ # create a LinkPreviewOptions object
+ link_preview_options = types.LinkPreviewOptions(is_disabled=self.disable_web_page_preview)
+
+ result = await asyncio_helper.edit_message_text(
+ self.token, text, chat_id, message_id, inline_message_id, parse_mode, entities, reply_markup,
+ link_preview_options, business_connection_id, timeout)
+ if isinstance(result, bool): # if edit inline message return is bool not Message.
+ return result
+ return types.Message.de_json(result)
+
+ async def edit_message_media(
+ self, media: Any, chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ business_connection_id: Optional[str]=None,
+ timeout: Optional[int]=None) -> Union[types.Message, bool]:
+ """
+ Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages.
+ If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise.
+ When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL.
+ On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
+ Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagemedia
+
+ :param media: A JSON-serialized object for a new media content of the message
+ :type media: :obj:`InputMedia`
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the sent message
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :param reply_markup: A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :obj:`telebot.types.InlineKeyboardMarkup` or :obj:`ReplyKeyboardMarkup` or :obj:`ReplyKeyboardRemove` or :obj:`ForceReply`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :return: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
+ :rtype: :obj:`types.Message` or :obj:`bool`
+ """
+ result = await asyncio_helper.edit_message_media(
+ self.token, media, chat_id, message_id, inline_message_id, reply_markup, business_connection_id, timeout)
+ if isinstance(result, bool): # if edit inline message return is bool not Message.
+ return result
+ return types.Message.de_json(result)
+
+ async def edit_message_reply_markup(
+ self, chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ business_connection_id: Optional[str]=None,
+ timeout: Optional[int]=None) -> Union[types.Message, bool]:
+ """
+ Use this method to edit only the reply markup of messages.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagereplymarkup
+
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the sent message
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :param reply_markup: A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :obj:`InlineKeyboardMarkup` or :obj:`ReplyKeyboardMarkup` or :obj:`ReplyKeyboardRemove` or :obj:`ForceReply`
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :return: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
+ :rtype: :obj:`types.Message` or :obj:`bool`
+ """
+ result = await asyncio_helper.edit_message_reply_markup(
+ self.token, chat_id, message_id, inline_message_id, reply_markup, business_connection_id, timeout)
+ if isinstance(result, bool):
+ return result
+ return types.Message.de_json(result)
+
+ async def send_game(
+ self, chat_id: Union[int, str], game_short_name: str,
+ disable_notification: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None) -> types.Message:
+ """
+ Used to send the game.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendgame
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via @BotFather.
+ :type game_short_name: :obj:`str`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :obj:`InlineKeyboardMarkup` or :obj:`ReplyKeyboardMarkup` or :obj:`ReplyKeyboardRemove` or :obj:`ForceReply`
+
+ :param timeout: Timeout in seconds for waiting for a response from the bot.
+ :type timeout: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if one of the specified replied-to messages is not found.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param protect_content: Pass True, if content of the message needs to be protected from being viewed by the bot.
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: Identifier of the thread to which the message will be sent.
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of the business connection.
+ :type business_connection_id: :obj:`str`
+
+ :param message_effect_id: Identifier of the message effect.
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :obj:`types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ result = await asyncio_helper.send_game(
+ self.token, chat_id, game_short_name, disable_notification,
+ reply_markup, timeout,
+ protect_content, message_thread_id, reply_parameters, business_connection_id, message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast)
+ return types.Message.de_json(result)
+
+ async def set_game_score(
+ self, user_id: Union[int, str], score: int,
+ force: Optional[bool]=None,
+ chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ disable_edit_message: Optional[bool]=None) -> Union[types.Message, bool]:
+ """
+ Sets the value of points in the game to a specific user.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setgamescore
+
+ :param user_id: User identifier
+ :type user_id: :obj:`int` or :obj:`str`
+
+ :param score: New score, must be non-negative
+ :type score: :obj:`int`
+
+ :param force: Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters
+ :type force: :obj:`bool`
+
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the sent message
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :param disable_edit_message: Pass True, if the game message should not be automatically edited to include the current scoreboard
+ :type disable_edit_message: :obj:`bool`
+
+ :return: On success, if the message was sent by the bot, returns the edited Message, otherwise returns True.
+ :rtype: :obj:`types.Message` or :obj:`bool`
+ """
+ result = await asyncio_helper.set_game_score(self.token, user_id, score, force, disable_edit_message, chat_id,
+ message_id, inline_message_id)
+ if isinstance(result, bool):
+ return result
+ return types.Message.de_json(result)
+
+ async def get_game_high_scores(
+ self, user_id: int, chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None) -> List[types.GameHighScore]:
+ """
+ Use this method to get data for high score tables. Will return the score of the specified user and several of
+ their neighbors in a game. On success, returns an Array of GameHighScore objects.
+
+ This method will currently return scores for the target user, plus two of their closest neighbors on each side.
+ Will also return the top three users if the user and their neighbors are not among them.
+ Please note that this behavior is subject to change.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getgamehighscores
+
+ :param user_id: User identifier
+ :type user_id: :obj:`int`
+
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified. Identifier of the sent message
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if chat_id and message_id are not specified. Identifier of the inline message
+ :type inline_message_id: :obj:`str`
+
+ :return: On success, returns an Array of GameHighScore objects.
+ :rtype: List[types.GameHighScore]
+ """
+ result = await asyncio_helper.get_game_high_scores(self.token, user_id, chat_id, message_id, inline_message_id)
+ return [types.GameHighScore.de_json(r) for r in result]
+
+ async def send_invoice(
+ self, chat_id: Union[int, str], title: str, description: str,
+ invoice_payload: str, provider_token: Union[str, None], currency: str,
+ prices: List[types.LabeledPrice], start_parameter: Optional[str]=None,
+ photo_url: Optional[str]=None, photo_size: Optional[int]=None,
+ photo_width: Optional[int]=None, photo_height: Optional[int]=None,
+ need_name: Optional[bool]=None, need_phone_number: Optional[bool]=None,
+ need_email: Optional[bool]=None, need_shipping_address: Optional[bool]=None,
+ send_phone_number_to_provider: Optional[bool]=None,
+ send_email_to_provider: Optional[bool]=None,
+ is_flexible: Optional[bool]=None,
+ disable_notification: Optional[bool]=None,
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ provider_data: Optional[str]=None,
+ timeout: Optional[int]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ max_tip_amount: Optional[int] = None,
+ suggested_tip_amounts: Optional[List[int]]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None,
+ direct_messages_topic_id: Optional[int]=None,
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None) -> types.Message:
+ """
+ Sends invoice.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendinvoice
+
+ :param chat_id: Unique identifier for the target private chat
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param title: Product name, 1-32 characters
+ :type title: :obj:`str`
+
+ :param description: Product description, 1-255 characters
+ :type description: :obj:`str`
+
+ :param invoice_payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user,
+ use for your internal processes.
+ :type invoice_payload: :obj:`str`
+
+ :param provider_token: Payments provider token, obtained via @Botfather; Pass None to omit the parameter
+ to use "XTR" currency
+ :type provider_token: :obj:`str`
+
+ :param currency: Three-letter ISO 4217 currency code,
+ see https://core.telegram.org/bots/payments#supported-currencies
+ :type currency: :obj:`str`
+
+ :param prices: Price breakdown, a list of components
+ (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
+ :type prices: List[:obj:`types.LabeledPrice`]
+
+ :param start_parameter: Unique deep-linking parameter that can be used to generate this invoice
+ when used as a start parameter
+ :type start_parameter: :obj:`str`
+
+ :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods
+ or a marketing image for a service. People like it better when they see what they are paying for.
+ :type photo_url: :obj:`str`
+
+ :param photo_size: Photo size in bytes
+ :type photo_size: :obj:`int`
+
+ :param photo_width: Photo width
+ :type photo_width: :obj:`int`
+
+ :param photo_height: Photo height
+ :type photo_height: :obj:`int`
+
+ :param need_name: Pass True, if you require the user's full name to complete the order
+ :type need_name: :obj:`bool`
+
+ :param need_phone_number: Pass True, if you require the user's phone number to complete the order
+ :type need_phone_number: :obj:`bool`
+
+ :param need_email: Pass True, if you require the user's email to complete the order
+ :type need_email: :obj:`bool`
+
+ :param need_shipping_address: Pass True, if you require the user's shipping address to complete the order
+ :type need_shipping_address: :obj:`bool`
+
+ :param is_flexible: Pass True, if the final price depends on the shipping method
+ :type is_flexible: :obj:`bool`
+
+ :param send_phone_number_to_provider: Pass True, if user's phone number should be sent to provider
+ :type send_phone_number_to_provider: :obj:`bool`
+
+ :param send_email_to_provider: Pass True, if user's email address should be sent to provider
+ :type send_email_to_provider: :obj:`bool`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param reply_markup: A JSON-serialized object for an inline keyboard. If empty,
+ one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button
+ :type reply_markup: :obj:`str`
+
+ :param provider_data: A JSON-serialized data about the invoice, which will be shared with the payment provider.
+ A detailed description of required fields should be provided by the payment provider.
+ :type provider_data: :obj:`str`
+
+ :param timeout: Timeout of a request, defaults to None
+ :type timeout: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the message should be sent even if the specified replied-to message is not found
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param max_tip_amount: The maximum accepted amount for tips in the smallest units of the currency
+ :type max_tip_amount: :obj:`int`
+
+ :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the smallest
+ units of the currency. At most 4 suggested tip amounts can be specified. The suggested tip
+ amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
+ :type suggested_tip_amounts: :obj:`list` of :obj:`int`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The identifier of a message thread, in which the invoice message will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param message_effect_id: The identifier of a message effect to be applied to the message
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
+ required if the message is sent to a direct messages chat
+ :type direct_messages_topic_id: :obj:`int`
+
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
+ is automatically declined.
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :obj:`types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ result = await asyncio_helper.send_invoice(
+ self.token, chat_id, title, description, invoice_payload, provider_token,
+ currency, prices, start_parameter, photo_url, photo_size, photo_width,
+ photo_height, need_name, need_phone_number, need_email, need_shipping_address,
+ send_phone_number_to_provider, send_email_to_provider, is_flexible, disable_notification,
+ reply_markup, provider_data, timeout,
+ max_tip_amount, suggested_tip_amounts, protect_content, message_thread_id, reply_parameters,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
+ direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters
+ )
+ return types.Message.de_json(result)
+
+
+ async def create_invoice_link(self,
+ title: str, description: str, payload:str, provider_token: Union[str, None],
+ currency: str, prices: List[types.LabeledPrice],
+ max_tip_amount: Optional[int] = None,
+ suggested_tip_amounts: Optional[List[int]]=None,
+ provider_data: Optional[str]=None,
+ photo_url: Optional[str]=None,
+ photo_size: Optional[int]=None,
+ photo_width: Optional[int]=None,
+ photo_height: Optional[int]=None,
+ need_name: Optional[bool]=None,
+ need_phone_number: Optional[bool]=None,
+ need_email: Optional[bool]=None,
+ need_shipping_address: Optional[bool]=None,
+ send_phone_number_to_provider: Optional[bool]=None,
+ send_email_to_provider: Optional[bool]=None,
+ is_flexible: Optional[bool]=None,
+ subscription_period: Optional[int]=None,
+ business_connection_id: Optional[str]=None) -> str:
+
+ """
+ Use this method to create a link for an invoice.
+ Returns the created invoice link as String on success.
+
+ Telegram documentation:
+ https://core.telegram.org/bots/api#createinvoicelink
+
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the link will be created
+ :type business_connection_id: :obj:`str`
+
+ :param title: Product name, 1-32 characters
+ :type title: :obj:`str`
+
+ :param description: Product description, 1-255 characters
+ :type description: :obj:`str`
+
+ :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user,
+ use for your internal processes.
+ :type payload: :obj:`str`
+
+ :param provider_token: Payments provider token, obtained via @Botfather; Pass None to omit the parameter
+ to use "XTR" currency
+ :type provider_token: :obj:`str`
+
+ :param currency: Three-letter ISO 4217 currency code,
+ see https://core.telegram.org/bots/payments#supported-currencies
+ :type currency: :obj:`str`
+
+ :param prices: Price breakdown, a list of components
+ (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
+ :type prices: :obj:`list` of :obj:`types.LabeledPrice`
+
+ :param subscription_period: The number of seconds the subscription will be active for before the next payment.
+ The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always
+ be 2592000 (30 days) if specified.
+ :type subscription_period: :obj:`int`
+
+ :param max_tip_amount: The maximum accepted amount for tips in the smallest units of the currency
+ :type max_tip_amount: :obj:`int`
+
+ :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the smallest
+ units of the currency. At most 4 suggested tip amounts can be specified. The suggested tip
+ amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
+ :type suggested_tip_amounts: :obj:`list` of :obj:`int`
+
+ :param provider_data: A JSON-serialized data about the invoice, which will be shared with the payment provider.
+ A detailed description of required fields should be provided by the payment provider.
+ :type provider_data: :obj:`str`
+
+ :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods
+ or a photo of the invoice. People like it better when they see a photo of what they are paying for.
+ :type photo_url: :obj:`str`
+
+ :param photo_size: Photo size in bytes
+ :type photo_size: :obj:`int`
+
+ :param photo_width: Photo width
+ :type photo_width: :obj:`int`
+
+ :param photo_height: Photo height
+ :type photo_height: :obj:`int`
+
+ :param need_name: Pass True, if you require the user's full name to complete the order
+ :type need_name: :obj:`bool`
+
+ :param need_phone_number: Pass True, if you require the user's phone number to complete the order
+ :type need_phone_number: :obj:`bool`
+
+ :param need_email: Pass True, if you require the user's email to complete the order
+ :type need_email: :obj:`bool`
+
+ :param need_shipping_address: Pass True, if you require the user's shipping address to complete the order
+ :type need_shipping_address: :obj:`bool`
+
+ :param send_phone_number_to_provider: Pass True, if user's phone number should be sent to provider
+ :type send_phone_number_to_provider: :obj:`bool`
+
+ :param send_email_to_provider: Pass True, if user's email address should be sent to provider
+ :type send_email_to_provider: :obj:`bool`
+
+ :param is_flexible: Pass True, if the final price depends on the shipping method
+ :type is_flexible: :obj:`bool`
+
+ :return: Created invoice link as String on success.
+ :rtype: :obj:`str`
+ """
+ result = await asyncio_helper.create_invoice_link(
+ self.token, title, description, payload, provider_token,
+ currency, prices, max_tip_amount, suggested_tip_amounts, provider_data,
+ photo_url, photo_size, photo_width, photo_height, need_name, need_phone_number,
+ need_email, need_shipping_address, send_phone_number_to_provider,
+ send_email_to_provider, is_flexible, subscription_period=subscription_period, business_connection_id=business_connection_id)
+ return result
+
+ # noinspection PyShadowingBuiltins
+ async def send_poll(
+ self, chat_id: Union[int, str], question: str, options: List[Union[str, types.InputPollOption]],
+ is_anonymous: Optional[bool]=None, type: Optional[str]=None,
+ allows_multiple_answers: Optional[bool]=None,
+ correct_option_id: Optional[int]=None,
+ explanation: Optional[str]=None,
+ explanation_parse_mode: Optional[str]=None,
+ open_period: Optional[int]=None,
+ close_date: Optional[Union[int, datetime]]=None,
+ is_closed: Optional[bool]=None,
+ disable_notification: Optional[bool]=False,
+ reply_to_message_id: Optional[int]=None,
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None,
+ allow_sending_without_reply: Optional[bool]=None,
+ timeout: Optional[int]=None,
+ explanation_entities: Optional[List[types.MessageEntity]]=None,
+ protect_content: Optional[bool]=None,
+ message_thread_id: Optional[int]=None,
+ reply_parameters: Optional[types.ReplyParameters]=None,
+ business_connection_id: Optional[str]=None,
+ question_parse_mode: Optional[str] = None,
+ question_entities: Optional[List[types.MessageEntity]] = None,
+ message_effect_id: Optional[str]=None,
+ allow_paid_broadcast: Optional[bool]=None) -> types.Message:
+ """
+ Use this method to send a native poll.
+ On success, the sent Message is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendpoll
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param question: Poll question, 1-300 characters
+ :type question: :obj:`str`
+
+ :param options: A JSON-serialized list of 2-10 answer options
+ :type options: :obj:`list` of :obj:`InputPollOption` | :obj:`list` of :obj:`str`
+
+ :param is_anonymous: True, if the poll needs to be anonymous, defaults to True
+ :type is_anonymous: :obj:`bool`
+
+ :param type: Poll type, “quiz” or “regular”, defaults to “regular”
+ :type type: :obj:`str`
+
+ :param allows_multiple_answers: True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False
+ :type allows_multiple_answers: :obj:`bool`
+
+ :param correct_option_id: 0-based identifier of the correct answer option. Available only for polls in quiz mode,
+ defaults to None
+ :type correct_option_id: :obj:`int`
+
+ :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll,
+ 0-200 characters with at most 2 line feeds after entities parsing
+ :type explanation: :obj:`str`
+
+ :param explanation_parse_mode: Mode for parsing entities in the explanation. See formatting options for more details.
+ :type explanation_parse_mode: :obj:`str`
+
+ :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.
+ :type open_period: :obj:`int`
+
+ :param close_date: Point in time (Unix timestamp) when the poll will be automatically closed.
+ :type close_date: :obj:`int` | :obj:`datetime`
+
+ :param is_closed: Pass True, if the poll needs to be immediately closed. This can be useful for poll preview.
+ :type is_closed: :obj:`bool`
+
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :type disable_notification: :obj:`bool`
+
+ :param reply_to_message_id: Deprecated - Use reply_parameters instead. If the message is a reply, ID of the original message
+ :type reply_to_message_id: :obj:`int`
+
+ :param allow_sending_without_reply: Deprecated - Use reply_parameters instead. Pass True, if the poll allows multiple options to be voted simultaneously.
+ :type allow_sending_without_reply: :obj:`bool`
+
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard,
+ instructions to remove reply keyboard or to force a reply from the user.
+ :type reply_markup: :obj:`InlineKeyboardMarkup` | :obj:`ReplyKeyboardMarkup` | :obj:`ReplyKeyboardRemove` | :obj:`ForceReply`
+
+ :param timeout: Timeout in seconds for waiting for a response from the user.
+ :type timeout: :obj:`int`
+
+ :param explanation_entities: A JSON-serialized list of special entities that appear in the explanation,
+ which can be specified instead of parse_mode
+ :type explanation_entities: :obj:`list` of :obj:`MessageEntity`
+
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :type protect_content: :obj:`bool`
+
+ :param message_thread_id: The identifier of a message thread, in which the poll will be sent
+ :type message_thread_id: :obj:`int`
+
+ :param reply_parameters: Reply parameters.
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
+
+ :param business_connection_id: Identifier of the business connection to send the message through
+ :type business_connection_id: :obj:`str`
+
+ :param question_parse_mode: Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed
+ :type question_parse_mode: :obj:`str`
+
+ :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode
+ :type question_entities: :obj:`list` of :obj:`MessageEntity`
+
+ :param message_effect_id: Identifier of the message effect to apply to the sent message
+ :type message_effect_id: :obj:`str`
+
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
+ :type allow_paid_broadcast: :obj:`bool`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :obj:`types.Message`
+ """
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
+ protect_content = self.protect_content if (protect_content is None) else protect_content
+
+ explanation_parse_mode = self.parse_mode if (explanation_parse_mode is None) else explanation_parse_mode
+ question_parse_mode = self.parse_mode if (question_parse_mode is None) else question_parse_mode
+
+ if allow_sending_without_reply is not None:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_to_message_id:
+ # show a deprecation warning
+ logger.warning("The parameter 'reply_to_message_id' is deprecated. Use 'reply_parameters' instead.")
+
+ if reply_parameters:
+ # show a conflict warning
+ logger.warning("Both 'reply_parameters' and 'reply_to_message_id' parameters are set: conflicting, 'reply_to_message_id' is deprecated")
+ else:
+ # create a ReplyParameters object
+ reply_parameters = types.ReplyParameters(
+ reply_to_message_id,
+ allow_sending_without_reply=self.allow_sending_without_reply if (allow_sending_without_reply is None) else allow_sending_without_reply
+ )
+
+ if reply_parameters and (reply_parameters.allow_sending_without_reply is None):
+ reply_parameters.allow_sending_without_reply = self.allow_sending_without_reply
+
+ if isinstance(question, types.Poll):
+ raise RuntimeError("The send_poll signature was changed, please see send_poll function details.")
+
+ if options and (not isinstance(options[0], types.InputPollOption)):
+ # show a deprecation warning
+ logger.warning("The parameter 'options' changed, should be List[types.InputPollOption], other types are deprecated.")
+ # convert options to appropriate type
+ if isinstance(options[0], str):
+ options = [types.InputPollOption(option) for option in options]
+ elif isinstance(options[0], types.PollOption):
+ options = [types.InputPollOption(option.text, text_entities=option.text_entities) for option in options]
+ else:
+ raise RuntimeError("Type of 'options' items is unknown. Options should be List[types.InputPollOption], other types are deprecated.")
+
+ return types.Message.de_json(
+ await asyncio_helper.send_poll(
+ self.token, chat_id,
+ question, options,
+ is_anonymous, type, allows_multiple_answers, correct_option_id,
+ explanation, explanation_parse_mode, open_period, close_date, is_closed,
+ disable_notification,
+ reply_markup, timeout, explanation_entities, protect_content, message_thread_id, reply_parameters,
+ business_connection_id, question_parse_mode=question_parse_mode, question_entities=question_entities,
+ message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast))
+
+ async def stop_poll(
+ self, chat_id: Union[int, str], message_id: int,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ business_connection_id: Optional[str]=None) -> types.Poll:
+ """
+ Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#stoppoll
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param message_id: Identifier of the original message with the poll
+ :type message_id: :obj:`int`
+
+ :param reply_markup: A JSON-serialized object for a new message markup.
+ :type reply_markup: :obj:`InlineKeyboardMarkup`
+
+ :param business_connection_id: Identifier of the business connection to send the message through
+ :type business_connection_id: :obj:`str`
+
+ :return: On success, the stopped Poll is returned.
+ :rtype: :obj:`types.Poll`
+ """
+ return types.Poll.de_json(await asyncio_helper.stop_poll(self.token, chat_id, message_id, reply_markup, business_connection_id))
+
+ async def answer_shipping_query(
+ self, shipping_query_id: str, ok: bool,
+ shipping_options: Optional[List[types.ShippingOption]]=None,
+ error_message: Optional[str]=None) -> bool:
+ """
+ Asks for an answer to a shipping question.
+
+ Telegram documentation: https://core.telegram.org/bots/api#answershippingquery
+
+ :param shipping_query_id: Unique identifier for the query to be answered
+ :type shipping_query_id: :obj:`str`
+
+ :param ok: Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)
+ :type ok: :obj:`bool`
+
+ :param shipping_options: Required if ok is True. A JSON-serialized array of available shipping options.
+ :type shipping_options: :obj:`list` of :obj:`ShippingOption`
+
+ :param error_message: Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order
+ (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
+ :type error_message: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.answer_shipping_query(self.token, shipping_query_id, ok, shipping_options, error_message)
+
+ async def answer_pre_checkout_query(
+ self, pre_checkout_query_id: str, ok: bool,
+ error_message: Optional[str]=None) -> bool:
+ """
+ Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the
+ field pre_checkout_query. Use this method to respond to such pre-checkout queries.
+ On success, True is returned.
+
+ .. note::
+ The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
+
+ Telegram documentation: https://core.telegram.org/bots/api#answerprecheckoutquery
+
+ :param pre_checkout_query_id: Unique identifier for the query to be answered
+ :type pre_checkout_query_id: :obj:`int`
+
+ :param ok: Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.
+ :type ok: :obj:`bool`
+
+ :param error_message: Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout
+ (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different
+ color or garment!"). Telegram will display this message to the user.
+ :type error_message: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.answer_pre_checkout_query(self.token, pre_checkout_query_id, ok, error_message)
+
+
+ async def get_my_star_balance(self) -> types.StarAmount:
+ """
+ A method to get the current Telegram Stars balance of the bot. Requires no parameters.
+ On success, returns a StarAmount object.
+ """
+ return types.StarAmount.de_json(await asyncio_helper.get_my_star_balance(self.token))
+
+ async def get_star_transactions(self, offset: Optional[int]=None, limit: Optional[int]=None) -> types.StarTransactions:
+ """
+ Returns the bot's Telegram Star transactions in chronological order.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getstartransactions
+
+ :param offset: Number of transactions to skip in the response
+ :type offset: :obj:`int`
+
+ :param limit: The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.
+ :type limit: :obj:`int`
+
+ :return: On success, returns a StarTransactions object.
+ :rtype: :obj:`types.StarTransactions`
+ """
+
+ return types.StarTransactions.de_json(await asyncio_helper.get_star_transactions(self.token, offset, limit))
+
+ async def refund_star_payment(self, user_id: int, telegram_payment_charge_id: str) -> bool:
+ """
+ Refunds a successful payment in Telegram Stars. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#refundstarpayment
+
+ :param user_id: Identifier of the user whose payment will be refunded
+ :type user_id: :obj:`int`
+
+ :param telegram_payment_charge_id: Telegram payment identifier
+ :type telegram_payment_charge_id: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.refund_star_payment(self.token, user_id, telegram_payment_charge_id)
+
+ async def edit_user_star_subscription(self, user_id: int, telegram_payment_charge_id: str, is_canceled: bool) -> bool:
+ """
+ Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#edituserstarsubscription
+
+ :param user_id: Identifier of the user whose subscription will be edited
+ :type user_id: :obj:`int`
+
+ :param telegram_payment_charge_id: Telegram payment identifier for the subscription
+ :type telegram_payment_charge_id: :obj:`str`
+
+ :param is_canceled: Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.
+ :type is_canceled: :obj:`bool`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.edit_user_star_subscription(self.token, user_id, telegram_payment_charge_id, is_canceled)
+
+ async def edit_message_caption(
+ self, caption: str, chat_id: Optional[Union[int, str]]=None,
+ message_id: Optional[int]=None,
+ inline_message_id: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ reply_markup: Optional[types.InlineKeyboardMarkup]=None,
+ show_caption_above_media: Optional[bool]=None,
+ business_connection_id: Optional[str]=None,
+ timeout: Optional[int]=None) -> Union[types.Message, bool]:
+ """
+ Use this method to edit captions of messages.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editmessagecaption
+
+ :param caption: New caption of the message
+ :type caption: :obj:`str`
+
+ :param chat_id: Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param message_id: Required if inline_message_id is not specified.
+ :type message_id: :obj:`int`
+
+ :param inline_message_id: Required if inline_message_id is not specified. Identifier of the inline message.
+ :type inline_message_id: :obj:`str`
+
+ :param parse_mode: New caption of the message, 0-1024 characters after entities parsing
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: A JSON-serialized array of objects that describe how the caption should be parsed.
+ :type caption_entities: :obj:`list` of :obj:`types.MessageEntity`
+
+ :param reply_markup: A JSON-serialized object for an inline keyboard.
+ :type reply_markup: :obj:`InlineKeyboardMarkup`
+
+ :param show_caption_above_media: Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.
+ :type show_caption_above_media: :obj:`bool`
+
+ :param business_connection_id: Identifier of the business connection to send the message through
+ :type business_connection_id: :obj:`str`
+
+ :param timeout: Timeout in seconds for the request.
+ :type timeout: :obj:`int`
+
+ :return: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
+ :rtype: :obj:`types.Message` | :obj:`bool`
+ """
+ parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
+
+ result = await asyncio_helper.edit_message_caption(
+ self.token, caption, chat_id, message_id, inline_message_id, parse_mode, caption_entities, reply_markup,
+ show_caption_above_media=show_caption_above_media, business_connection_id=business_connection_id,
+ timeout=timeout)
+ if isinstance(result, bool):
+ return result
+ return types.Message.de_json(result)
+
+ async def reply_to(self, message: types.Message, text: str, **kwargs) -> types.Message:
+ """
+ Convenience function for `send_message(message.chat.id, text, reply_parameters=(message.message_id...), **kwargs)`
+
+ :param message: Instance of :class:`telebot.types.Message`
+ :type message: :obj:`types.Message`
+
+ :param text: Text of the message.
+ :type text: :obj:`str`
+
+ :param kwargs: Additional keyword arguments which are passed to :meth:`telebot.TeleBot.send_message`
+
+ :return: On success, the sent Message is returned.
+ :rtype: :class:`telebot.types.Message`
+ """
+ if kwargs:
+ reply_parameters = kwargs.pop("reply_parameters", None)
+ if "allow_sending_without_reply" in kwargs:
+ logger.warning("The parameter 'allow_sending_without_reply' is deprecated. Use 'reply_parameters' instead.")
+ else:
+ reply_parameters = None
+
+ if not reply_parameters:
+ reply_parameters = types.ReplyParameters(
+ message.message_id,
+ allow_sending_without_reply=kwargs.pop("allow_sending_without_reply", None) if kwargs else None
+ )
+
+ if not reply_parameters.message_id:
+ reply_parameters.message_id = message.message_id
+
+ return await self.send_message(message.chat.id, text, reply_parameters=reply_parameters, **kwargs)
+
+ async def answer_inline_query(
+ self, inline_query_id: str,
+ results: List[Any],
+ cache_time: Optional[int]=None,
+ is_personal: Optional[bool]=None,
+ next_offset: Optional[str]=None,
+ switch_pm_text: Optional[str]=None,
+ switch_pm_parameter: Optional[str]=None,
+ button: Optional[types.InlineQueryResultsButton]=None) -> bool:
+ """
+ Use this method to send answers to an inline query. On success, True is returned.
+ No more than 50 results per query are allowed.
+
+ Telegram documentation: https://core.telegram.org/bots/api#answerinlinequery
+
+ :param inline_query_id: Unique identifier for the answered query
+ :type inline_query_id: :obj:`str`
+
+ :param results: Array of results for the inline query
+ :type results: :obj:`list` of :obj:`types.InlineQueryResult`
+
+ :param cache_time: The maximum amount of time in seconds that the result of the inline query
+ may be cached on the server.
+ :type cache_time: :obj:`int`
+
+ :param is_personal: Pass True, if results may be cached on the server side only for
+ the user that sent the query.
+ :type is_personal: :obj:`bool`
+
+ :param next_offset: Pass the offset that a client should send in the next query with the same text
+ to receive more results.
+ :type next_offset: :obj:`str`
+
+ :param switch_pm_parameter: Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters,
+ only A-Z, a-z, 0-9, _ and - are allowed.
+ Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly.
+ To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a
+ private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline
+ button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.
+ :type switch_pm_parameter: :obj:`str`
+
+ :param switch_pm_text: Parameter for the start message sent to the bot when user presses the switch button
+ :type switch_pm_text: :obj:`str`
+
+ :param button: A JSON-serialized object describing a button to be shown above inline query results
+ :type button: :obj:`types.InlineQueryResultsButton`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+
+ if not button and (switch_pm_text or switch_pm_parameter):
+ logger.warning("switch_pm_text and switch_pm_parameter are deprecated for answer_inline_query. Use button instead.")
+ button = types.InlineQueryResultsButton(text=switch_pm_text, start_parameter=switch_pm_parameter)
+ return await asyncio_helper.answer_inline_query(self.token, inline_query_id, results, cache_time, is_personal, next_offset,
+ button)
+
+ async def unpin_all_general_forum_topic_messages(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to clear the list of pinned messages in a General forum topic.
+ The bot must be an administrator in the chat for this to work and must have the
+ can_pin_messages administrator right in the supergroup.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unpinAllGeneralForumTopicMessages
+
+ :param chat_id: Unique identifier for the target chat or username of chat
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+
+ return await asyncio_helper.unpin_all_general_forum_topic_messages(self.token, chat_id)
+
+ async def answer_callback_query(
+ self, callback_query_id: int,
+ text: Optional[str]=None, show_alert: Optional[bool]=None,
+ url: Optional[str]=None, cache_time: Optional[int]=None) -> bool:
+ """
+ Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to
+ the user as a notification at the top of the chat screen or as an alert.
+
+ Telegram documentation: https://core.telegram.org/bots/api#answercallbackquery
+
+ :param callback_query_id: Unique identifier for the query to be answered
+ :type callback_query_id: :obj:`int`
+
+ :param text: Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters
+ :type text: :obj:`str`
+
+ :param show_alert: If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
+ :type show_alert: :obj:`bool`
+
+ :param url: URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your
+ game - note that this will only work if the query comes from a callback_game button.
+ :type url: :obj:`str`
+
+ :param cache_time: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching
+ starting in version 3.14. Defaults to 0.
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.answer_callback_query(self.token, callback_query_id, text, show_alert, url, cache_time)
+
+# getUserChatBoosts
+# Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.
+
+# Parameter Type Required Description
+# chat_id Integer or String Yes Unique identifier for the chat or username of the channel (in the format @channelusername)
+# user_id Integer Yes Unique identifier of the target user
+
+ async def get_user_chat_boosts(self, chat_id: Union[int, str], user_id: int) -> types.UserChatBoosts:
+ """
+ Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getuserchatboosts
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :return: On success, a UserChatBoosts object is returned.
+ :rtype: :class:`telebot.types.UserChatBoosts`
+ """
+
+ result = await asyncio_helper.get_user_chat_boosts(self.token, chat_id, user_id)
+ return types.UserChatBoosts.de_json(result)
+
+
+ async def set_sticker_set_thumbnail(self, name: str, user_id: int, thumbnail: Union[Any, str]=None, format: Optional[str]=None) -> bool:
+ """
+ Use this method to set the thumbnail of a sticker set.
+ Animated thumbnails can be set for animated sticker sets only. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setstickersetthumbnail
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param user_id: User identifier
+ :type user_id: :obj:`int`
+
+ :param thumbnail: A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation
+ with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animated-sticker-requirements for animated sticker technical requirements),
+ or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-sticker-requirements for video sticker technical
+ requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from
+ the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via
+ HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.
+ :type thumbnail: :obj:`filelike object`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ if not format:
+ logger.warning("Deprecation warning. 'format' parameter is required in set_sticker_set_thumbnail. Setting format to 'static'.")
+ format = "static"
+ return await asyncio_helper.set_sticker_set_thumbnail(self.token, name, user_id, thumbnail, format)
+
+ @util.deprecated(deprecation_text="Use set_sticker_set_thumbnail instead")
+ async def set_sticker_set_thumb(self, name: str, user_id: int, thumb: Union[Any, str]=None):
+ """
+ Use this method to set the thumbnail of a sticker set.
+ Animated thumbnails can be set for animated sticker sets only. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setstickersetthumb
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param user_id: User identifier
+ :type user_id: :obj:`int`
+
+ :param thumb:
+ :type thumb: :obj:`filelike object`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ # deprecated
+ return await self.set_sticker_set_thumbnail(name, user_id, thumb)
+
+ async def get_sticker_set(self, name: str) -> types.StickerSet:
+ """
+ Use this method to get a sticker set. On success, a StickerSet object is returned.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getstickerset
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :return: On success, a StickerSet object is returned.
+ :rtype: :class:`telebot.types.StickerSet`
+ """
+ result = await asyncio_helper.get_sticker_set(self.token, name)
+ return types.StickerSet.de_json(result)
+
+ async def set_sticker_keywords(self, sticker: str, keywords: List[str]=None) -> bool:
+ """
+ Use this method to change search keywords assigned to a regular or custom emoji sticker.
+ The sticker must belong to a sticker set created by the bot.
+ Returns True on success.
+
+ :param sticker: File identifier of the sticker.
+ :type sticker: :obj:`str`
+
+ :param keywords: A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters
+ :type keywords: :obj:`list` of :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_sticker_keywords(self.token, sticker, keywords)
+
+ async def set_sticker_mask_position(self, sticker: str, mask_position: types.MaskPosition=None) -> bool:
+ """
+ Use this method to change the mask position of a mask sticker.
+ The sticker must belong to a sticker set that was created by the bot.
+ Returns True on success.
+
+ :param sticker: File identifier of the sticker.
+ :type sticker: :obj:`str`
+
+ :param mask_position: A JSON-serialized object for position where the mask should be placed on faces.
+ :type mask_position: :class:`telebot.types.MaskPosition`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_sticker_mask_position(self.token, sticker, mask_position)
+
+ async def get_custom_emoji_stickers(self, custom_emoji_ids: List[str]) -> List[types.Sticker]:
+ """
+ Use this method to get information about custom emoji stickers by their identifiers.
+ Returns an Array of Sticker objects.
+
+ :param custom_emoji_ids: List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.
+ :type custom_emoji_ids: :obj:`list` of :obj:`str`
+
+ :return: Returns an Array of Sticker objects.
+ :rtype: :obj:`list` of :class:`telebot.types.Sticker`
+ """
+ result = await asyncio_helper.get_custom_emoji_stickers(self.token, custom_emoji_ids)
+ return [types.Sticker.de_json(sticker) for sticker in result]
+
+ async def upload_sticker_file(self, user_id: int, png_sticker: Union[Any, str]=None, sticker: Optional[types.InputFile]=None, sticker_format: Optional[str]=None) -> types.File:
+ """
+ Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet
+ methods (can be used multiple times). Returns the uploaded File on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#uploadstickerfile
+
+ :param user_id: User identifier of sticker set owner
+ :type user_id: :obj:`int`
+
+ :param png_sticker: DEPRECATED: PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px,
+ and either width or height must be exactly 512px.
+ :type png_sticker: :obj:`filelike object`
+
+ :param sticker: A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format.
+ See https://core.telegram.org/stickers for technical requirements. More information on Sending Files »
+ :type sticker: :class:`telebot.types.InputFile`
+
+ :param sticker_format: One of "static", "animated", "video".
+ :type sticker_format: :obj:`str`
+
+ :return: On success, the sent file is returned.
+ :rtype: :class:`telebot.types.File`
+ """
+ if png_sticker:
+ logger.warning('The parameter "png_sticker" is deprecated. Use "sticker" instead.')
+ sticker = png_sticker
+ sticker_format = "static"
+
+ result = await asyncio_helper.upload_sticker_file(self.token, user_id, sticker, sticker_format)
+ return types.File.de_json(result)
+
+ async def set_custom_emoji_sticker_set_thumbnail(self, name: str, custom_emoji_id: Optional[str]=None) -> bool:
+ """
+ Use this method to set the thumbnail of a custom emoji sticker set.
+ Returns True on success.
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param custom_emoji_id: Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.
+ :type custom_emoji_id: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_custom_emoji_sticker_set_thumbnail(self.token, name, custom_emoji_id)
+
+ async def set_sticker_set_title(self, name: str, title: str) -> bool:
+ """
+ Use this method to set the title of a created sticker set.
+ Returns True on success.
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param title: New sticker set title
+ :type title: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+
+ return await asyncio_helper.set_sticker_set_title(self.token, name, title)
+
+ async def delete_sticker_set(self, name:str) -> bool:
+ """
+ Use this method to delete a sticker set. Returns True on success.
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+
+ return await asyncio_helper.delete_sticker_set(self.token, name)
+
+ async def send_gift(self, user_id: Optional[Union[str, int]] = None, gift_id: str=None,
+ text: Optional[str]=None, text_parse_mode: Optional[str]=None, text_entities: Optional[List[types.MessageEntity]]=None,
+ pay_for_upgrade: Optional[bool]=None, chat_id: Optional[Union[str, int]] = None) -> bool:
+ """
+ Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#sendgift
+
+ :param gift_id: Identifier of the gift
+ :type gift_id: :obj:`str`
+
+ :param user_id: Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.
+ :type user_id::obj:`int` | :obj:`str`
+
+ :param chat_id: Required if user_id is not specified. Unique identifier for the chat or username of the channel
+ (in the format @channelusername) that will receive the gift.
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param pay_for_upgrade: Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver
+ :type pay_for_upgrade: :obj:`bool`
+
+ :param text: Text that will be shown along with the gift; 0-255 characters
+ :type text: :obj:`str`
+
+ :param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
+ :type text_parse_mode: :obj:`str`
+
+ :param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
+ :type text_entities: :obj:`list` of :obj:`types.MessageEntity`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ if user_id is None and chat_id is None:
+ raise ValueError("Either user_id or chat_id must be specified.")
+
+ if gift_id is None:
+ raise ValueError("gift_id must be specified.")
+
+ return await asyncio_helper.send_gift(self.token, gift_id, text, text_parse_mode, text_entities, pay_for_upgrade=pay_for_upgrade,
+ chat_id=chat_id, user_id=user_id)
+
+ async def verify_user(self, user_id: int, custom_description: Optional[str]=None) -> bool:
+ """
+ Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#verifyuser
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :param custom_description: Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.
+ :type custom_description: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.verify_user(self.token, user_id, custom_description=custom_description)
+
+ async def verify_chat(self, chat_id: Union[int, str], custom_description: Optional[str]=None) -> bool:
+ """
+ Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#verifychat
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param custom_description: Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.
+ :type custom_description: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+
+ return await asyncio_helper.verify_chat(self.token, chat_id, custom_description=custom_description)
+
+ async def remove_user_verification(self, user_id: int) -> bool:
+ """
+ Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#removeuserverification
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+
+ """
+ return await asyncio_helper.remove_user_verification(self.token, user_id)
+
+ async def remove_chat_verification(self, chat_id: int) -> bool:
+ """
+ Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#removechatverification
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.remove_chat_verification(self.token, chat_id)
+
+ async def read_business_message(self, business_connection_id: str, chat_id: Union[int, str], message_id: int) -> bool:
+ """
+ Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#readbusinessmessage
+
+ :param business_connection_id: Unique identifier of the business connection on behalf of which to read the message
+ :type business_connection_id: :obj:`str`
+
+ :param chat_id: Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.
+ :type chat_id: :obj:`int` | :obj:`str`
+
+ :param message_id: Unique identifier of the message to mark as read
+ :type message_id: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.read_business_message(self.token, business_connection_id, chat_id, message_id)
+
+ async def delete_business_messages(self, business_connection_id: str, message_ids: List[int]) -> bool:
+ """
+ Delete messages on behalf of a business account. Requires the can_delete_outgoing_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletebusinessmessages
+
+ :param business_connection_id: Unique identifier of the business connection on behalf of which to delete the messages
+ :type business_connection_id: :obj:`str`
+
+ :param message_ids: A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted
+ :type message_ids: :obj:`list` of :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.delete_business_messages(self.token, business_connection_id, message_ids)
+
+ async def set_business_account_name(self, business_connection_id: str, first_name: str, last_name: Optional[str]=None) -> bool:
+ """
+ Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setbusinessaccountname
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param first_name: The new value of the first name for the business account; 1-64 characters
+ :type first_name: :obj:`str`
+
+ :param last_name: The new value of the last name for the business account; 0-64 characters
+ :type last_name: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_business_account_name(self.token, business_connection_id, first_name, last_name=last_name)
+
+ async def set_business_account_username(self, business_connection_id: str, username: Optional[str]=None) -> bool:
+ """
+ Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setbusinessaccountusername
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param username: The new value of the username for the business account; 0-32 characters
+ :type username: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+
+ """
+ return await asyncio_helper.set_business_account_username(self.token, business_connection_id, username=username)
+
+ async def set_business_account_bio(self, business_connection_id: str, bio: Optional[str]=None) -> bool:
+ """
+ Changes the bio of a managed business account. Requires the can_change_bio business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setbusinessaccountbio
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param bio: The new value of the bio for the business account; 0-140 characters
+ :type bio: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_business_account_bio(self.token, business_connection_id, bio=bio)
+
+ async def set_business_account_gift_settings(
+ self, business_connection_id: str, show_gift_button: bool, accepted_gift_types: types.AcceptedGiftTypes) -> bool:
+ """
+ Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can_change_gift_settings business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setbusinessaccountgiftsettings
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param show_gift_button: Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field
+ :type show_gift_button: :obj:`bool`
+
+ :param accepted_gift_types: Types of gifts accepted by the business account
+ :type accepted_gift_types: :class:`telebot.types.AcceptedGiftTypes`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_business_account_gift_settings(self.token, business_connection_id, show_gift_button, accepted_gift_types)
+
+ async def get_business_account_star_balance(self, business_connection_id: str) -> types.StarAmount:
+ """
+ Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns StarAmount on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getbusinessaccountstarbalance
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :return: On success, a StarAmount object is returned.
+ :rtype: :class:`telebot.types.StarAmount`
+ """
+ return types.StarAmount.de_json(
+ await asyncio_helper.get_business_account_star_balance(self.token, business_connection_id)
+ )
+
+ async def transfer_business_account_stars(self, business_connection_id: str, star_count: int) -> bool:
+ """
+ Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can_transfer_stars business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#transferbusinessaccountstars
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param star_count: Number of Telegram Stars to transfer; 1-10000
+ :type star_count: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.transfer_business_account_stars(self.token, business_connection_id, star_count)
+
+ async def get_business_account_gifts(
+ self, business_connection_id: str,
+ exclude_unsaved: Optional[bool]=None,
+ exclude_saved: Optional[bool]=None,
+ exclude_unlimited: Optional[bool]=None,
+ exclude_limited: Optional[bool]=None,
+ exclude_unique: Optional[bool]=None,
+ sort_by_price: Optional[bool]=None,
+ offset: Optional[str]=None,
+ limit: Optional[int]=None) -> types.OwnedGifts:
+ """
+ Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns OwnedGifts on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getbusinessaccountgifts
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param exclude_unsaved: Pass True to exclude gifts that aren't saved to the account's profile page
+ :type exclude_unsaved: :obj:`bool`
+
+ :param exclude_saved: Pass True to exclude gifts that are saved to the account's profile page
+ :type exclude_saved: :obj:`bool`
+
+ :param exclude_unlimited: Pass True to exclude gifts that can be purchased an unlimited number of times
+ :type exclude_unlimited: :obj:`bool`
+
+ :param exclude_limited: Pass True to exclude gifts that can be purchased a limited number of times
+ :type exclude_limited: :obj:`bool`
+
+ :param exclude_unique: Pass True to exclude unique gifts
+ :type exclude_unique: :obj:`bool`
+
+ :param sort_by_price: Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.
+ :type sort_by_price: :obj:`bool`
+
+ :param offset: Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
+ :type offset: :obj:`str`
+
+ :param limit: The maximum number of gifts to be returned; 1-100. Defaults to 100
+ :type limit: :obj:`int`
+
+ :return: On success, a OwnedGifts object is returned.
+ :rtype: :class:`telebot.types.OwnedGifts`
+ """
+ return types.OwnedGifts.de_json(
+ await asyncio_helper.get_business_account_gifts(
+ self.token, business_connection_id,
+ exclude_unsaved=exclude_unsaved,
+ exclude_saved=exclude_saved,
+ exclude_unlimited=exclude_unlimited,
+ exclude_limited=exclude_limited,
+ exclude_unique=exclude_unique,
+ sort_by_price=sort_by_price,
+ offset=offset,
+ limit=limit
+ )
+ )
+
+ async def convert_gift_to_stars(self, business_connection_id: str, owned_gift_id: str) -> bool:
+ """
+ Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#convertgifttostars
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param owned_gift_id: Unique identifier of the regular gift that should be converted to Telegram Stars
+ :type owned_gift_id: :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.convert_gift_to_stars(self.token, business_connection_id, owned_gift_id)
+
+ async def upgrade_gift(
+ self, business_connection_id: str, owned_gift_id: str,
+ keep_original_details: Optional[bool]=None,
+ star_count: Optional[int]=None) -> bool:
+ """
+ Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right.
+ Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#upgradegift
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param owned_gift_id: Unique identifier of the regular gift that should be upgraded to a unique one
+ :type owned_gift_id: :obj:`str`
+
+ :param keep_original_details: Pass True to keep the original gift text, sender and receiver in the upgraded gift
+ :type keep_original_details: :obj:`bool`
+
+ :param star_count: The amount of Telegram Stars that will be paid for the upgrade from the business account balance.
+ If gift.prepaid_upgrade_star_count > 0, then pass 0, otherwise, the can_transfer_stars business bot right is required and gift.upgrade_star_count must be passed.
+ :type star_count: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.upgrade_gift(
+ self.token, business_connection_id, owned_gift_id,
+ keep_original_details=keep_original_details,
+ star_count=star_count
+ )
+
+ async def transfer_gift(
+ self, business_connection_id: str, owned_gift_id: str,
+ new_owner_chat_id: int,
+ star_count: Optional[int]=None) -> bool:
+ """
+ Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right.
+ Requires can_transfer_stars business bot right if the transfer is paid. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#transfergift
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param owned_gift_id: Unique identifier of the regular gift that should be transferred
+ :type owned_gift_id: :obj:`str`
+
+ :param new_owner_chat_id: Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.
+ :type new_owner_chat_id: :obj:`int`
+
+ :param star_count: The amount of Telegram Stars that will be paid for the transfer from the business account balance.
+ If positive, then the can_transfer_stars business bot right is required.
+ :type star_count: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.transfer_gift(
+ self.token, business_connection_id, owned_gift_id,
+ new_owner_chat_id,
+ star_count=star_count
+ )
+
+ async def post_story(
+ self, business_connection_id: str, content: types.InputStoryContent,
+ active_period: int, caption: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ areas: Optional[List[types.StoryArea]]=None,
+ post_to_chat_page: Optional[bool]=None,
+ protect_content: Optional[bool]=None) -> types.Story:
+
+ """
+ Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#poststory
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param content: Content of the story
+ :type content: :class:`telebot.types.InputStoryContent`
+
+ :param active_period: Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400
+ :type active_period: :obj:`int`
+
+ :param caption: Caption of the story, 0-2048 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the story caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param areas: A JSON-serialized list of clickable areas to be shown on the story
+ :type areas: :obj:`list` of :class:`telebot.types.StoryArea`
+
+ :param post_to_chat_page: Pass True to keep the story accessible after it expires
+ :type post_to_chat_page: :obj:`bool`
+
+ :param protect_content: Pass True if the content of the story must be protected from forwarding and screenshotting
+ :type protect_content: :obj:`bool`
+
+ :return: On success, a Story object is returned.
+ :rtype: :class:`telebot.types.Story`
+ """
+ return types.Story.de_json(
+ await asyncio_helper.post_story(
+ self.token, business_connection_id, content,
+ active_period, caption=caption,
+ parse_mode=parse_mode,
+ caption_entities=caption_entities,
+ areas=areas,
+ post_to_chat_page=post_to_chat_page,
+ protect_content=protect_content
+ )
+ )
+
+ async def edit_story(
+ self, business_connection_id: str, story_id: int,
+ content: types.InputStoryContent,
+ caption: Optional[str]=None,
+ parse_mode: Optional[str]=None,
+ caption_entities: Optional[List[types.MessageEntity]]=None,
+ areas: Optional[List[types.StoryArea]]=None) -> types.Story:
+ """
+ Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editstory
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param story_id: Unique identifier of the story to edit
+ :type story_id: :obj:`int`
+
+ :param content: Content of the story
+ :type content: :class:`telebot.types.InputStoryContent`
+
+ :param caption: Caption of the story, 0-2048 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Mode for parsing entities in the story caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param areas: A JSON-serialized list of clickable areas to be shown on the story
+ :type areas: :obj:`list` of :class:`telebot.types.StoryArea`
+
+ :return: On success, a Story object is returned.
+ :rtype: :class:`telebot.types.Story`
+
+ """
+ return types.Story.de_json(
+ await asyncio_helper.edit_story(
+ self.token, business_connection_id, story_id,
+ content, caption=caption,
+ parse_mode=parse_mode,
+ caption_entities=caption_entities,
+ areas=areas
+ )
+ )
+
+ async def delete_story(self, business_connection_id: str, story_id: int) -> bool:
+ """
+ Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletestory
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param story_id: Unique identifier of the story to delete
+ :type story_id: :obj:`int`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.delete_story(self.token, business_connection_id, story_id)
+
+ async def set_business_account_profile_photo(
+ self, business_connection_id: str, photo: types.InputProfilePhoto,
+ is_public: Optional[bool]=None) -> bool:
+ """
+ Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setbusinessaccountprofilephoto
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param photo: The new profile photo to set
+ :type photo: :class:`telebot.types.InputProfilePhoto`
+
+ :param is_public: Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.
+ :type is_public: :obj:`bool`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_business_account_profile_photo(self.token, business_connection_id, photo, is_public=is_public)
+
+
+ async def remove_business_account_profile_photo(
+ self, business_connection_id: str,
+ is_public: Optional[bool]=None) -> bool:
+ """
+ Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#removebusinessaccountprofilephoto
+
+ :param business_connection_id: Unique identifier of the business connection
+ :type business_connection_id: :obj:`str`
+
+ :param is_public: Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.
+ :type is_public: :obj:`bool`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.remove_business_account_profile_photo(self.token, business_connection_id, is_public=is_public)
+
+ async def gift_premium_subscription(
+ self, user_id: int, month_count: int, star_count: int,
+ text: Optional[str]=None, text_parse_mode: Optional[str]=None,
+ text_entities: Optional[List[types.MessageEntity]]=None) -> bool:
+ """
+ Gifts a Telegram Premium subscription to the given user. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#giftpremiumsubscription
+
+ :param user_id: Unique identifier of the target user who will receive a Telegram Premium subscription
+ :type user_id: :obj:`int`
+
+ :param month_count: Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12
+ :type month_count: :obj:`int`
+
+ :param star_count: Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months
+ :type star_count: :obj:`int`
+
+ :param text: Text that will be shown along with the service message about the subscription; 0-128 characters
+ :type text: :obj:`str`
+
+ :param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
+ :type text_parse_mode: :obj:`str`
+
+ :param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
+ :type text_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.gift_premium_subscription(
+ self.token, user_id, month_count, star_count,
+ text=text, text_parse_mode=text_parse_mode,
+ text_entities=text_entities
+ )
+
+ async def get_available_gifts(self) -> types.Gifts:
+ """
+ Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getavailablegifts
+
+ :return: On success, a Gifts object is returned.
+ :rtype: :class:`telebot.types.Gifts`
+ """
+
+ return types.Gifts.de_json(await asyncio_helper.get_available_gifts(self.token))
+
+
+ async def replace_sticker_in_set(self, user_id: int, name: str, old_sticker: str, sticker: types.InputSticker) -> bool:
+ """
+ Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet,
+ then setStickerPositionInSet. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#replaceStickerInSet
+
+ :param user_id: User identifier of the sticker set owner
+ :type user_id: :obj:`int`
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param old_sticker: File identifier of the replaced sticker
+ :type old_sticker: :obj:`str`
+
+ :param sticker: A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.
+ :type sticker: :class:`telebot.types.InputSticker`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+ result = await asyncio_helper.replace_sticker_in_set(self.token, user_id, name, old_sticker, sticker)
+ return result
+
+ async def set_sticker_emoji_list(self, name: str, emoji_list: List[str]) -> bool:
+ """
+ Use this method to set the emoji list of a sticker set.
+ Returns True on success.
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param emoji_list: List of emojis
+ :type emoji_list: :obj:`list` of :obj:`str`
+
+ :return: Returns True on success.
+ :rtype: :obj:`bool`
+ """
+
+ return await asyncio_helper.set_sticker_emoji_list(self.token, name, emoji_list)
+
+
+ async def create_new_sticker_set(
+ self, user_id: int, name: str, title: str,
+ emojis: Optional[List[str]]=None,
+ png_sticker: Union[Any, str]=None,
+ tgs_sticker: Union[Any, str]=None,
+ webm_sticker: Union[Any, str]=None,
+ contains_masks: Optional[bool]=None,
+ sticker_type: Optional[str]=None,
+ mask_position: Optional[types.MaskPosition]=None,
+ needs_repainting: Optional[bool]=None,
+ stickers: List[types.InputSticker]=None,
+ sticker_format: Optional[str]=None) -> bool:
+ """
+ Use this method to create new sticker set owned by a user.
+ The bot will be able to edit the created sticker set.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#createnewstickerset
+
+ .. note::
+ Fields *_sticker are deprecated, pass a list of stickers to stickers parameter instead.
+
+ :param user_id: User identifier of created sticker set owner
+ :type user_id: :obj:`int`
+
+ :param name: Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only English letters,
+ digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in "_by_".
+ is case insensitive. 1-64 characters.
+ :type name: :obj:`str`
+
+ :param title: Sticker set title, 1-64 characters
+ :type title: :obj:`str`
+
+ :param emojis: One or more emoji corresponding to the sticker
+ :type emojis: :obj:`str`
+
+ :param png_sticker: PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width
+ or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL
+ as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.
+ :type png_sticker: :obj:`str`
+
+ :param tgs_sticker: TGS animation with the sticker, uploaded using multipart/form-data.
+ :type tgs_sticker: :obj:`str`
+
+ :param webm_sticker: WebM animation with the sticker, uploaded using multipart/form-data.
+ :type webm_sticker: :obj:`str`
+
+ :param contains_masks: Pass True, if a set of mask stickers should be created. Deprecated since Bot API 6.2,
+ use sticker_type instead.
+ :type contains_masks: :obj:`bool`
+
+ :param sticker_type: Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created.
+ :type sticker_type: :obj:`str`
+
+ :param mask_position: A JSON-serialized object for position where the mask should be placed on faces
+ :type mask_position: :class:`telebot.types.MaskPosition`
+
+ :param needs_repainting: Pass True if stickers in the sticker set must be repainted to the color of text when used in messages,
+ the accent color if used as emoji status, white on chat photos, or another appropriate color based on context;
+ for custom emoji sticker sets only
+ :type needs_repainting: :obj:`bool`
+
+ :param stickers: List of stickers to be added to the set
+ :type stickers: :obj:`list` of :class:`telebot.types.InputSticker`
+
+ :param sticker_format: deprecated
+ :type sticker_format: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ if tgs_sticker:
+ sticker_format = 'animated'
+ elif webm_sticker:
+ sticker_format = 'video'
+ elif png_sticker:
+ sticker_format = 'static'
+
+ if contains_masks is not None:
+ logger.warning('The parameter "contains_masks" is deprecated, use "sticker_type" instead')
+ if sticker_type is None:
+ sticker_type = 'mask' if contains_masks else 'regular'
+
+ if stickers is None:
+ stickers = png_sticker or tgs_sticker or webm_sticker
+ if stickers is None:
+ raise ValueError('You must pass at least one sticker')
+ stickers = [types.InputSticker(sticker=stickers, emoji_list=emojis, mask_position=mask_position)]
+
+ if sticker_format:
+ logger.warning('The parameter "sticker_format" is deprecated since Bot API 7.2. Stickers can now be mixed')
+
+ return await asyncio_helper.create_new_sticker_set(
+ self.token, user_id, name, title, stickers, sticker_type, needs_repainting)
+
+
+ async def add_sticker_to_set(
+ self, user_id: int, name: str, emojis: Union[List[str], str]=None,
+ png_sticker: Optional[Union[Any, str]]=None,
+ tgs_sticker: Optional[Union[Any, str]]=None,
+ webm_sticker: Optional[Union[Any, str]]=None,
+ mask_position: Optional[types.MaskPosition]=None,
+ sticker: Optional[types.InputSticker]=None) -> bool:
+ """
+ Use this method to add a new sticker to a set created by the bot.
+ The format of the added sticker must match the format of the other stickers in the set.
+ Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers.
+ Static sticker sets can have up to 120 stickers.
+ Returns True on success.
+
+ .. note::
+ **_sticker, mask_position, emojis parameters are deprecated, use stickers instead
+
+ Telegram documentation: https://core.telegram.org/bots/api#addstickertoset
+
+ :param user_id: User identifier of created sticker set owner
+ :type user_id: :obj:`int`
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param emojis: One or more emoji corresponding to the sticker
+ :type emojis: :obj:`str`
+
+ :param png_sticker: PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either
+ width or height must be exactly 512px. Pass a file_id as a String to send a file that already exists on the Telegram servers,
+ pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data.
+ :type png_sticker: :obj:`str` or :obj:`filelike object`
+
+ :param tgs_sticker: TGS animation with the sticker, uploaded using multipart/form-data.
+ :type tgs_sticker: :obj:`str` or :obj:`filelike object`
+
+ :param webm_sticker: WebM animation with the sticker, uploaded using multipart/form-data.
+ :type webm_sticker: :obj:`str` or :obj:`filelike object`
+
+ :param mask_position: A JSON-serialized object for position where the mask should be placed on faces
+ :type mask_position: :class:`telebot.types.MaskPosition`
+
+ :param sticker: A JSON-serialized object for sticker to be added to the sticker set
+ :type sticker: :class:`telebot.types.InputSticker`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ # split emojis if string
+ if isinstance(emojis, str):
+ emojis = list(emojis)
+ # Replaced the parameters png_sticker, tgs_sticker, webm_sticker, emojis and mask_position
+ if sticker is None:
+ old_sticker = png_sticker or tgs_sticker or webm_sticker
+ if old_sticker is not None:
+ logger.warning('The parameters "..._sticker", "emojis" and "mask_position" are deprecated, use "sticker" instead')
+ if not old_sticker:
+ raise ValueError('You must pass at least one sticker.')
+ sticker = types.InputSticker(old_sticker, emojis, mask_position)
+
+ return await asyncio_helper.add_sticker_to_set(
+ self.token, user_id, name, sticker)
+
+
+ async def set_sticker_position_in_set(self, sticker: str, position: int) -> bool:
+ """
+ Use this method to move a sticker in a set created by the bot to a specific position . Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#setstickerpositioninset
+
+ :param sticker: File identifier of the sticker
+ :type sticker: :obj:`str`
+
+ :param position: New sticker position in the set, zero-based
+ :type position: :obj:`int`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.set_sticker_position_in_set(self.token, sticker, position)
+
+ async def delete_sticker_from_set(self, sticker: str) -> bool:
+ """
+ Use this method to delete a sticker from a set created by the bot. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deletestickerfromset
+
+ :param sticker: File identifier of the sticker
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.delete_sticker_from_set(self.token, sticker)
+
+ async def create_forum_topic(self,
+ chat_id: int, name: str, icon_color: Optional[int]=None,
+ icon_custom_emoji_id: Optional[str]=None) -> types.ForumTopic:
+ """
+ Use this method to create a topic in a forum supergroup chat. The bot must be an administrator
+ in the chat for this to work and must have the can_manage_topics administrator rights.
+ Returns information about the created topic as a ForumTopic object.
+
+ Telegram documentation: https://core.telegram.org/bots/api#createforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param name: Name of the topic, 1-128 characters
+ :type name: :obj:`str`
+
+ :param icon_color: Color of the topic icon in RGB format. Currently, must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F
+ :type icon_color: :obj:`int`
+
+ :param icon_custom_emoji_id: Custom emoji for the topic icon. Must be an emoji of type “tgs” and must be exactly 1 character long
+ :type icon_custom_emoji_id: :obj:`str`
+
+ :return: On success, information about the created topic is returned as a ForumTopic object.
+ :rtype: :class:`telebot.types.ForumTopic`
+ """
+ return types.ForumTopic.de_json(
+ await asyncio_helper.create_forum_topic(self.token, chat_id, name, icon_color, icon_custom_emoji_id)
+ )
+
+ async def edit_forum_topic(
+ self, chat_id: Union[int, str],
+ message_thread_id: int, name: Optional[str]=None,
+ icon_custom_emoji_id: Optional[str]=None
+ ) -> bool:
+ """
+ Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an
+ administrator in the chat for this to work and must have can_manage_topics administrator rights,
+ unless it is the creator of the topic. Returns True on success.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#editforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_thread_id: Identifier of the topic to edit
+ :type message_thread_id: :obj:`int`
+
+ :param name: Optional, New name of the topic, 1-128 characters. If not specififed or empty,
+ the current name of the topic will be kept
+ :type name: :obj:`str`
+
+ :param icon_custom_emoji_id: Optional, New unique identifier of the custom emoji shown as the topic icon.
+ Use getForumTopicIconStickers to get all allowed custom emoji identifiers. Pass an empty string to remove the
+ icon. If not specified, the current icon will be kept
+ :type icon_custom_emoji_id: :obj:`str`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.edit_forum_topic(self.token, chat_id, message_thread_id, name, icon_custom_emoji_id)
+
+ async def close_forum_topic(self, chat_id: Union[str, int], message_thread_id: int) -> bool:
+ """
+ Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator
+ in the chat for this to work and must have the can_manage_topics administrator rights, unless it is
+ the creator of the topic. Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#closeforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_thread_id: Identifier of the topic to close
+ :type message_thread_id: :obj:`int`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.close_forum_topic(self.token, chat_id, message_thread_id)
+
+ async def reopen_forum_topic(self, chat_id: Union[str, int], message_thread_id: int) -> bool:
+ """
+ Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat
+ for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#reopenforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_thread_id: Identifier of the topic to reopen
+ :type message_thread_id: :obj:`int`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.reopen_forum_topic(self.token, chat_id, message_thread_id)
+
+ async def delete_forum_topic(self, chat_id: Union[str, int], message_thread_id: int) -> bool:
+ """
+ Use this method to delete a topic in a forum supergroup chat. The bot must be an administrator in the chat for this
+ to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True
+ on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#deleteforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_thread_id: Identifier of the topic to delete
+ :type message_thread_id: :obj:`int`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.delete_forum_topic(self.token, chat_id, message_thread_id)
+
+ async def unpin_all_forum_topic_messages(self, chat_id: Union[str, int], message_thread_id: int) -> bool:
+ """
+ Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the
+ chat for this to work and must have the can_pin_messages administrator right in the supergroup.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unpinallforumtopicmessages
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param message_thread_id: Identifier of the topic
+ :type message_thread_id: :obj:`int`
+
+ :return: On success, True is returned.
+ :rtype: :obj:`bool`
+ """
+ return await asyncio_helper.unpin_all_forum_topic_messages(self.token, chat_id, message_thread_id)
+
+ async def edit_general_forum_topic(self, chat_id: Union[int, str], name: str) -> bool:
+ """
+ Use this method to edit the name of the 'General' topic in a forum supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#editgeneralforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param name: New topic name, 1-128 characters
+ :type name: :obj:`str`
+ """
+
+ return await asyncio_helper.edit_general_forum_topic(self.token, chat_id, name)
+
+ async def close_general_forum_topic(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to close the 'General' topic in a forum supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#closegeneralforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+ """
+ return await asyncio_helper.close_general_forum_topic(self.token, chat_id)
+
+ async def reopen_general_forum_topic(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to reopen the 'General' topic in a forum supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#reopengeneralforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+ """
+ return await asyncio_helper.reopen_general_forum_topic(self.token, chat_id)
+
+ async def hide_general_forum_topic(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to hide the 'General' topic in a forum supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#hidegeneralforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+ """
+ return await asyncio_helper.hide_general_forum_topic(self.token, chat_id)
+
+ async def unhide_general_forum_topic(self, chat_id: Union[int, str]) -> bool:
+ """
+ Use this method to unhide the 'General' topic in a forum supergroup chat.
+ The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights.
+ Returns True on success.
+
+ Telegram documentation: https://core.telegram.org/bots/api#unhidegeneralforumtopic
+
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+ """
+ return await asyncio_helper.unhide_general_forum_topic(self.token, chat_id)
+
+ async def get_forum_topic_icon_stickers(self) -> List[types.Sticker]:
+ """
+ Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user.
+ Requires no parameters. Returns an Array of Sticker objects.
+
+ Telegram documentation: https://core.telegram.org/bots/api#getforumtopiciconstickers
+
+ :return: On success, a list of StickerSet objects is returned.
+ :rtype: List[:class:`telebot.types.StickerSet`]
+ """
+ return await asyncio_helper.get_forum_topic_icon_stickers(self.token)
+
+
+ async def set_state(self, user_id: int, state: Union[int, str, State], chat_id: Optional[int]=None,
+ business_connection_id: Optional[str]=None, message_thread_id: Optional[int]=None,
+ bot_id: Optional[int]=None) -> bool:
+ """
+ Sets a new state of a user.
+
+ .. note::
+
+ You should set both user id and chat id in order to set state for a user in a chat.
+ Otherwise, if you only set user_id, chat_id will equal to user_id, this means that
+ state will be set for the user in his private chat with a bot.
+
+ .. versionchanged:: 4.23.0
+
+ Added additional parameters to support topics, business connections, and message threads.
+
+ .. seealso::
+
+ For more details, visit the `custom_states.py example `_.
+
+ :param user_id: User's identifier
+ :type user_id: :obj:`int`
+
+ :param state: new state. can be string, or :class:`telebot.types.State`
+ :type state: :obj:`int` or :obj:`str` or :class:`telebot.types.State`
+
+ :param chat_id: Chat's identifier
+ :type chat_id: :obj:`int`
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: :obj:`int`
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: :obj:`str`
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: :obj:`int`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ return await self.current_states.set_state(chat_id, user_id, state,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ async def reset_data(self, user_id: int, chat_id: Optional[int]=None,
+ business_connection_id: Optional[str]=None,
+ message_thread_id: Optional[int]=None, bot_id: Optional[int]=None) -> bool:
+ """
+ Reset data for a user in chat.
+
+ :param user_id: User's identifier
+ :type user_id: :obj:`int`
+
+ :param chat_id: Chat's identifier
+ :type chat_id: :obj:`int`
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: :obj:`int`
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: :obj:`str`
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: :obj:`int`
+
+ :return: True on success
+ :rtype: :obj:`bool`
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ return await self.current_states.reset_data(chat_id, user_id,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ async def delete_state(self, user_id: int, chat_id: Optional[int]=None, business_connection_id: Optional[str]=None,
+ message_thread_id: Optional[int]=None, bot_id: Optional[int]=None) -> bool:
+ """
+ Delete the current state of a user.
+
+ :param user_id: User's identifier
+ :type user_id: :obj:`int`
+
+ :param chat_id: Chat's identifier
+ :type chat_id: :obj:`int`
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: :obj:`int`
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: :obj:`str`
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: :obj:`int`
+
+ :return: None
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ return await self.current_states.delete_state(chat_id, user_id,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ def retrieve_data(self, user_id: int, chat_id: Optional[int]=None, business_connection_id: Optional[str]=None,
+ message_thread_id: Optional[int]=None, bot_id: Optional[int]=None) -> Optional[Dict[str, Any]]:
+ """
+ Returns context manager with data for a user in chat.
+
+ :param user_id: User identifier
+ :type user_id: int
+
+ :param chat_id: Chat's unique identifier, defaults to user_id
+ :type chat_id: int, optional
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: int, optional
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: str, optional
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: int, optional
+
+ :return: Context manager with data for a user in chat
+ :rtype: :obj:`dict`
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ return self.current_states.get_interactive_data(chat_id, user_id,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ async def get_state(self, user_id: int, chat_id: Optional[int]=None,
+ business_connection_id: Optional[str]=None,
+ message_thread_id: Optional[int]=None, bot_id: Optional[int]=None) -> str:
+ """
+ Gets current state of a user.
+ Not recommended to use this method. But it is ok for debugging.
+
+ .. warning::
+
+ Even if you are using :class:`telebot.types.State`, this method will return a string.
+ When comparing(not recommended), you should compare this string with :class:`telebot.types.State`.name
+
+ :param user_id: User's identifier
+ :type user_id: :obj:`int`
+
+ :param chat_id: Chat's identifier
+ :type chat_id: :obj:`int`
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: :obj:`int`
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: :obj:`str`
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: :obj:`int`
+
+ :return: state of a user
+ :rtype: :obj:`str`
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ return await self.current_states.get_state(chat_id, user_id,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
+
+
+ async def add_data(self, user_id: int, chat_id: Optional[int]=None,
+ business_connection_id: Optional[str]=None,
+ message_thread_id: Optional[int]=None,
+ bot_id: Optional[int]=None,
+ **kwargs) -> None:
+ """
+ Add data to states.
+
+ :param user_id: User's identifier
+ :type user_id: :obj:`int`
+
+ :param chat_id: Chat's identifier
+ :type chat_id: :obj:`int`
+
+ :param bot_id: Bot's identifier, defaults to current bot id
+ :type bot_id: :obj:`int`
+
+ :param business_connection_id: Business identifier
+ :type business_connection_id: :obj:`str`
+
+ :param message_thread_id: Identifier of the message thread
+ :type message_thread_id: :obj:`int`
+
+ :param kwargs: Data to add
+ :return: None
+ """
+ if chat_id is None:
+ chat_id = user_id
+ if bot_id is None:
+ bot_id = self.bot_id
+ for key, value in kwargs.items():
+ await self.current_states.set_data(chat_id, user_id, key, value,
+ bot_id=bot_id, business_connection_id=business_connection_id, message_thread_id=message_thread_id)
diff --git a/telebot/asyncio_filters.py b/telebot/asyncio_filters.py
new file mode 100644
index 000000000..83aefefe3
--- /dev/null
+++ b/telebot/asyncio_filters.py
@@ -0,0 +1,450 @@
+from abc import ABC
+from typing import Optional, Union
+from telebot.asyncio_handler_backends import State
+
+from telebot import types
+from telebot.states import resolve_context
+
+
+class SimpleCustomFilter(ABC):
+ """
+ Simple Custom Filter base class.
+ Create child class with check() method.
+ Accepts only message, returns bool value, that is compared with given in handler.
+
+ Child classes should have .key property.
+
+ .. code-block:: python3
+ :caption: Example on creating a simple custom filter.
+
+ class ForwardFilter(SimpleCustomFilter):
+ # Check whether message was forwarded from channel or group.
+ key = 'is_forwarded'
+
+ def check(self, message):
+ return message.forward_date is not None
+
+ """
+
+ key: str = None
+
+ async def check(self, message) -> bool:
+ """
+ Perform a check.
+ """
+ pass
+
+
+class AdvancedCustomFilter(ABC):
+ """
+ Advanced Custom Filter base class.
+ Create child class with check() method.
+ Accepts two parameters, returns bool: True - filter passed, False - filter failed.
+ message: Message class
+ text: Filter value given in handler
+
+ Child classes should have .key property.
+
+ .. code-block:: python3
+ :caption: Example on creating an advanced custom filter.
+
+ class TextStartsFilter(AdvancedCustomFilter):
+ # Filter to check whether message starts with some text.
+ key = 'text_startswith'
+
+ def check(self, message, text):
+ return message.text.startswith(text)
+ """
+
+ key: str = None
+
+ async def check(self, message, text):
+ """
+ Perform a check.
+ """
+ pass
+
+
+class TextFilter:
+ """
+ Advanced text filter to check (types.Message, types.CallbackQuery, types.InlineQuery, types.Poll)
+
+ example of usage is in examples/asynchronous_telebot/custom_filters/advanced_text_filter.py
+
+ :param equals: string, True if object's text is equal to passed string
+ :type equals: :obj:`str`
+
+ :param contains: list[str] or tuple[str], True if any string element of iterable is in text
+ :type contains: list[str] or tuple[str]
+
+ :param starts_with: string, True if object's text starts with passed string
+ :type starts_with: :obj:`str`
+
+ :param ends_with: string, True if object's text starts with passed string
+ :type ends_with: :obj:`str`
+
+ :param ignore_case: bool (default False), case insensitive
+ :type ignore_case: :obj:`bool`
+
+ :raises ValueError: if incorrect value for a parameter was supplied
+
+ :return: None
+ """
+
+ def __init__(self,
+ equals: Optional[str] = None,
+ contains: Optional[Union[list, tuple]] = None,
+ starts_with: Optional[Union[str, list, tuple]] = None,
+ ends_with: Optional[Union[str, list, tuple]] = None,
+ ignore_case: bool = False):
+ """
+ :param equals: string, True if object's text is equal to passed string
+ :type equals: :obj:`str`
+
+ :param contains: list[str] or tuple[str], True if any string element of iterable is in text
+ :type contains: list[str] or tuple[str]
+
+ :param starts_with: string, True if object's text starts with passed string
+ :type starts_with: :obj:`str`
+
+ :param ends_with: string, True if object's text starts with passed string
+ :type ends_with: :obj:`str`
+
+ :param ignore_case: bool (default False), case insensitive
+ :type ignore_case: :obj:`bool`
+
+ :raises ValueError: if incorrect value for a parameter was supplied
+
+ :return: None
+ """
+
+ to_check = sum((pattern is not None for pattern in (equals, contains, starts_with, ends_with)))
+ if to_check == 0:
+ raise ValueError('None of the check modes was specified')
+
+ self.equals = equals
+ self.contains = self._check_iterable(contains, filter_name='contains')
+ self.starts_with = self._check_iterable(starts_with, filter_name='starts_with')
+ self.ends_with = self._check_iterable(ends_with, filter_name='ends_with')
+ self.ignore_case = ignore_case
+
+ def _check_iterable(self, iterable, filter_name):
+ if not iterable:
+ pass
+ elif not isinstance(iterable, str) and not isinstance(iterable, list) and not isinstance(iterable, tuple):
+ raise ValueError(f"Incorrect value of {filter_name!r}")
+ elif isinstance(iterable, str):
+ iterable = [iterable]
+ elif isinstance(iterable, list) or isinstance(iterable, tuple):
+ iterable = [i for i in iterable if isinstance(i, str)]
+ return iterable
+
+ async def check(self, obj: Union[types.Message, types.CallbackQuery, types.InlineQuery, types.Poll]):
+ """
+ :meta private:
+ """
+ if isinstance(obj, types.Poll):
+ text = obj.question
+ elif isinstance(obj, types.Message):
+ text = obj.text or obj.caption
+ elif isinstance(obj, types.CallbackQuery):
+ text = obj.data
+ elif isinstance(obj, types.InlineQuery):
+ text = obj.query
+ else:
+ return False
+
+ if self.ignore_case:
+ text = text.lower()
+ prepare_func = lambda string: str(string).lower()
+ else:
+ prepare_func = str
+
+ if self.equals:
+ result = prepare_func(self.equals) == text
+ if result:
+ return True
+ elif not result and not any((self.contains, self.starts_with, self.ends_with)):
+ return False
+
+ if self.contains:
+ result = any([prepare_func(i) in text for i in self.contains])
+ if result:
+ return True
+ elif not result and not any((self.starts_with, self.ends_with)):
+ return False
+
+ if self.starts_with:
+ result = any([text.startswith(prepare_func(i)) for i in self.starts_with])
+ if result:
+ return True
+ elif not result and not self.ends_with:
+ return False
+
+ if self.ends_with:
+ return any([text.endswith(prepare_func(i)) for i in self.ends_with])
+
+ return False
+
+
+class TextMatchFilter(AdvancedCustomFilter):
+ """
+ Filter to check Text message.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(text=['account'])
+ # your function
+ """
+
+ key = 'text'
+
+ async def check(self, message, text):
+ """
+ :meta private:
+ """
+ if isinstance(text, TextFilter):
+ return await text.check(message)
+ elif type(text) is list:
+ return message.text in text
+ else:
+ return text == message.text
+
+
+class TextContainsFilter(AdvancedCustomFilter):
+ """
+ Filter to check Text message.
+ key: text
+
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ # Will respond if any message.text contains word 'account'
+ @bot.message_handler(text_contains=['account'])
+ # your function
+ """
+
+ key = 'text_contains'
+
+ async def check(self, message, text):
+ """
+ :meta private:
+ """
+ if not isinstance(text, str) and not isinstance(text, list) and not isinstance(text, tuple):
+ raise ValueError("Incorrect text_contains value")
+ elif isinstance(text, str):
+ text = [text]
+ elif isinstance(text, list) or isinstance(text, tuple):
+ text = [i for i in text if isinstance(i, str)]
+
+ return any([i in message.text for i in text])
+
+
+class TextStartsFilter(AdvancedCustomFilter):
+ """
+ Filter to check whether message starts with some text.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ # Will work if message.text starts with 'sir'.
+ @bot.message_handler(text_startswith='sir')
+ # your function
+ """
+
+ key = 'text_startswith'
+
+ async def check(self, message, text):
+ """
+ :meta private:
+ """
+ return message.text.startswith(text)
+
+
+class ChatFilter(AdvancedCustomFilter):
+ """
+ Check whether chat_id corresponds to given chat_id.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(chat_id=[99999])
+ # your function
+ """
+
+ key = 'chat_id'
+
+ async def check(self, message, text):
+ """
+ :meta private:
+ """
+ if isinstance(message, types.CallbackQuery):
+ return message.message.chat.id in text
+ return message.chat.id in text
+
+
+class ForwardFilter(SimpleCustomFilter):
+ """
+ Check whether message was forwarded from channel or group.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(is_forwarded=True)
+ # your function
+ """
+
+ key = 'is_forwarded'
+
+ async def check(self, message):
+ """
+ :meta private:
+ """
+ return message.forward_origin is not None
+
+
+class IsReplyFilter(SimpleCustomFilter):
+ """
+ Check whether message is a reply.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(is_reply=True)
+ # your function
+ """
+
+ key = 'is_reply'
+
+ async def check(self, message):
+ """
+ :meta private:
+ """
+ if isinstance(message, types.CallbackQuery):
+ return message.message.reply_to_message is not None
+ return message.reply_to_message is not None
+
+
+class LanguageFilter(AdvancedCustomFilter):
+ """
+ Check users language_code.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(language_code=['ru'])
+ # your function
+ """
+
+ key = 'language_code'
+
+ async def check(self, message, text):
+ """
+ :meta private:
+ """
+ if type(text) is list:
+ return message.from_user.language_code in text
+ else:
+ return message.from_user.language_code == text
+
+
+class IsAdminFilter(SimpleCustomFilter):
+ """
+ Check whether the user is administrator / owner of the chat.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(chat_types=['supergroup'], is_chat_admin=True)
+ # your function
+ """
+
+ key = 'is_chat_admin'
+
+ def __init__(self, bot):
+ self._bot = bot
+
+ async def check(self, message):
+ """
+ :meta private:
+ """
+ if isinstance(message, types.CallbackQuery):
+ result = await self._bot.get_chat_member(message.message.chat.id, message.from_user.id)
+ return result.status in ('creator', 'administrator')
+ result = await self._bot.get_chat_member(message.chat.id, message.from_user.id)
+ return result.status in ['creator', 'administrator']
+
+
+class StateFilter(AdvancedCustomFilter):
+ """
+ Filter to check state.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(state=1)
+ # your function
+ """
+
+ def __init__(self, bot):
+ self.bot = bot
+
+ key = 'state'
+
+ async def check(self, message, text):
+ """
+ :meta private:
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = resolve_context(message, self.bot.bot_id)
+
+ if chat_id is None:
+ chat_id = user_id # May change in future
+
+ if isinstance(text, list):
+ new_text = []
+ for i in text:
+ if isinstance(i, State): i = i.name
+ new_text.append(i)
+ text = new_text
+ elif isinstance(text, State):
+ text = text.name
+
+ user_state = await self.bot.current_states.get_state(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id
+ )
+
+ # CHANGED BEHAVIOUR
+ if text == "*" and user_state is not None:
+ return True
+
+ if user_state == text:
+ return True
+ elif type(text) is list and user_state in text:
+ return True
+ return False
+
+
+class IsDigitFilter(SimpleCustomFilter):
+ """
+ Filter to check whether the string is made up of only digits.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(is_digit=True)
+ # your function
+ """
+ key = 'is_digit'
+
+ async def check(self, message):
+ """
+ :meta private:
+ """
+ return message.text.isdigit()
diff --git a/telebot/asyncio_handler_backends.py b/telebot/asyncio_handler_backends.py
new file mode 100644
index 000000000..6c96cc2d7
--- /dev/null
+++ b/telebot/asyncio_handler_backends.py
@@ -0,0 +1,98 @@
+"""
+File with all middleware classes, states.
+"""
+from telebot.states import State, StatesGroup
+
+
+class BaseMiddleware:
+ """
+ Base class for middleware.
+ Your middlewares should be inherited from this class.
+
+ Set update_sensitive=True if you want to get different updates on
+ different functions. For example, if you want to handle pre_process for
+ message update, then you will have to create pre_process_message function, and
+ so on. Same applies to post_process.
+
+ .. code-block:: python
+ :caption: Example of class-based middlewares
+
+ class MyMiddleware(BaseMiddleware):
+ def __init__(self):
+ self.update_sensitive = True
+ self.update_types = ['message', 'edited_message']
+
+ async def pre_process_message(self, message, data):
+ # only message update here
+ pass
+
+ async def post_process_message(self, message, data, exception):
+ pass # only message update here for post_process
+
+ async def pre_process_edited_message(self, message, data):
+ # only edited_message update here
+ pass
+
+ async def post_process_edited_message(self, message, data, exception):
+ pass # only edited_message update here for post_process
+ """
+
+ update_sensitive: bool = False
+
+ def __init__(self):
+ pass
+
+ async def pre_process(self, message, data):
+ raise NotImplementedError
+
+ async def post_process(self, message, data, exception):
+ raise NotImplementedError
+
+
+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 ContinueHandling:
+ """
+ Class for continue updates in handlers.
+ Just return instance of this class
+ in handlers to continue process.
+
+ .. code-block:: python3
+ :caption: Example of using ContinueHandling
+
+ @bot.message_handler(commands=['start'])
+ async def start(message):
+ await bot.send_message(message.chat.id, 'Hello World!')
+ return ContinueHandling()
+
+ @bot.message_handler(commands=['start'])
+ async def start2(message):
+ await bot.send_message(message.chat.id, 'Hello World2!')
+
+ """
+ def __init__(self) -> None:
+ pass
diff --git a/telebot/asyncio_helper.py b/telebot/asyncio_helper.py
new file mode 100644
index 000000000..f127f316f
--- /dev/null
+++ b/telebot/asyncio_helper.py
@@ -0,0 +1,2675 @@
+import asyncio # for future uses
+import ssl
+import aiohttp
+import certifi
+from telebot import types
+
+try:
+ import ujson as json
+except ImportError:
+ import json
+import os
+API_URL = 'https://api.telegram.org/bot{0}/{1}'
+
+from datetime import datetime
+
+from telebot import util
+import logging
+
+logger = logging.getLogger('TeleBot')
+
+proxy = None
+session = None
+
+FILE_URL = None
+
+REQUEST_TIMEOUT = 300
+MAX_RETRIES = 3
+
+REQUEST_LIMIT = 50
+
+class SessionManager:
+ def __init__(self) -> None:
+ self.session = None
+ self.ssl_context = ssl.create_default_context(cafile=certifi.where())
+
+
+ async def create_session(self):
+ self.session = aiohttp.ClientSession(connector=aiohttp.TCPConnector(
+ limit=REQUEST_LIMIT,
+ ssl=self.ssl_context
+ ))
+ return self.session
+
+ async def get_session(self):
+ if self.session is None:
+ self.session = await self.create_session()
+ return self.session
+
+ if self.session.closed:
+ self.session = await self.create_session()
+
+ # noinspection PyProtectedMember
+ if not self.session._loop.is_running():
+ await self.session.close()
+ self.session = await self.create_session()
+ return self.session
+
+
+session_manager = SessionManager()
+
+async def _process_request(token, url, method='get', params=None, files=None, **kwargs):
+ # Let's resolve all timeout parameters.
+ # getUpdates parameter may contain 2 parameters: request_timeout & timeout.
+ # other methods may contain timeout parameter that should be applied to
+ # ClientTimeout only.
+ # timeout should be added to params for getUpdates. All other timeout's should be used
+ # for request timeout.
+ # here we got request_timeout, so this is getUpdates method.
+ if 'request_timeout' in kwargs:
+ request_timeout = kwargs.pop('request_timeout')
+
+ else:
+ # let's check for timeout in params
+ request_timeout = params.pop('timeout', None) if params else None
+ # we will apply default request_timeout if there is no timeout in params
+ # otherwise, we will use timeout parameter applied for payload.
+
+ request_timeout = REQUEST_TIMEOUT if request_timeout is None else request_timeout
+
+
+ # Preparing data by adding all parameters and files to FormData
+ params = _prepare_data(params, files)
+
+ timeout = aiohttp.ClientTimeout(total=request_timeout)
+ got_result = False
+ current_try=0
+ session = await session_manager.get_session()
+ while not got_result and current_try':
+ return os.path.basename(name)
+
+def _prepare_data(params=None, files=None):
+ """
+ Adds the parameters and files to the request.
+
+ :param params:
+ :param files:
+ :return:
+ """
+ data = aiohttp.formdata.FormData(quote_fields=False)
+
+ if params:
+ for key, value in params.items():
+ data.add_field(key, str(value))
+ if files:
+ for key, f in files.items():
+ if isinstance(f, tuple):
+ if len(f) == 2:
+ file_name, file = f
+ if isinstance(file, types.InputFile):
+ file = file.file
+ else:
+ raise ValueError('Tuple must have exactly 2 elements: filename, fileobj')
+ elif isinstance(f, types.InputFile):
+ file_name = f.file_name
+ file = f.file
+ else:
+ file_name, file = _prepare_file(f) or key, f
+
+ data.add_field(key, file, filename=file_name)
+
+ return data
+
+async def _convert_markup(markup):
+ if isinstance(markup, types.JsonSerializable):
+ return markup.to_json()
+ return markup
+
+
+
+async def get_me(token):
+ method_url = r'getMe'
+ return await _process_request(token, method_url)
+
+
+async def log_out(token):
+ method_url = r'logOut'
+ return await _process_request(token, method_url)
+
+
+async def close(token):
+ method_url = r'close'
+ return await _process_request(token, method_url)
+
+
+async def get_file(token, file_id):
+ method_url = r'getFile'
+ return await _process_request(token, method_url, params={'file_id': file_id})
+
+
+async def get_file_url(token, file_id):
+ if FILE_URL is None:
+ return "https://api.telegram.org/file/bot{0}/{1}".format(token, (await get_file(token, file_id))['file_path'])
+ else:
+ # noinspection PyUnresolvedReferences
+ return FILE_URL.format(token, (await get_file(token, file_id))['file_path'])
+
+
+async def download_file(token, file_path):
+ if FILE_URL is None:
+ url = "https://api.telegram.org/file/bot{0}/{1}".format(token, file_path)
+ else:
+ # noinspection PyUnresolvedReferences
+ url = FILE_URL.format(token, file_path)
+ session = await session_manager.get_session()
+ async with session.get(url, proxy=proxy) as response:
+ if response.status != 200:
+ raise ApiHTTPException('Download file', response)
+ result = await response.read()
+
+ return result
+
+
+async def set_webhook(token, url=None, certificate=None, max_connections=None, allowed_updates=None, ip_address=None,
+ drop_pending_updates = None, timeout=None, secret_token=None):
+ method_url = r'setWebhook'
+ payload = {
+ 'url': url if url else "",
+ }
+ files = None
+ if certificate:
+ files = {'certificate': certificate}
+ if max_connections:
+ payload['max_connections'] = max_connections
+ if allowed_updates is not None: # Empty lists should pass
+ payload['allowed_updates'] = json.dumps(allowed_updates)
+ if ip_address is not None: # Empty string should pass
+ payload['ip_address'] = ip_address
+ if drop_pending_updates is not None: # Any bool value should pass
+ payload['drop_pending_updates'] = drop_pending_updates
+ if timeout:
+ payload['timeout'] = timeout
+ if secret_token:
+ payload['secret_token'] = secret_token
+ return await _process_request(token, method_url, params=payload, files=files)
+
+
+async def delete_webhook(token, drop_pending_updates=None, timeout=None):
+ method_url = r'deleteWebhook'
+ payload = {}
+ if drop_pending_updates is not None: # Any bool value should pass
+ payload['drop_pending_updates'] = drop_pending_updates
+ if timeout:
+ payload['timeout'] = timeout
+ return await _process_request(token, method_url, params=payload)
+
+
+async def get_webhook_info(token, timeout=None):
+ method_url = r'getWebhookInfo'
+ payload = {}
+ if timeout:
+ payload['timeout'] = timeout
+ return await _process_request(token, method_url, params=payload)
+
+
+
+async def get_updates(token, offset=None, limit=None,
+ timeout=None, allowed_updates=None, request_timeout=None):
+ method_name = 'getUpdates'
+ params = {}
+ if offset:
+ params['offset'] = offset
+ if limit:
+ params['limit'] = limit
+ if timeout:
+ params['timeout'] = timeout
+ if allowed_updates is not None: # Empty lists should pass
+ params['allowed_updates'] = json.dumps(allowed_updates)
+ return await _process_request(token, method_name, params=params, request_timeout=request_timeout)
+
+async def _check_result(method_name, result: aiohttp.ClientResponse):
+ """
+ Checks whether `result` is a valid API response.
+ A result is considered invalid if:
+ - The server returned an HTTP response code other than 200
+ - The content of the result is invalid JSON.
+ - The method call was unsuccessful (The JSON 'ok' field equals False)
+
+ :raises ApiException: if one of the above listed cases is applicable
+ :param method_name: The name of the method called
+ :param result: The returned result of the method request
+ :return: The result parsed to a JSON dictionary.
+ """
+ try:
+ result_json = await result.json(encoding="utf-8")
+ except:
+ if result.status != 200:
+ raise ApiHTTPException(method_name, result)
+ else:
+ raise ApiInvalidJSONException(method_name, result)
+ else:
+ if not result_json['ok']:
+ raise ApiTelegramException(method_name, result, result_json)
+
+ return result_json
+
+
+async def send_message(
+ token, chat_id, text,
+ reply_markup=None,
+ parse_mode=None, disable_notification=None, timeout=None,
+ entities=None, protect_content=None,
+ message_thread_id=None, reply_parameters=None, link_preview_options=None, business_connection_id=None, message_effect_id=None,
+ allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_name = 'sendMessage'
+ params = {'chat_id': str(chat_id), 'text': text}
+ if link_preview_options is not None:
+ params['link_preview_options'] = json.dumps(link_preview_options.to_dict())
+ if reply_markup:
+ params['reply_markup'] = await _convert_markup(reply_markup)
+ if parse_mode:
+ params['parse_mode'] = parse_mode
+ if disable_notification is not None:
+ params['disable_notification'] = disable_notification
+ if timeout:
+ params['timeout'] = timeout
+ if entities:
+ params['entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(entities))
+ if reply_parameters is not None:
+ params['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if protect_content is not None:
+ params['protect_content'] = protect_content
+ if message_thread_id:
+ params['message_thread_id'] = message_thread_id
+ if business_connection_id:
+ params['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ params['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ params['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ params['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ params['suggested_post_parameters'] = suggested_post_parameters.to_json()
+
+ return await _process_request(token, method_name, params=params, method='post')
+
+# methods
+
+async def get_user_profile_photos(token, user_id, offset=None, limit=None):
+ method_url = r'getUserProfilePhotos'
+ payload = {'user_id': user_id}
+ if offset:
+ payload['offset'] = offset
+ if limit:
+ payload['limit'] = limit
+ return await _process_request(token, method_url, params=payload)
+
+
+async def set_user_emoji_status(token, user_id, emoji_status_custom_emoji_id=None, emoji_status_expiration_date=None):
+ method_url = r'setUserEmojiStatus'
+ payload = {'user_id': user_id}
+ if emoji_status_custom_emoji_id:
+ payload['emoji_status_custom_emoji_id'] = emoji_status_custom_emoji_id
+ if emoji_status_expiration_date:
+ payload['emoji_status_expiration_date'] = emoji_status_expiration_date
+ return await _process_request(token, method_url, params=payload)
+
+async def set_message_reaction(token, chat_id, message_id, reaction=None, is_big=None):
+ method_url = r'setMessageReaction'
+ payload = {'chat_id': chat_id, 'message_id': message_id}
+ if reaction:
+ payload['reaction'] = json.dumps([r.to_dict() for r in reaction])
+ if is_big is not None:
+ payload['is_big'] = is_big
+ return await _process_request(token, method_url, params=payload)
+
+
+async def get_chat(token, chat_id):
+ method_url = r'getChat'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload)
+
+
+async def leave_chat(token, chat_id):
+ method_url = r'leaveChat'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload)
+
+
+async def get_chat_administrators(token, chat_id):
+ method_url = r'getChatAdministrators'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload)
+
+
+async def get_chat_member_count(token, chat_id):
+ method_url = r'getChatMemberCount'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload)
+
+
+
+async def replace_sticker_in_set(token, user_id, name, old_sticker, sticker):
+ method_url = r'replaceStickerInSet'
+ payload = {'user_id': user_id, 'name': name, 'old_sticker': old_sticker, 'sticker': sticker.to_json()}
+ return await _process_request(token, method_url, params=payload)
+
+async def set_sticker_set_thumbnail(token, name, user_id, thumbnail, format):
+ method_url = r'setStickerSetThumbnail'
+ payload = {'name': name, 'user_id': user_id, 'format': format}
+ files = {}
+ if thumbnail:
+ if not isinstance(thumbnail, str):
+ files['thumbnail'] = thumbnail
+ else:
+ payload['thumbnail'] = thumbnail
+
+ return await _process_request(token, method_url, params=payload, files=files or None)
+
+
+async def set_chat_sticker_set(token, chat_id, sticker_set_name):
+ method_url = r'setChatStickerSet'
+ payload = {'chat_id': chat_id, 'sticker_set_name': sticker_set_name}
+ return await _process_request(token, method_url, params=payload)
+
+
+async def delete_chat_sticker_set(token, chat_id):
+ method_url = r'deleteChatStickerSet'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload)
+
+
+async def answer_web_app_query(token, web_app_query_id, result: types.InlineQueryResultBase):
+ method_url = 'answerWebAppQuery'
+ payload = {'web_app_query_id': web_app_query_id, 'result': result.to_json()}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def save_prepared_inline_message(token, user_id, result: types.InlineQueryResultBase, allow_user_chats=None, allow_bot_chats=None, allow_group_chats=None, allow_channel_chats=None):
+ method_url = r'savePreparedInlineMessage'
+ payload = {'user_id': user_id, 'result': result.to_json()}
+ if allow_user_chats is not None:
+ payload['allow_user_chats'] = allow_user_chats
+ if allow_bot_chats is not None:
+ payload['allow_bot_chats'] = allow_bot_chats
+ if allow_group_chats is not None:
+ payload['allow_group_chats'] = allow_group_chats
+ if allow_channel_chats is not None:
+ payload['allow_channel_chats'] = allow_channel_chats
+ return await _process_request(token, method_url, params=payload)
+
+
+async def get_chat_member(token, chat_id, user_id):
+ method_url = r'getChatMember'
+ payload = {'chat_id': chat_id, 'user_id': user_id}
+ return await _process_request(token, method_url, params=payload)
+
+
+async def forward_message(
+ token, chat_id, from_chat_id, message_id,
+ disable_notification=None, timeout=None, protect_content=None,
+ message_thread_id=None, video_start_timestamp=None, direct_messages_topic_id=None,
+ suggested_post_parameters=None):
+ method_url = r'forwardMessage'
+ payload = {'chat_id': chat_id, 'from_chat_id': from_chat_id, 'message_id': message_id}
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if timeout:
+ payload['timeout'] = timeout
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if video_start_timestamp:
+ payload['video_start_timestamp'] = video_start_timestamp
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload)
+
+
+async def copy_message(token, chat_id, from_chat_id, message_id, caption=None, parse_mode=None, caption_entities=None,
+ disable_notification=None,
+ reply_markup=None, timeout=None, protect_content=None, message_thread_id=None, reply_parameters=None, show_caption_above_media=None,
+ allow_paid_broadcast=None, video_start_timestamp=None, direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'copyMessage'
+ payload = {'chat_id': chat_id, 'from_chat_id': from_chat_id, 'message_id': message_id}
+ if caption is not None:
+ payload['caption'] = caption
+ if parse_mode:
+ payload['parse_mode'] = parse_mode
+ if caption_entities is not None:
+ payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup is not None:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if timeout:
+ payload['timeout'] = timeout
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if show_caption_above_media is not None:
+ payload['show_caption_above_media'] = show_caption_above_media
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if video_start_timestamp:
+ payload['video_start_timestamp'] = video_start_timestamp
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload)
+
+async def send_checklist(
+ token, business_connection_id, chat_id, checklist,
+ disable_notification=None, protect_content=None, message_effect_id=None,
+ reply_parameters=None, reply_markup=None
+):
+ method_url = r'sendChecklist'
+ payload = {'chat_id': chat_id, 'checklist': checklist, 'business_connection_id': business_connection_id}
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if reply_parameters:
+ payload['reply_parameters'] = reply_parameters.to_json()
+ if reply_markup:
+ payload['reply_markup'] = _convert_markup(reply_markup)
+ return await _process_request(token, method_url, params=payload)
+
+
+async def edit_message_checklist(
+ token, business_connection_id, chat_id, message_id, checklist,
+ reply_markup=None
+):
+ method_url = r'editMessageChecklist'
+ payload = {'chat_id': chat_id, 'message_id': message_id, 'checklist': checklist, 'business_connection_id': business_connection_id}
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ return await _process_request(token, method_url, params=payload)
+
+async def send_dice(
+ token, chat_id,
+ emoji=None, disable_notification=None,
+ reply_markup=None, timeout=None, protect_content=None,
+ message_thread_id=None,reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None,
+ direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'sendDice'
+ payload = {'chat_id': chat_id}
+ if emoji:
+ payload['emoji'] = emoji
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if timeout:
+ payload['timeout'] = timeout
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload)
+
+
+async def send_photo(
+ token, chat_id, photo,
+ caption=None, reply_markup=None,
+ parse_mode=None, disable_notification=None, timeout=None,
+ caption_entities=None, protect_content=None,
+ message_thread_id=None, has_spoiler=None,reply_parameters=None,
+ business_connection_id=None, message_effect_id=None, show_caption_above_media=None, allow_paid_broadcast=None,
+ direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'sendPhoto'
+ payload = {'chat_id': chat_id}
+ files = None
+ if util.is_string(photo):
+ payload['photo'] = photo
+ elif util.is_pil_image(photo):
+ files = {'photo': util.pil_image_to_file(photo)}
+ else:
+ files = {'photo': photo}
+ if caption:
+ payload['caption'] = caption
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if parse_mode:
+ payload['parse_mode'] = parse_mode
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if timeout:
+ payload['timeout'] = timeout
+ if caption_entities:
+ payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if has_spoiler is not None:
+ payload['has_spoiler'] = has_spoiler
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if show_caption_above_media is not None:
+ payload['show_caption_above_media'] = show_caption_above_media
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+async def send_paid_media(
+ token, chat_id, star_count, media,
+ caption=None, parse_mode=None, caption_entities=None, show_caption_above_media=None,
+ disable_notification=None, protect_content=None, reply_parameters=None, reply_markup=None,
+ business_connection_id=None, payload=None, allow_paid_broadcast=None, direct_messages_topic_id=None,
+ suggested_post_parameters=None):
+ method_url = r'sendPaidMedia'
+ media_json, files = convert_input_media_array(media)
+ _payload = {'chat_id': chat_id, 'star_count': star_count, 'media': media_json}
+ # USE _payload for request payload
+ if caption:
+ _payload['caption'] = caption
+ if parse_mode:
+ _payload['parse_mode'] = parse_mode
+ if caption_entities:
+ _payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if show_caption_above_media is not None:
+ _payload['show_caption_above_media'] = show_caption_above_media
+ if disable_notification is not None:
+ _payload['disable_notification'] = disable_notification
+ if protect_content is not None:
+ _payload['protect_content'] = protect_content
+ if reply_parameters is not None:
+ _payload['reply_parameters'] = reply_parameters.to_json()
+ if reply_markup:
+ _payload['reply_markup'] = _convert_markup(reply_markup)
+ if business_connection_id:
+ _payload['business_connection_id'] = business_connection_id
+ if payload:
+ _payload['payload'] = payload
+ if allow_paid_broadcast is not None:
+ _payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ _payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ _payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+
+ return await _process_request(
+ token, method_url, params=_payload,
+ method='post' if files else 'get',
+ files=files if files else None)
+
+async def send_media_group(
+ token, chat_id, media,
+ disable_notification=None,
+ timeout=None, protect_content=None, message_thread_id=None,reply_parameters=None, business_connection_id=None, message_effect_id=None,
+ allow_paid_broadcast=None, direct_messages_topic_id=None):
+ method_url = r'sendMediaGroup'
+ media_json, files = await convert_input_media_array(media)
+ payload = {'chat_id': chat_id, 'media': media_json}
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if timeout:
+ payload['timeout'] = timeout
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ return await _process_request(
+ token, method_url, params=payload,
+ method='post' if files else 'get',
+ files=files if files else None)
+
+
+async def send_location(
+ token, chat_id, latitude, longitude,
+ live_period=None,
+ reply_markup=None, disable_notification=None,
+ timeout=None, horizontal_accuracy=None, heading=None,
+ proximity_alert_radius=None, protect_content=None, message_thread_id=None,reply_parameters=None, business_connection_id=None,
+ message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'sendLocation'
+ payload = {'chat_id': chat_id, 'latitude': latitude, 'longitude': longitude}
+ if live_period:
+ payload['live_period'] = live_period
+ if horizontal_accuracy:
+ payload['horizontal_accuracy'] = horizontal_accuracy
+ if heading:
+ payload['heading'] = heading
+ if proximity_alert_radius:
+ payload['proximity_alert_radius'] = proximity_alert_radius
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if timeout:
+ payload['timeout'] = timeout
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload)
+
+
+async def edit_message_live_location(
+ token, latitude, longitude, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None,
+ timeout=None, horizontal_accuracy=None, heading=None, proximity_alert_radius=None, live_period=None, business_connection_id=None):
+ method_url = r'editMessageLiveLocation'
+ payload = {'latitude': latitude, 'longitude': longitude}
+ if chat_id:
+ payload['chat_id'] = chat_id
+ if message_id:
+ payload['message_id'] = message_id
+ if horizontal_accuracy:
+ payload['horizontal_accuracy'] = horizontal_accuracy
+ if heading:
+ payload['heading'] = heading
+ if proximity_alert_radius:
+ payload['proximity_alert_radius'] = proximity_alert_radius
+ if live_period:
+ payload['live_period'] = live_period
+ if inline_message_id:
+ payload['inline_message_id'] = inline_message_id
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if timeout:
+ payload['timeout'] = timeout
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ return await _process_request(token, method_url, params=payload)
+
+
+async def stop_message_live_location(
+ token, chat_id=None, message_id=None,
+ inline_message_id=None, reply_markup=None, timeout=None, business_connection_id=None):
+ method_url = r'stopMessageLiveLocation'
+ payload = {}
+ if chat_id:
+ payload['chat_id'] = chat_id
+ if message_id:
+ payload['message_id'] = message_id
+ if inline_message_id:
+ payload['inline_message_id'] = inline_message_id
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if timeout:
+ payload['timeout'] = timeout
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ return await _process_request(token, method_url, params=payload)
+
+
+async def send_venue(
+ token, chat_id, latitude, longitude, title, address,
+ foursquare_id=None, foursquare_type=None, disable_notification=None,
+ reply_markup=None, timeout=None,
+ google_place_id=None,
+ google_place_type=None, protect_content=None, message_thread_id=None,reply_parameters=None, business_connection_id=None,
+ message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'sendVenue'
+ payload = {'chat_id': chat_id, 'latitude': latitude, 'longitude': longitude, 'title': title, 'address': address}
+ if foursquare_id:
+ payload['foursquare_id'] = foursquare_id
+ if foursquare_type:
+ payload['foursquare_type'] = foursquare_type
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if timeout:
+ payload['timeout'] = timeout
+ if google_place_id:
+ payload['google_place_id'] = google_place_id
+ if google_place_type:
+ payload['google_place_type'] = google_place_type
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload)
+
+
+async def send_contact(
+ token, chat_id, phone_number, first_name, last_name=None, vcard=None,
+ disable_notification=None, reply_markup=None, timeout=None,
+ protect_content=None, message_thread_id=None,reply_parameters=None, business_connection_id=None, message_effect_id=None,
+ allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'sendContact'
+ payload = {'chat_id': chat_id, 'phone_number': phone_number, 'first_name': first_name}
+ if last_name:
+ payload['last_name'] = last_name
+ if vcard:
+ payload['vcard'] = vcard
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if timeout:
+ payload['timeout'] = timeout
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload)
+
+
+async def send_chat_action(token, chat_id, action, timeout=None, message_thread_id=None, business_connection_id=None):
+ method_url = r'sendChatAction'
+ payload = {'chat_id': chat_id, 'action': action}
+ if timeout:
+ payload['timeout'] = timeout
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ return await _process_request(token, method_url, params=payload)
+
+
+async def send_video(token, chat_id, data, duration=None, caption=None, reply_markup=None,
+ parse_mode=None, supports_streaming=None, disable_notification=None, timeout=None,
+ thumbnail=None, width=None, height=None, caption_entities=None,
+ protect_content=None, message_thread_id=None, has_spoiler=None,reply_parameters=None, business_connection_id=None,
+ message_effect_id=None, show_caption_above_media=None, allow_paid_broadcast=None, cover=None, start_timestamp=None,
+ direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'sendVideo'
+ payload = {'chat_id': chat_id}
+ files = None
+ if not util.is_string(data):
+ files = {'video': data}
+ else:
+ payload['video'] = data
+ if duration:
+ payload['duration'] = duration
+ if caption:
+ payload['caption'] = caption
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if parse_mode:
+ payload['parse_mode'] = parse_mode
+ if supports_streaming is not None:
+ payload['supports_streaming'] = supports_streaming
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if timeout:
+ payload['timeout'] = timeout
+ if thumbnail:
+ if not util.is_string(thumbnail):
+ if files:
+ files['thumbnail'] = thumbnail
+ else:
+ files = {'thumbnail': thumbnail}
+ else:
+ payload['thumbnail'] = thumbnail
+ if width:
+ payload['width'] = width
+ if height:
+ payload['height'] = height
+ if caption_entities:
+ payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if has_spoiler is not None:
+ payload['has_spoiler'] = has_spoiler
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if show_caption_above_media is not None:
+ payload['show_caption_above_media'] = show_caption_above_media
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if cover:
+ if not util.is_string(cover):
+ if files:
+ files['cover'] = cover
+ else:
+ files = {'cover': cover}
+ else:
+ payload['cover'] = cover
+ if start_timestamp:
+ payload['start_timestamp'] = start_timestamp
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+
+async def send_animation(
+ token, chat_id, data, duration=None, caption=None, reply_markup=None,
+ parse_mode=None, disable_notification=None, timeout=None, thumbnail=None, caption_entities=None,
+ width=None, height=None, protect_content=None, message_thread_id=None,
+ has_spoiler=None,reply_parameters=None, business_connection_id=None, message_effect_id=None, show_caption_above_media=None,
+ allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'sendAnimation'
+ payload = {'chat_id': chat_id}
+ files = None
+ if not util.is_string(data):
+ files = {'animation': data}
+ else:
+ payload['animation'] = data
+ if duration:
+ payload['duration'] = duration
+ if caption:
+ payload['caption'] = caption
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if parse_mode:
+ payload['parse_mode'] = parse_mode
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if timeout:
+ payload['timeout'] = timeout
+ if thumbnail:
+ if not util.is_string(thumbnail):
+ if files:
+ files['thumbnail'] = thumbnail
+ else:
+ files = {'thumbnail': thumbnail}
+ else:
+ payload['thumbnail'] = thumbnail
+ if caption_entities:
+ payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if width:
+ payload['width'] = width
+ if height:
+ payload['height'] = height
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if has_spoiler is not None:
+ payload['has_spoiler'] = has_spoiler
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if show_caption_above_media is not None:
+ payload['show_caption_above_media'] = show_caption_above_media
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+
+async def send_voice(token, chat_id, voice, caption=None, duration=None, reply_markup=None,
+ parse_mode=None, disable_notification=None, timeout=None, caption_entities=None,
+ protect_content=None, message_thread_id=None,reply_parameters=None,business_connection_id=None, message_effect_id=None,
+ allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'sendVoice'
+ payload = {'chat_id': chat_id}
+ files = None
+ if not util.is_string(voice):
+ files = {'voice': voice}
+ else:
+ payload['voice'] = voice
+ if caption:
+ payload['caption'] = caption
+ if duration:
+ payload['duration'] = duration
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if parse_mode:
+ payload['parse_mode'] = parse_mode
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if timeout:
+ payload['timeout'] = timeout
+ if caption_entities:
+ payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+
+async def send_video_note(token, chat_id, data, duration=None, length=None, reply_markup=None,
+ disable_notification=None, timeout=None, thumbnail=None, protect_content=None,
+ message_thread_id=None,reply_parameters=None, business_connection_id=None, message_effect_id=None, allow_paid_broadcast=None,
+ direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'sendVideoNote'
+ payload = {'chat_id': chat_id}
+ files = None
+ if not util.is_string(data):
+ files = {'video_note': data}
+ else:
+ payload['video_note'] = data
+ if duration:
+ payload['duration'] = duration
+ if length and (str(length).isdigit() and int(length) <= 639):
+ payload['length'] = length
+ else:
+ payload['length'] = 639 # seems like it is MAX length size
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if timeout:
+ payload['timeout'] = timeout
+ if thumbnail:
+ if not util.is_string(thumbnail):
+ if files:
+ files['thumbnail'] = thumbnail
+ else:
+ files = {'thumbnail': thumbnail}
+ else:
+ payload['thumbnail'] = thumbnail
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+
+async def send_audio(token, chat_id, audio, caption=None, duration=None, performer=None, title=None,
+ reply_markup=None, parse_mode=None, disable_notification=None, timeout=None, thumbnail=None,
+ caption_entities=None, protect_content=None, message_thread_id=None,reply_parameters=None, business_connection_id=None,
+ message_effect_id=None, allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = r'sendAudio'
+ payload = {'chat_id': chat_id}
+ files = None
+ if not util.is_string(audio):
+ files = {'audio': audio}
+ else:
+ payload['audio'] = audio
+ if caption:
+ payload['caption'] = caption
+ if duration:
+ payload['duration'] = duration
+ if performer:
+ payload['performer'] = performer
+ if title:
+ payload['title'] = title
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if parse_mode:
+ payload['parse_mode'] = parse_mode
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if timeout:
+ payload['timeout'] = timeout
+ if thumbnail:
+ if not util.is_string(thumbnail):
+ if files:
+ files['thumbnail'] = thumbnail
+ else:
+ files = {'thumbnail': thumbnail}
+ else:
+ payload['thumbnail'] = thumbnail
+ if caption_entities:
+ payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+
+async def send_data(token, chat_id, data, data_type, reply_markup=None, parse_mode=None,
+ disable_notification=None, timeout=None, caption=None, thumbnail=None, caption_entities=None,
+ disable_content_type_detection=None, visible_file_name=None, protect_content=None,
+ message_thread_id=None, emoji=None,reply_parameters=None, business_connection_id=None, message_effect_id=None,
+ allow_paid_broadcast=None, direct_messages_topic_id=None, suggested_post_parameters=None):
+ method_url = await get_method_by_type(data_type)
+ payload = {'chat_id': chat_id}
+ files = None
+ if not util.is_string(data):
+ file_data = data
+ if visible_file_name:
+ file_data = (visible_file_name, data)
+ files = {data_type: file_data}
+ else:
+ payload[data_type] = data
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if parse_mode and data_type == 'document':
+ payload['parse_mode'] = parse_mode
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if timeout:
+ payload['timeout'] = timeout
+ if caption:
+ payload['caption'] = caption
+ if thumbnail:
+ if not util.is_string(thumbnail):
+ if files:
+ files['thumbnail'] = thumbnail
+ else:
+ files = {'thumbnail': thumbnail}
+ else:
+ payload['thumbnail'] = thumbnail
+ if caption_entities:
+ payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if method_url == 'sendDocument' and disable_content_type_detection is not None:
+ payload['disable_content_type_detection'] = disable_content_type_detection
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if emoji:
+ payload['emoji'] = emoji
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+
+async def get_method_by_type(data_type):
+ if data_type == 'document':
+ return r'sendDocument'
+ if data_type == 'sticker':
+ return r'sendSticker'
+
+
+async def ban_chat_member(token, chat_id, user_id, until_date=None, revoke_messages=None):
+ method_url = 'banChatMember'
+ payload = {'chat_id': chat_id, 'user_id': user_id}
+ if isinstance(until_date, datetime):
+ payload['until_date'] = until_date.timestamp()
+ else:
+ payload['until_date'] = until_date
+ if revoke_messages is not None:
+ payload['revoke_messages'] = revoke_messages
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def unban_chat_member(token, chat_id, user_id, only_if_banned):
+ method_url = 'unbanChatMember'
+ payload = {'chat_id': chat_id, 'user_id': user_id}
+ if only_if_banned is not None: # None / True / False
+ payload['only_if_banned'] = only_if_banned
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def restrict_chat_member(
+ token, chat_id, user_id, permissions, until_date=None,
+ use_independent_chat_permissions=None):
+ method_url = 'restrictChatMember'
+ payload = {'chat_id': chat_id, 'user_id': user_id, 'permissions': permissions.to_json()}
+
+ if use_independent_chat_permissions is not None:
+ payload['use_independent_chat_permissions'] = use_independent_chat_permissions
+ if until_date is not None:
+ if isinstance(until_date, datetime):
+ payload['until_date'] = until_date.timestamp()
+ else:
+ payload['until_date'] = until_date
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def promote_chat_member(
+ token, chat_id, user_id, can_change_info=None, can_post_messages=None,
+ can_edit_messages=None, can_delete_messages=None, can_invite_users=None,
+ can_restrict_members=None, can_pin_messages=None, can_promote_members=None,
+ is_anonymous=None, can_manage_chat=None, can_manage_video_chats=None, can_manage_topics=None,
+ can_post_stories=None, can_edit_stories=None, can_delete_stories=None,
+ can_manage_direct_messages=None):
+ method_url = 'promoteChatMember'
+ payload = {'chat_id': chat_id, 'user_id': user_id}
+ if can_change_info is not None:
+ payload['can_change_info'] = can_change_info
+ if can_post_messages is not None:
+ payload['can_post_messages'] = can_post_messages
+ if can_edit_messages is not None:
+ payload['can_edit_messages'] = can_edit_messages
+ if can_delete_messages is not None:
+ payload['can_delete_messages'] = can_delete_messages
+ if can_invite_users is not None:
+ payload['can_invite_users'] = can_invite_users
+ if can_restrict_members is not None:
+ payload['can_restrict_members'] = can_restrict_members
+ if can_pin_messages is not None:
+ payload['can_pin_messages'] = can_pin_messages
+ if can_promote_members is not None:
+ payload['can_promote_members'] = can_promote_members
+ if is_anonymous is not None:
+ payload['is_anonymous'] = is_anonymous
+ if can_manage_chat is not None:
+ payload['can_manage_chat'] = can_manage_chat
+ if can_manage_video_chats is not None:
+ payload['can_manage_video_chats'] = can_manage_video_chats
+ if can_manage_topics is not None:
+ payload['can_manage_topics'] = can_manage_topics
+ if can_post_stories is not None:
+ payload['can_post_stories'] = can_post_stories
+ if can_edit_stories is not None:
+ payload['can_edit_stories'] = can_edit_stories
+ if can_delete_stories is not None:
+ payload['can_delete_stories'] = can_delete_stories
+ if can_manage_direct_messages is not None:
+ payload['can_manage_direct_messages'] = can_manage_direct_messages
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def set_chat_administrator_custom_title(token, chat_id, user_id, custom_title):
+ method_url = 'setChatAdministratorCustomTitle'
+ payload = {
+ 'chat_id': chat_id, 'user_id': user_id, 'custom_title': custom_title
+ }
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def ban_chat_sender_chat(token, chat_id, sender_chat_id):
+ method_url = 'banChatSenderChat'
+ payload = {'chat_id': chat_id, 'sender_chat_id': sender_chat_id}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def unban_chat_sender_chat(token, chat_id, sender_chat_id):
+ method_url = 'unbanChatSenderChat'
+ payload = {'chat_id': chat_id, 'sender_chat_id': sender_chat_id}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def set_chat_permissions(token, chat_id, permissions, use_independent_chat_permissions=None):
+ method_url = 'setChatPermissions'
+ payload = {
+ 'chat_id': chat_id,
+ 'permissions': permissions.to_json()
+ }
+ if use_independent_chat_permissions is not None:
+ payload['use_independent_chat_permissions'] = use_independent_chat_permissions
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def create_chat_invite_link(token, chat_id, name, expire_date, member_limit, creates_join_request):
+ method_url = 'createChatInviteLink'
+ payload = {
+ 'chat_id': chat_id
+ }
+
+ if expire_date is not None:
+ if isinstance(expire_date, datetime):
+ payload['expire_date'] = expire_date.timestamp()
+ else:
+ payload['expire_date'] = expire_date
+ if member_limit:
+ payload['member_limit'] = member_limit
+ if creates_join_request is not None:
+ payload['creates_join_request'] = creates_join_request
+ if name:
+ payload['name'] = name
+
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def edit_chat_invite_link(token, chat_id, invite_link, name, expire_date, member_limit, creates_join_request):
+ method_url = 'editChatInviteLink'
+ payload = {
+ 'chat_id': chat_id,
+ 'invite_link': invite_link
+ }
+
+ if expire_date is not None:
+ if isinstance(expire_date, datetime):
+ payload['expire_date'] = expire_date.timestamp()
+ else:
+ payload['expire_date'] = expire_date
+
+ if member_limit is not None:
+ payload['member_limit'] = member_limit
+ if name:
+ payload['name'] = name
+ if creates_join_request is not None:
+ payload['creates_join_request'] = creates_join_request
+
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def create_chat_subscription_invite_link(token, chat_id, subscription_period, subscription_price, name=None):
+ method_url = 'createChatSubscriptionInviteLink'
+ payload = {
+ 'chat_id': chat_id,
+ 'subscription_period': subscription_period,
+ 'subscription_price': subscription_price
+ }
+ if name:
+ payload['name'] = name
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def edit_chat_subscription_invite_link(token, chat_id, invite_link, name=None):
+ method_url = 'editChatSubscriptionInviteLink'
+ payload = {
+ 'chat_id': chat_id,
+ 'invite_link': invite_link
+ }
+ if name:
+ payload['name'] = name
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def revoke_chat_invite_link(token, chat_id, invite_link):
+ method_url = 'revokeChatInviteLink'
+ payload = {
+ 'chat_id': chat_id,
+ 'invite_link': invite_link
+ }
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def export_chat_invite_link(token, chat_id):
+ method_url = 'exportChatInviteLink'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def approve_chat_join_request(token, chat_id, user_id):
+ method_url = 'approveChatJoinRequest'
+ payload = {
+ 'chat_id': chat_id,
+ 'user_id': user_id
+ }
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def decline_chat_join_request(token, chat_id, user_id):
+ method_url = 'declineChatJoinRequest'
+ payload = {
+ 'chat_id': chat_id,
+ 'user_id': user_id
+ }
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def set_chat_photo(token, chat_id, photo):
+ method_url = 'setChatPhoto'
+ payload = {'chat_id': chat_id}
+ files = None
+ if util.is_string(photo):
+ payload['photo'] = photo
+ elif util.is_pil_image(photo):
+ files = {'photo': util.pil_image_to_file(photo)}
+ else:
+ files = {'photo': photo}
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+
+async def delete_chat_photo(token, chat_id):
+ method_url = 'deleteChatPhoto'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def set_chat_title(token, chat_id, title):
+ method_url = 'setChatTitle'
+ payload = {'chat_id': chat_id, 'title': title}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def set_my_description(token, description=None, language_code=None):
+ method_url = r'setMyDescription'
+ payload = {}
+ if description is not None:
+ payload['description'] = description
+ if language_code is not None:
+ payload['language_code'] = language_code
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def get_my_description(token, language_code=None):
+ method_url = r'getMyDescription'
+ payload = {}
+ if language_code:
+ payload['language_code'] = language_code
+ return await _process_request(token, method_url, params=payload)
+
+async def set_my_short_description(token, short_description=None, language_code=None):
+ method_url = r'setMyShortDescription'
+ payload = {}
+ if short_description is not None:
+ payload['short_description'] = short_description
+ if language_code is not None:
+ payload['language_code'] = language_code
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def get_my_short_description(token, language_code=None):
+ method_url = r'getMyShortDescription'
+ payload = {}
+ if language_code:
+ payload['language_code'] = language_code
+ return await _process_request(token, method_url, params=payload)
+
+async def get_my_commands(token, scope=None, language_code=None):
+ method_url = r'getMyCommands'
+ payload = {}
+ if scope:
+ payload['scope'] = scope.to_json()
+ if language_code:
+ payload['language_code'] = language_code
+ return await _process_request(token, method_url, params=payload)
+
+
+async def set_my_name(token, name=None, language_code=None):
+ method_url = r'setMyName'
+ payload = {}
+ if name is not None:
+ payload['name'] = name
+ if language_code is not None:
+ payload['language_code'] = language_code
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def get_my_name(token, language_code=None):
+ method_url = r'getMyName'
+ payload = {}
+ if language_code is not None:
+ payload['language_code'] = language_code
+ return await _process_request(token, method_url, params=payload)
+
+async def set_chat_menu_button(token, chat_id=None, menu_button=None):
+ method_url = r'setChatMenuButton'
+ payload = {}
+ if chat_id:
+ payload['chat_id'] = chat_id
+ if menu_button:
+ payload['menu_button'] = menu_button.to_json()
+
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def get_chat_menu_button(token, chat_id=None):
+ method_url = r'getChatMenuButton'
+ payload = {}
+ if chat_id:
+ payload['chat_id'] = chat_id
+
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def set_my_default_administrator_rights(token, rights=None, for_channels=None):
+ method_url = r'setMyDefaultAdministratorRights'
+ payload = {}
+ if rights:
+ payload['rights'] = rights.to_json()
+ if for_channels is not None:
+ payload['for_channels'] = for_channels
+
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def get_my_default_administrator_rights(token, for_channels=None):
+ method_url = r'getMyDefaultAdministratorRights'
+ payload = {}
+ if for_channels:
+ payload['for_channels'] = for_channels
+
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def set_my_commands(token, commands, scope=None, language_code=None):
+ method_url = r'setMyCommands'
+ payload = {'commands': await _convert_list_json_serializable(commands)}
+ if scope:
+ payload['scope'] = scope.to_json()
+ if language_code:
+ payload['language_code'] = language_code
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def get_business_connection(token, business_connection_id):
+ method_url = 'getBusinessConnection'
+ payload = {'business_connection_id': business_connection_id}
+ return await _process_request(token, method_url, params=payload , method='post')
+
+async def delete_my_commands(token, scope=None, language_code=None):
+ method_url = r'deleteMyCommands'
+ payload = {}
+ if scope:
+ payload['scope'] = scope.to_json()
+ if language_code:
+ payload['language_code'] = language_code
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def set_chat_description(token, chat_id, description):
+ method_url = 'setChatDescription'
+ payload = {'chat_id': chat_id}
+ if description is not None: # Allow empty strings
+ payload['description'] = description
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def pin_chat_message(token, chat_id, message_id, disable_notification=None, business_connection_id=None):
+ method_url = 'pinChatMessage'
+ payload = {'chat_id': chat_id, 'message_id': message_id}
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def unpin_chat_message(token, chat_id, message_id, business_connection_id=None):
+ method_url = 'unpinChatMessage'
+ payload = {'chat_id': chat_id}
+ if message_id:
+ payload['message_id'] = message_id
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def unpin_all_chat_messages(token, chat_id):
+ method_url = 'unpinAllChatMessages'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+# Updating messages
+
+async def edit_message_text(
+ token, text, chat_id=None, message_id=None, inline_message_id=None, parse_mode=None, entities = None,
+ reply_markup=None, link_preview_options=None, business_connection_id=None, timeout=None):
+ method_url = r'editMessageText'
+ payload = {'text': text}
+ if chat_id:
+ payload['chat_id'] = chat_id
+ if message_id:
+ payload['message_id'] = message_id
+ if inline_message_id:
+ payload['inline_message_id'] = inline_message_id
+ if parse_mode:
+ payload['parse_mode'] = parse_mode
+ if entities:
+ payload['entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(entities))
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if link_preview_options is not None:
+ payload['link_preview_options'] = link_preview_options.to_json()
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if timeout:
+ payload['timeout'] = timeout
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def edit_message_caption(
+ token, caption, chat_id=None, message_id=None, inline_message_id=None, parse_mode=None, caption_entities=None,
+ reply_markup=None, show_caption_above_media=None, business_connection_id=None, timeout=None):
+ method_url = r'editMessageCaption'
+ payload = {'caption': caption}
+ if chat_id:
+ payload['chat_id'] = chat_id
+ if message_id:
+ payload['message_id'] = message_id
+ if inline_message_id:
+ payload['inline_message_id'] = inline_message_id
+ if parse_mode:
+ payload['parse_mode'] = parse_mode
+ if caption_entities:
+ payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if show_caption_above_media is not None:
+ payload['show_caption_above_media'] = show_caption_above_media
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if timeout:
+ payload['timeout'] = timeout
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def edit_message_media(
+ token, media, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None,
+ business_connection_id=None, timeout=None):
+ method_url = r'editMessageMedia'
+ media_json, file = await convert_input_media(media)
+ payload = {'media': media_json}
+ if chat_id:
+ payload['chat_id'] = chat_id
+ if message_id:
+ payload['message_id'] = message_id
+ if inline_message_id:
+ payload['inline_message_id'] = inline_message_id
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if timeout:
+ payload['timeout'] = timeout
+ return await _process_request(token, method_url, params=payload, files=file, method='post' if file else 'get')
+
+
+async def edit_message_reply_markup(
+ token, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None, business_connection_id=None,
+ timeout=None):
+ method_url = r'editMessageReplyMarkup'
+ payload = {}
+ if chat_id:
+ payload['chat_id'] = chat_id
+ if message_id:
+ payload['message_id'] = message_id
+ if inline_message_id:
+ payload['inline_message_id'] = inline_message_id
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if timeout:
+ payload['timeout'] = timeout
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def approve_suggested_post(token, chat_id, message_id, send_date=None):
+ method_url = r'approveSuggestedPost'
+ payload = {'chat_id': chat_id, 'message_id': message_id}
+ if send_date is not None:
+ payload['send_date'] = send_date
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def decline_suggested_post(token, chat_id, message_id, comment=None):
+ method_url = r'declineSuggestedPost'
+ payload = {'chat_id': chat_id, 'message_id': message_id}
+ if comment is not None:
+ payload['comment'] = comment
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def delete_message(token, chat_id, message_id, timeout=None):
+ method_url = r'deleteMessage'
+ payload = {'chat_id': chat_id, 'message_id': message_id}
+ if timeout:
+ payload['timeout'] = timeout
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+# Game
+
+async def send_game(
+ token, chat_id, game_short_name,
+ disable_notification=None, reply_markup=None, timeout=None,
+ protect_content=None, message_thread_id=None,reply_parameters=None, business_connection_id=None, message_effect_id=None,
+ allow_paid_broadcast=None):
+ method_url = r'sendGame'
+ payload = {'chat_id': chat_id, 'game_short_name': game_short_name}
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if timeout:
+ payload['timeout'] = timeout
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ return await _process_request(token, method_url, params=payload)
+
+
+# https://core.telegram.org/bots/api#setgamescore
+async def set_game_score(token, user_id, score, force=None, disable_edit_message=None, chat_id=None, message_id=None,
+ inline_message_id=None):
+ """
+ Use this method to set the score of the specified user in a game. On success, if the message was sent by the bot, returns the edited Message, otherwise returns True. Returns an error, if the new score is not greater than the user's current score in the chat.
+ :param token: Bot's token (you don't need to fill this)
+ :param user_id: User identifier
+ :param score: New score, must be non-negative
+ :param force: (Optional) Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters
+ :param disable_edit_message: (Optional) Pass True, if the game message should not be automatically edited to include the current scoreboard
+ :param chat_id: (Optional, required if inline_message_id is not specified) Unique identifier for the target chat (or username of the target channel in the format @channelusername)
+ :param message_id: (Optional, required if inline_message_id is not specified) Unique identifier of the sent message
+ :param inline_message_id: (Optional, required if chat_id and message_id are not specified) Identifier of the inline message
+ :return:
+ """
+ method_url = r'setGameScore'
+ payload = {'user_id': user_id, 'score': score}
+ if force is not None:
+ payload['force'] = force
+ if chat_id:
+ payload['chat_id'] = chat_id
+ if message_id:
+ payload['message_id'] = message_id
+ if inline_message_id:
+ payload['inline_message_id'] = inline_message_id
+ if disable_edit_message is not None:
+ payload['disable_edit_message'] = disable_edit_message
+ return await _process_request(token, method_url, params=payload)
+
+
+# https://core.telegram.org/bots/api#getgamehighscores
+async def get_game_high_scores(token, user_id, chat_id=None, message_id=None, inline_message_id=None):
+ """
+ Use this method to get data for high score tables. Will return the score of the specified user and several of his neighbors in a game. On success, returns an Array of GameHighScore objects.
+ This method will currently return scores for the target user, plus two of his closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change.
+ :param token: Bot's token (you don't need to fill this)
+ :param user_id: Target user id
+ :param chat_id: (Optional, required if inline_message_id is not specified) Unique identifier for the target chat (or username of the target channel in the format @channelusername)
+ :param message_id: (Optional, required if inline_message_id is not specified) Unique identifier of the sent message
+ :param inline_message_id: (Optional, required if chat_id and message_id are not specified) Identifier of the inline message
+ :return:
+ """
+ method_url = r'getGameHighScores'
+ payload = {'user_id': user_id}
+ if chat_id:
+ payload['chat_id'] = chat_id
+ if message_id:
+ payload['message_id'] = message_id
+ if inline_message_id:
+ payload['inline_message_id'] = inline_message_id
+ return await _process_request(token, method_url, params=payload)
+
+
+# Payments (https://core.telegram.org/bots/api#payments)
+
+async def send_invoice(
+ token, chat_id, title, description, invoice_payload, provider_token, currency, prices,
+ start_parameter = None, photo_url=None, photo_size=None, photo_width=None, photo_height=None,
+ need_name=None, need_phone_number=None, need_email=None, need_shipping_address=None,
+ send_phone_number_to_provider = None, send_email_to_provider = None, is_flexible=None,
+ disable_notification=None, reply_markup=None, provider_data=None,
+ timeout=None, max_tip_amount=None, suggested_tip_amounts=None,
+ protect_content=None, message_thread_id=None, reply_parameters=None, message_effect_id=None, allow_paid_broadcast=None,
+ direct_messages_topic_id=None, suggested_post_parameters=None):
+ """
+ Use this method to send invoices. On success, the sent Message is returned.
+ :param token: Bot's token (you don't need to fill this)
+ :param chat_id: Unique identifier for the target private chat
+ :param title: Product name
+ :param description: Product description
+ :param invoice_payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
+ :param provider_token: Payments provider token, obtained via @Botfather
+ :param currency: Three-letter ISO 4217 currency code, see https://core.telegram.org/bots/payments#supported-currencies
+ :param prices: Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
+ :param start_parameter: Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter
+ :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.
+ :param photo_size: Photo size
+ :param photo_width: Photo width
+ :param photo_height: Photo height
+ :param need_name: Pass True, if you require the user's full name to complete the order
+ :param need_phone_number: Pass True, if you require the user's phone number to complete the order
+ :param need_email: Pass True, if you require the user's email to complete the order
+ :param need_shipping_address: Pass True, if you require the user's shipping address to complete the order
+ :param is_flexible: Pass True, if the final price depends on the shipping method
+ :param send_phone_number_to_provider: Pass True, if user's phone number should be sent to provider
+ :param send_email_to_provider: Pass True, if user's email address should be sent to provider
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
+ :param reply_markup: A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button
+ :param provider_data: A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
+ :param timeout:
+ :param max_tip_amount: The maximum accepted amount for tips in the smallest units of the currency
+ :param suggested_tip_amounts: A JSON-serialized array of suggested amounts of tips in the smallest units of the currency.
+ At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
+ :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
+ :param reply_parameters: A JSON-serialized object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
+ :param allow_paid_broadcast:
+ :return:
+ """
+ method_url = r'sendInvoice'
+ payload = {'chat_id': chat_id, 'title': title, 'description': description, 'payload': invoice_payload,
+ 'currency': currency,
+ 'prices': await _convert_list_json_serializable(prices)}
+ if start_parameter:
+ payload['start_parameter'] = start_parameter
+ if photo_url:
+ payload['photo_url'] = photo_url
+ if photo_size:
+ payload['photo_size'] = photo_size
+ if photo_width:
+ payload['photo_width'] = photo_width
+ if photo_height:
+ payload['photo_height'] = photo_height
+ if need_name is not None:
+ payload['need_name'] = need_name
+ if need_phone_number is not None:
+ payload['need_phone_number'] = need_phone_number
+ if need_email is not None:
+ payload['need_email'] = need_email
+ if need_shipping_address is not None:
+ payload['need_shipping_address'] = need_shipping_address
+ if send_phone_number_to_provider is not None:
+ payload['send_phone_number_to_provider'] = send_phone_number_to_provider
+ if send_email_to_provider is not None:
+ payload['send_email_to_provider'] = send_email_to_provider
+ if is_flexible is not None:
+ payload['is_flexible'] = is_flexible
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if provider_data:
+ payload['provider_data'] = provider_data
+ if timeout:
+ payload['timeout'] = timeout
+ if max_tip_amount is not None:
+ payload['max_tip_amount'] = max_tip_amount
+ if suggested_tip_amounts is not None:
+ payload['suggested_tip_amounts'] = json.dumps(suggested_tip_amounts)
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if provider_token is not None:
+ payload['provider_token'] = provider_token
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+ if suggested_post_parameters is not None:
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
+ return await _process_request(token, method_url, params=payload)
+
+
+async def answer_shipping_query(token, shipping_query_id, ok, shipping_options=None, error_message=None):
+ """
+ If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.
+ :param token: Bot's token (you don't need to fill this)
+ :param shipping_query_id: Unique identifier for the query to be answered
+ :param ok: Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)
+ :param shipping_options: Required if ok is True. A JSON-serialized array of available shipping options.
+ :param error_message: Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
+ :return:
+ """
+ method_url = 'answerShippingQuery'
+ payload = {'shipping_query_id': shipping_query_id, 'ok': ok}
+ if shipping_options:
+ payload['shipping_options'] = await _convert_list_json_serializable(shipping_options)
+ if error_message:
+ payload['error_message'] = error_message
+ return await _process_request(token, method_url, params=payload)
+
+
+async def answer_pre_checkout_query(token, pre_checkout_query_id, ok, error_message=None):
+ """
+ Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
+ :param token: Bot's token (you don't need to fill this)
+ :param pre_checkout_query_id: Unique identifier for the query to be answered
+ :param ok: Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.
+ :param error_message: Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.
+ :return:
+ """
+ method_url = 'answerPreCheckoutQuery'
+ payload = {'pre_checkout_query_id': pre_checkout_query_id, 'ok': ok}
+ if error_message:
+ payload['error_message'] = error_message
+ return await _process_request(token, method_url, params=payload)
+
+
+async def get_my_star_balance(token):
+ method_url = 'getMyStarBalance'
+ return await _process_request(token, method_url)
+
+async def get_star_transactions(token, offset=None, limit=None):
+ method_url = 'getStarTransactions'
+ payload = {}
+ if offset:
+ payload['offset'] = offset
+ if limit:
+ payload['limit'] = limit
+ return await _process_request(token, method_url, params=payload)
+
+async def refund_star_payment(token, user_id, telegram_payment_charge_id):
+ method_url = 'refundStarPayment'
+ payload = {'user_id': user_id, 'telegram_payment_charge_id': telegram_payment_charge_id}
+ return await _process_request(token, method_url, params=payload)
+
+
+async def edit_user_star_subscription(token, user_id, telegram_payment_charge_id, is_canceled):
+ method_url = 'editUserStarSubscription'
+ payload = {'user_id': user_id, 'telegram_payment_charge_id': telegram_payment_charge_id, 'is_canceled': is_canceled}
+ return await _process_request(token, method_url, params=payload)
+
+
+async def unpin_all_general_forum_topic_messages(token, chat_id):
+ method_url = 'unpinAllGeneralForumTopicMessages'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload)
+
+# InlineQuery
+
+async def answer_callback_query(token, callback_query_id, text=None, show_alert=None, url=None, cache_time=None):
+ """
+ Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
+ Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via BotFather and accept the terms. Otherwise, you may use links like telegram.me/your_bot?start=XXXX that open your bot with a parameter.
+ :param token: Bot's token (you don't need to fill this)
+ :param callback_query_id: Unique identifier for the query to be answered
+ :param text: (Optional) Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters
+ :param show_alert: (Optional) If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
+ :param url: (Optional) URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game – note that this will only work if the query comes from a callback_game button.
+ Otherwise, you may use links like telegram.me/your_bot?start=XXXX that open your bot with a parameter.
+ :param cache_time: (Optional) The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
+ :return:
+ """
+ method_url = 'answerCallbackQuery'
+ payload = {'callback_query_id': callback_query_id}
+ if text:
+ payload['text'] = text
+ if show_alert is not None:
+ payload['show_alert'] = show_alert
+ if url:
+ payload['url'] = url
+ if cache_time is not None:
+ payload['cache_time'] = cache_time
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def get_user_chat_boosts(token, chat_id, user_id):
+ method_url = 'getUserChatBoosts'
+ payload = {'chat_id': chat_id, 'user_id': user_id}
+ return await _process_request(token, method_url, params=payload)
+
+async def answer_inline_query(token, inline_query_id, results, cache_time=None, is_personal=None, next_offset=None,
+ button=None):
+ method_url = 'answerInlineQuery'
+ payload = {'inline_query_id': inline_query_id, 'results': await _convert_list_json_serializable(results)}
+ if cache_time is not None:
+ payload['cache_time'] = cache_time
+ if is_personal is not None:
+ payload['is_personal'] = is_personal
+ if next_offset is not None:
+ payload['next_offset'] = next_offset
+ if button is not None:
+ payload["button"] = button.to_json()
+
+
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def get_sticker_set(token, name):
+ method_url = 'getStickerSet'
+ return await _process_request(token, method_url, params={'name': name})
+
+async def get_custom_emoji_stickers(token, custom_emoji_ids):
+ method_url = r'getCustomEmojiStickers'
+ return await _process_request(token, method_url, params={'custom_emoji_ids': json.dumps(custom_emoji_ids)})
+
+async def set_sticker_keywords(token, sticker, keywords=None):
+ method_url = 'setStickerKeywords'
+ payload = {'sticker': sticker}
+ if keywords:
+ payload['keywords'] = json.dumps(keywords)
+
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def set_sticker_mask_position(token, sticker, mask_position=None):
+ method_url = 'setStickerMaskPosition'
+ payload = {'sticker': sticker}
+ if mask_position:
+ payload['mask_position'] = mask_position.to_json()
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def upload_sticker_file(token, user_id, sticker, sticker_format):
+ method_url = 'uploadStickerFile'
+ payload = {'user_id': user_id, 'sticker_format': sticker_format}
+ files = {'sticker': sticker}
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+async def set_sticker_emoji_list(token, sticker, emoji_list):
+ method_url = 'setStickerEmojiList'
+ payload = {'sticker': sticker, 'emoji_list': json.dumps(emoji_list)}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def delete_sticker_set(token, name):
+ method_url = 'deleteStickerSet'
+ payload = {'name': name}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def send_gift(token, gift_id, text=None, text_parse_mode=None, text_entities=None, pay_for_upgrade=None,
+ user_id=None, chat_id=None):
+ method_url = 'sendGift'
+ payload = {'user_id': user_id, 'gift_id': gift_id}
+ if text:
+ payload['text'] = text
+ if text_parse_mode:
+ payload['text_parse_mode'] = text_parse_mode
+ if text_entities:
+ payload['text_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(text_entities))
+ if pay_for_upgrade is not None:
+ payload['pay_for_upgrade'] = pay_for_upgrade
+ if chat_id:
+ payload['chat_id'] = chat_id
+ if user_id:
+ payload['user_id'] = user_id
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def verify_user(token, user_id, custom_description=None):
+ method_url = 'verifyUser'
+ payload = {'user_id': user_id}
+ if custom_description:
+ payload['custom_description'] = custom_description
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def verify_chat(token, chat_id, custom_description=None):
+ method_url = 'verifyChat'
+ payload = {'chat_id': chat_id}
+ if custom_description:
+ payload['custom_description'] = custom_description
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def remove_user_verification(token, user_id):
+ method_url = 'removeUserVerification'
+ payload = {'user_id': user_id}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def remove_chat_verification(token, chat_id):
+ method_url = 'removeChatVerification'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def read_business_message(token, business_connection_id, chat_id, message_id):
+ method_url = 'readBusinessMessage'
+ payload = {'business_connection_id': business_connection_id, 'chat_id': chat_id, 'message_id': message_id}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def delete_business_messages(token, business_connection_id, message_ids):
+ method_url = 'deleteBusinessMessages'
+ payload = {'business_connection_id': business_connection_id, 'message_ids': json.dumps(message_ids)}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def set_business_account_name(token, business_connection_id, first_name, last_name=None):
+ method_url = 'setBusinessAccountName'
+ payload = {'business_connection_id': business_connection_id, 'first_name': first_name}
+ if last_name:
+ payload['last_name'] = last_name
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def set_business_account_username(token, business_connection_id, username=None):
+ method_url = 'setBusinessAccountUsername'
+ payload = {'business_connection_id': business_connection_id}
+ if username is not None:
+ payload['username'] = username
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def set_business_account_bio(token, business_connection_id, bio=None):
+ method_url = 'setBusinessAccountBio'
+ payload = {'business_connection_id': business_connection_id}
+ if bio:
+ payload['bio'] = bio
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def set_business_account_gift_settings(token, business_connection_id, show_gift_button, accepted_gift_types):
+ method_url = 'setBusinessAccountGiftSettings'
+ payload = {'business_connection_id': business_connection_id, 'show_gift_button': show_gift_button, 'accepted_gift_types': accepted_gift_types.to_json()}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def get_business_account_star_balance(token, business_connection_id):
+ method_url = 'getBusinessAccountStarBalance'
+ payload = {'business_connection_id': business_connection_id}
+ return _process_request(token, method_url, params=payload)
+
+async def transfer_business_account_stars(token, business_connection_id, star_count):
+ method_url = 'transferBusinessAccountStars'
+ payload = {'business_connection_id': business_connection_id, 'star_count': star_count}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def get_business_account_gifts(token, business_connection_id, exclude_unsaved=None, exclude_saved=None,
+ exclude_unlimited=None, exclude_limited=None, exclude_unique=None,
+ sort_by_price=None, offset=None, limit=None):
+ method_url = 'getBusinessAccountGifts'
+ payload = {'business_connection_id': business_connection_id}
+ if exclude_unsaved is not None:
+ payload['exclude_unsaved'] = exclude_unsaved
+ if exclude_saved is not None:
+ payload['exclude_saved'] = exclude_saved
+ if exclude_unlimited is not None:
+ payload['exclude_unlimited'] = exclude_unlimited
+ if exclude_limited is not None:
+ payload['exclude_limited'] = exclude_limited
+ if exclude_unique is not None:
+ payload['exclude_unique'] = exclude_unique
+ if sort_by_price is not None:
+ payload['sort_by_price'] = sort_by_price
+ if offset is not None:
+ payload['offset'] = offset
+ if limit is not None:
+ payload['limit'] = limit
+ return await _process_request(token, method_url, params=payload)
+
+async def convert_gift_to_stars(token, business_connection_id, owned_gift_id):
+ method_url = 'convertGiftToStars'
+ payload = {'business_connection_id': business_connection_id, 'owned_gift_id': owned_gift_id}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def upgrade_gift(token, business_connection_id, owned_gift_id, keep_original_details=None, star_count=None):
+ method_url = 'upgradeGift'
+ payload = {'business_connection_id': business_connection_id, 'owned_gift_id': owned_gift_id}
+ if keep_original_details is not None:
+ payload['keep_original_details'] = keep_original_details
+ if star_count is not None:
+ payload['star_count'] = star_count
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def transfer_gift(token, business_connection_id, owned_gift_id, new_owner_chat_id, star_count=None):
+ method_url = 'transferGift'
+ payload = {'business_connection_id': business_connection_id, 'owned_gift_id': owned_gift_id, 'new_owner_chat_id': new_owner_chat_id}
+ if star_count is not None:
+ payload['star_count'] = star_count
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def post_story(token, business_connection_id, content, active_period, caption=None, parse_mode=None,
+ caption_entities=None, areas=None, post_to_chat_page=None, protect_content=None):
+ method_url = 'postStory'
+ payload = {'business_connection_id': business_connection_id, 'active_period': active_period}
+
+ content_json, files = content.convert_input_story()
+ payload['content'] = content_json
+
+ if caption:
+ payload['caption'] = caption
+ if parse_mode:
+ payload['parse_mode'] = parse_mode
+ if caption_entities:
+ payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if areas:
+ payload['areas'] = json.dumps([area.to_dict() for area in areas])
+ if post_to_chat_page is not None:
+ payload['post_to_chat_page'] = post_to_chat_page
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+async def edit_story(token, business_connection_id, story_id, content, caption=None, parse_mode=None,
+ caption_entities=None, areas=None):
+ method_url = 'editStory'
+ payload = {'business_connection_id': business_connection_id, 'story_id': story_id}
+
+ content_json, files = content.convert_input_story()
+ payload['content'] = content_json
+
+ if caption:
+ payload['caption'] = caption
+ if parse_mode:
+ payload['parse_mode'] = parse_mode
+ if caption_entities:
+ payload['caption_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(caption_entities))
+ if areas:
+ payload['areas'] = json.dumps([area.to_dict() for area in areas])
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+async def delete_story(token, business_connection_id, story_id):
+ method_url = 'deleteStory'
+ payload = {'business_connection_id': business_connection_id, 'story_id': story_id}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def gift_premium_subscription(token, user_id, month_count, star_count, text=None, text_parse_mode=None,
+ text_entities=None):
+ method_url = 'giftPremiumSubscription'
+ payload = {'user_id': user_id, 'month_count': month_count, 'star_count': star_count}
+ if text:
+ payload['text'] = text
+ if text_parse_mode:
+ payload['text_parse_mode'] = text_parse_mode
+ if text_entities:
+ payload['text_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(text_entities))
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def set_business_account_profile_photo(token, business_connection_id, photo, is_public=None):
+ method_url = 'setBusinessAccountProfilePhoto'
+ payload = {'business_connection_id': business_connection_id}
+ photo_json, files = photo.convert_input_profile_photo()
+ payload['photo'] = photo_json
+ if is_public is not None:
+ payload['is_public'] = is_public
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+async def remove_business_account_profile_photo(token, business_connection_id, is_public=None):
+ method_url = 'removeBusinessAccountProfilePhoto'
+ payload = {'business_connection_id': business_connection_id}
+ if is_public is not None:
+ payload['is_public'] = is_public
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def get_available_gifts(token):
+ method_url = 'getAvailableGifts'
+ return await _process_request(token, method_url)
+
+async def set_custom_emoji_sticker_set_thumbnail(token, name, custom_emoji_id=None):
+ method_url = 'setCustomEmojiStickerSetThumbnail'
+ payload = {'name': name}
+ if custom_emoji_id is not None:
+ payload['custom_emoji_id'] = custom_emoji_id
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def set_sticker_set_title(token, name, title):
+ method_url = 'setStickerSetTitle'
+ payload = {'name': name, 'title': title}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+async def create_new_sticker_set(
+ token, user_id, name, title, stickers, sticker_type=None, needs_repainting=None):
+ method_url = 'createNewStickerSet'
+ payload = {'user_id': user_id, 'name': name, 'title': title}
+ if sticker_type:
+ payload['sticker_type'] = sticker_type
+ if needs_repainting is not None:
+ payload['needs_repainting'] = needs_repainting
+
+ files = {}
+ lst = []
+
+ for sticker in stickers:
+ json_dict, file = sticker.convert_input_sticker()
+ json_dict = sticker.to_dict()
+
+ if file:
+ list_keys = list(file.keys())
+ files[list_keys[0]] = file[list_keys[0]]
+ lst.append(json_dict)
+
+ payload['stickers'] = json.dumps(lst)
+
+
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+
+async def add_sticker_to_set(token, user_id, name, sticker):
+ method_url = 'addStickerToSet'
+ json_dict, files = sticker.convert_input_sticker()
+ payload = {'user_id': user_id, 'name': name, 'sticker': json_dict}
+
+
+ return await _process_request(token, method_url, params=payload, files=files, method='post')
+
+
+async def set_sticker_position_in_set(token, sticker, position):
+ method_url = 'setStickerPositionInSet'
+ payload = {'sticker': sticker, 'position': position}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+async def delete_sticker_from_set(token, sticker):
+ method_url = 'deleteStickerFromSet'
+ payload = {'sticker': sticker}
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+
+async def create_invoice_link(token, title, description, payload, provider_token,
+ currency, prices, max_tip_amount=None, suggested_tip_amounts=None, provider_data=None,
+ photo_url=None, photo_size=None, photo_width=None, photo_height=None, need_name=None, need_phone_number=None,
+ need_email=None, need_shipping_address=None, send_phone_number_to_provider=None,
+ send_email_to_provider=None, is_flexible=None, subscription_period=None, business_connection_id=None):
+ method_url = r'createInvoiceLink'
+ payload = {'title': title, 'description': description, 'payload': payload,
+ 'currency': currency, 'prices': await _convert_list_json_serializable(prices)}
+ if max_tip_amount:
+ payload['max_tip_amount'] = max_tip_amount
+ if suggested_tip_amounts:
+ payload['suggested_tip_amounts'] = json.dumps(suggested_tip_amounts)
+ if provider_data:
+ payload['provider_data'] = provider_data
+ if photo_url:
+ payload['photo_url'] = photo_url
+ if photo_size:
+ payload['photo_size'] = photo_size
+ if photo_width:
+ payload['photo_width'] = photo_width
+ if photo_height:
+ payload['photo_height'] = photo_height
+ if need_name is not None:
+ payload['need_name'] = need_name
+ if need_phone_number is not None:
+ payload['need_phone_number'] = need_phone_number
+ if need_email is not None:
+ payload['need_email'] = need_email
+ if need_shipping_address is not None:
+ payload['need_shipping_address'] = need_shipping_address
+ if send_phone_number_to_provider is not None:
+ payload['send_phone_number_to_provider'] = send_phone_number_to_provider
+ if send_email_to_provider is not None:
+ payload['send_email_to_provider'] = send_email_to_provider
+ if is_flexible is not None:
+ payload['is_flexible'] = is_flexible
+ if provider_token is not None:
+ payload['provider_token'] = provider_token
+ if subscription_period:
+ payload['subscription_period'] = subscription_period
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ return await _process_request(token, method_url, params=payload, method='post')
+
+
+
+# noinspection PyShadowingBuiltins
+async def send_poll(
+ token, chat_id, question, options,
+ is_anonymous = None, type = None, allows_multiple_answers = None, correct_option_id = None,
+ explanation = None, explanation_parse_mode=None, open_period = None, close_date = None, is_closed = None,
+ disable_notification=False,
+ reply_markup=None, timeout=None, explanation_entities=None, protect_content=None, message_thread_id=None,
+ reply_parameters=None,business_connection_id=None, question_parse_mode=None, question_entities=None, message_effect_id=None,
+ allow_paid_broadcast=None):
+ method_url = r'sendPoll'
+ payload = {
+ 'chat_id': str(chat_id),
+ 'question': question,
+ 'options': json.dumps([option.to_dict() for option in options])
+ }
+
+ if is_anonymous is not None:
+ payload['is_anonymous'] = is_anonymous
+ if type is not None:
+ payload['type'] = type
+ if allows_multiple_answers is not None:
+ payload['allows_multiple_answers'] = allows_multiple_answers
+ if correct_option_id is not None:
+ payload['correct_option_id'] = correct_option_id
+ if explanation is not None:
+ payload['explanation'] = explanation
+ if explanation_parse_mode is not None:
+ payload['explanation_parse_mode'] = explanation_parse_mode
+ if open_period is not None:
+ payload['open_period'] = open_period
+ if close_date is not None:
+ if isinstance(close_date, datetime):
+ payload['close_date'] = close_date.timestamp()
+ else:
+ payload['close_date'] = close_date
+ if is_closed is not None:
+ payload['is_closed'] = is_closed
+ if disable_notification:
+ payload['disable_notification'] = disable_notification
+ if reply_parameters is not None:
+ payload['reply_parameters'] = json.dumps(reply_parameters.to_dict())
+ if reply_markup is not None:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if timeout:
+ payload['timeout'] = timeout
+ if explanation_entities:
+ payload['explanation_entities'] = json.dumps(
+ types.MessageEntity.to_list_of_dicts(explanation_entities))
+ if protect_content:
+ payload['protect_content'] = protect_content
+ if message_thread_id:
+ payload['message_thread_id'] = message_thread_id
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ if question_parse_mode:
+ payload['question_parse_mode'] = question_parse_mode
+ if question_entities:
+ payload['question_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(question_entities))
+ if message_effect_id:
+ payload['message_effect_id'] = message_effect_id
+ if allow_paid_broadcast is not None:
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
+ return await _process_request(token, method_url, params=payload)
+
+
+async def create_forum_topic(token, chat_id, name, icon_color=None, icon_custom_emoji_id=None):
+ method_url = r'createForumTopic'
+ payload = {'chat_id': chat_id, 'name': name}
+ if icon_color:
+ payload['icon_color'] = icon_color
+ if icon_custom_emoji_id:
+ payload['icon_custom_emoji_id'] = icon_custom_emoji_id
+ return await _process_request(token, method_url, params=payload)
+
+async def edit_forum_topic(token, chat_id, message_thread_id, name=None, icon_custom_emoji_id=None):
+ method_url = r'editForumTopic'
+ payload = {'chat_id': chat_id, 'message_thread_id': message_thread_id}
+ if name is not None:
+ payload['name'] = name
+ if icon_custom_emoji_id is not None:
+ payload['icon_custom_emoji_id'] = icon_custom_emoji_id
+ return await _process_request(token, method_url, params=payload)
+
+async def close_forum_topic(token, chat_id, message_thread_id):
+ method_url = r'closeForumTopic'
+ payload = {'chat_id': chat_id, 'message_thread_id': message_thread_id}
+ return await _process_request(token, method_url, params=payload)
+
+async def reopen_forum_topic(token, chat_id, message_thread_id):
+ method_url = r'reopenForumTopic'
+ payload = {'chat_id': chat_id, 'message_thread_id': message_thread_id}
+ return await _process_request(token, method_url, params=payload)
+
+async def delete_forum_topic(token, chat_id, message_thread_id):
+ method_url = r'deleteForumTopic'
+ payload = {'chat_id': chat_id, 'message_thread_id': message_thread_id}
+ return await _process_request(token, method_url, params=payload)
+
+async def unpin_all_forum_topic_messages(token, chat_id, message_thread_id):
+ method_url = r'unpinAllForumTopicMessages'
+ payload = {'chat_id': chat_id, 'message_thread_id': message_thread_id}
+ return await _process_request(token, method_url, params=payload)
+
+async def get_forum_topic_icon_stickers(token):
+ method_url = r'getForumTopicIconStickers'
+ return await _process_request(token, method_url)
+
+async def edit_general_forum_topic(token, chat_id, name):
+ method_url = r'editGeneralForumTopic'
+ payload = {'chat_id': chat_id, 'name': name}
+ return await _process_request(token, method_url, params=payload)
+
+async def close_general_forum_topic(token, chat_id):
+ method_url = r'closeGeneralForumTopic'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload)
+
+async def reopen_general_forum_topic(token, chat_id):
+ method_url = r'reopenGeneralForumTopic'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload)
+
+async def hide_general_forum_topic(token, chat_id):
+ method_url = r'hideGeneralForumTopic'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload)
+
+async def unhide_general_forum_topic(token, chat_id):
+ method_url = r'unhideGeneralForumTopic'
+ payload = {'chat_id': chat_id}
+ return await _process_request(token, method_url, params=payload)
+
+async def delete_messages(token, chat_id, message_ids):
+ method_url = 'deleteMessages'
+ payload = {
+ 'chat_id': chat_id,
+ 'message_ids': json.dumps(message_ids)
+ }
+ return await _process_request(token, method_url, params=payload)
+
+async def forward_messages(token, chat_id, from_chat_id, message_ids, disable_notification=None,
+ message_thread_id=None, protect_content=None, direct_messages_topic_id=None):
+ method_url = 'forwardMessages'
+ payload = {
+ 'chat_id': chat_id,
+ 'from_chat_id': from_chat_id,
+ 'message_ids': json.dumps(message_ids),
+ }
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if message_thread_id is not None:
+ payload['message_thread_id'] = message_thread_id
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+
+ result = await _process_request(token, method_url, params=payload)
+ return result
+
+async def copy_messages(token, chat_id, from_chat_id, message_ids, disable_notification=None,
+ message_thread_id=None, protect_content=None, remove_caption=None, direct_messages_topic_id=None):
+ method_url = 'copyMessages'
+ payload = {
+ 'chat_id': chat_id,
+ 'from_chat_id': from_chat_id,
+ 'message_ids': json.dumps(message_ids),
+ }
+ if disable_notification is not None:
+ payload['disable_notification'] = disable_notification
+ if message_thread_id is not None:
+ payload['message_thread_id'] = message_thread_id
+ if protect_content is not None:
+ payload['protect_content'] = protect_content
+ if remove_caption is not None:
+ payload['remove_caption'] = remove_caption
+ if direct_messages_topic_id is not None:
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
+
+ result = await _process_request(token, method_url, params=payload)
+ return result
+
+
+async def _convert_list_json_serializable(results):
+ ret = ''
+ for r in results:
+ if isinstance(r, types.JsonSerializable):
+ ret = ret + r.to_json() + ','
+ if len(ret) > 0:
+ ret = ret[:-1]
+ return '[' + ret + ']'
+
+
+async def convert_input_media(media):
+ if isinstance(media, types.InputMedia):
+ return media.convert_input_media()
+ return None, None
+
+
+async def convert_input_media_array(array):
+ media = []
+ files = {}
+ for input_media in array:
+ if isinstance(input_media, types.InputMedia) or isinstance(input_media, types.InputPaidMedia):
+ media_dict = input_media.to_dict()
+ if media_dict['media'].startswith('attach://'):
+ key = media_dict['media'].replace('attach://', '')
+ files[key] = input_media.media
+ if 'thumbnail' in media_dict:
+ thumbnail = media_dict['thumbnail']
+ if isinstance(thumbnail, types.InputFile):
+ thumbnail_key = 'thumbnail_' + key
+ files[thumbnail_key] = thumbnail
+ media_dict['thumbnail'] = 'attach://' + thumbnail_key
+ media.append(media_dict)
+ return json.dumps(media), files
+
+
+async def _no_encode(func):
+ def wrapper(key, val):
+ if key == 'filename':
+ return u'{0}={1}'.format(key, val)
+ else:
+ return func(key, val)
+
+ return wrapper
+
+async def stop_poll(token, chat_id, message_id, reply_markup=None, business_connection_id=None):
+ method_url = r'stopPoll'
+ payload = {'chat_id': str(chat_id), 'message_id': message_id}
+ if reply_markup:
+ payload['reply_markup'] = await _convert_markup(reply_markup)
+ if business_connection_id:
+ payload['business_connection_id'] = business_connection_id
+ return await _process_request(token, method_url, params=payload)
+
+# exceptions
+class ApiException(Exception):
+ """
+ This class represents a base Exception thrown when a call to the Telegram API fails.
+ In addition to an informative message, it has a `function_name` and a `result` attribute, which respectively
+ contain the name of the failed function and the returned result that made the function to be considered as
+ failed.
+ """
+
+ def __init__(self, msg, function_name, result):
+ super(ApiException, self).__init__("A request to the Telegram API was unsuccessful. {0}".format(msg))
+ self.function_name = function_name
+ self.result = result
+
+class ApiHTTPException(ApiException):
+ """
+ This class represents an Exception thrown when a call to the
+ Telegram API server returns HTTP code that is not 200.
+ """
+ def __init__(self, function_name, result: aiohttp.ClientResponse):
+ super(ApiHTTPException, self).__init__(
+ "The server returned HTTP {0} {1}. Response body:\n[{2}]" \
+ .format(result.status, result.reason, result.request_info),
+ function_name,
+ result)
+
+class ApiInvalidJSONException(ApiException):
+ """
+ This class represents an Exception thrown when a call to the
+ Telegram API server returns invalid json.
+ """
+ def __init__(self, function_name, result):
+ super(ApiInvalidJSONException, self).__init__(
+ "The server returned an invalid JSON response. Response body:\n[{0}]" \
+ .format(result),
+ function_name,
+ result)
+
+class ApiTelegramException(ApiException):
+ """
+ This class represents an Exception thrown when a Telegram API returns error code.
+ """
+ def __init__(self, function_name, result, result_json):
+ super(ApiTelegramException, self).__init__(
+ "Error code: {0}. Description: {1}" \
+ .format(result_json['error_code'], result_json['description']),
+ function_name,
+ result)
+ self.result_json = result_json
+ self.error_code = result_json['error_code']
+ self.description = result_json['description']
+
+class RequestTimeout(Exception):
+ """
+ This class represents a request timeout.
+ """
+ pass
+
+
diff --git a/telebot/asyncio_storage/__init__.py b/telebot/asyncio_storage/__init__.py
new file mode 100644
index 000000000..82a8c817a
--- /dev/null
+++ b/telebot/asyncio_storage/__init__.py
@@ -0,0 +1,13 @@
+from telebot.asyncio_storage.memory_storage import StateMemoryStorage
+from telebot.asyncio_storage.redis_storage import StateRedisStorage
+from telebot.asyncio_storage.pickle_storage import StatePickleStorage
+from telebot.asyncio_storage.base_storage import StateDataContext, StateStorageBase
+
+
+__all__ = [
+ "StateStorageBase",
+ "StateDataContext",
+ "StateMemoryStorage",
+ "StateRedisStorage",
+ "StatePickleStorage",
+]
diff --git a/telebot/asyncio_storage/base_storage.py b/telebot/asyncio_storage/base_storage.py
new file mode 100644
index 000000000..191ac45f4
--- /dev/null
+++ b/telebot/asyncio_storage/base_storage.py
@@ -0,0 +1,147 @@
+import copy
+
+
+class StateStorageBase:
+ def __init__(self) -> None:
+ pass
+
+ async def set_data(self, chat_id, user_id, key, value,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ """
+ Set data for a user in a particular chat.
+ """
+ raise NotImplementedError
+
+ async def get_data(self, chat_id, user_id):
+ """
+ Get data for a user in a particular chat.
+ """
+ raise NotImplementedError
+
+ async def set_state(self, chat_id, user_id, state,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ """
+ Set state for a particular user.
+
+ ! Note that you should create a
+ record if it does not exist, and
+ if a record with state already exists,
+ you need to update a record.
+ """
+ raise NotImplementedError
+
+ async def delete_state(self, chat_id, user_id,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ """
+ Delete state for a particular user.
+ """
+ raise NotImplementedError
+
+ async def reset_data(self, chat_id, user_id,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ """
+ Reset data for a particular user in a chat.
+ """
+ raise NotImplementedError
+
+ async def get_state(self, chat_id, user_id,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ raise NotImplementedError
+
+ def get_interactive_data(self, chat_id, user_id,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ """
+ Should be sync, but should provide a context manager
+ with __aenter__ and __aexit__ methods.
+ """
+ raise NotImplementedError
+
+ async def save(self, chat_id, user_id, data):
+ raise NotImplementedError
+
+ def _get_key(
+ self,
+ chat_id: int,
+ user_id: int,
+ prefix: str,
+ separator: str,
+ business_connection_id: str = None,
+ message_thread_id: int = None,
+ bot_id: int = None,
+ ) -> str:
+ """
+ Convert parameters to a key.
+ """
+ params = [prefix]
+ if bot_id:
+ params.append(str(bot_id))
+ if business_connection_id:
+ params.append(business_connection_id)
+ if message_thread_id:
+ params.append(str(message_thread_id))
+ params.append(str(chat_id))
+ params.append(str(user_id))
+
+ return separator.join(params)
+
+
+class StateDataContext:
+ """
+ Class for data.
+ """
+
+ def __init__(
+ self,
+ obj,
+ chat_id,
+ user_id,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ self.obj = obj
+ self.data = None
+ self.chat_id = chat_id
+ self.user_id = user_id
+ self.bot_id = bot_id
+ self.business_connection_id = business_connection_id
+ self.message_thread_id = message_thread_id
+
+ async def __aenter__(self):
+ data = await self.obj.get_data(
+ chat_id=self.chat_id,
+ user_id=self.user_id,
+ business_connection_id=self.business_connection_id,
+ message_thread_id=self.message_thread_id,
+ bot_id=self.bot_id,
+ )
+ self.data = copy.deepcopy(data)
+ return self.data
+
+ async def __aexit__(self, exc_type, exc_val, exc_tb):
+ return await self.obj.save(
+ self.chat_id,
+ self.user_id,
+ self.data,
+ self.business_connection_id,
+ self.message_thread_id,
+ self.bot_id,
+ )
diff --git a/telebot/asyncio_storage/memory_storage.py b/telebot/asyncio_storage/memory_storage.py
new file mode 100644
index 000000000..e17d5fe8c
--- /dev/null
+++ b/telebot/asyncio_storage/memory_storage.py
@@ -0,0 +1,225 @@
+from telebot.asyncio_storage.base_storage import StateStorageBase, StateDataContext
+from typing import Optional, Union
+
+
+class StateMemoryStorage(StateStorageBase):
+ """
+ Memory storage for states.
+
+ Stores states in memory as a dictionary.
+
+ .. code-block:: python3
+
+ storage = StateMemoryStorage()
+ bot = AsyncTeleBot(token, storage=storage)
+
+ :param separator: Separator for keys, default is ":".
+ :type separator: Optional[str]
+
+ :param prefix: Prefix for keys, default is "telebot".
+ :type prefix: Optional[str]
+ """
+
+ def __init__(
+ self, separator: Optional[str] = ":", prefix: Optional[str] = "telebot"
+ ) -> None:
+ self.separator = separator
+ self.prefix = prefix
+ if not self.prefix:
+ raise ValueError("Prefix cannot be empty")
+
+ self.data = (
+ {}
+ ) # key: telebot:bot_id:business_connection_id:message_thread_id:chat_id:user_id
+
+ async def set_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ state: str,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ if hasattr(state, "name"):
+ state = state.name
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ self.data[_key] = {"state": state, "data": {}}
+ else:
+ self.data[_key]["state"] = state
+
+ return True
+
+ async def get_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Union[str, None]:
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ return None
+
+ return self.data[_key]["state"]
+
+ async def delete_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ return False
+
+ del self.data[_key]
+ return True
+
+ async def set_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ key: str,
+ value: Union[str, int, float, dict],
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ raise RuntimeError(f"MemoryStorage: key {_key} does not exist.")
+ self.data[_key]["data"][key] = value
+ return True
+
+ async def get_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> dict:
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ return self.data.get(_key, {}).get("data", {})
+
+ async def reset_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ return False
+ self.data[_key]["data"] = {}
+ return True
+
+ def get_interactive_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Optional[dict]:
+ return StateDataContext(
+ self,
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ message_thread_id=message_thread_id,
+ bot_id=bot_id,
+ )
+
+ async def save(
+ self,
+ chat_id: int,
+ user_id: int,
+ data: dict,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ return False
+ self.data[_key]["data"] = data
+ return True
+
+ def __str__(self) -> str:
+ return f""
diff --git a/telebot/asyncio_storage/pickle_storage.py b/telebot/asyncio_storage/pickle_storage.py
new file mode 100644
index 000000000..1a63e6961
--- /dev/null
+++ b/telebot/asyncio_storage/pickle_storage.py
@@ -0,0 +1,274 @@
+aiofiles_installed = True
+try:
+ import aiofiles
+except ImportError:
+ aiofiles_installed = False
+
+import os
+import pickle
+import asyncio
+from typing import Optional, Union, Callable, Any
+
+from telebot.asyncio_storage.base_storage import StateStorageBase, StateDataContext
+
+
+def with_lock(func: Callable) -> Callable:
+ async def wrapper(self, *args, **kwargs):
+ async with self.lock:
+ return await func(self, *args, **kwargs)
+
+ return wrapper
+
+
+class StatePickleStorage(StateStorageBase):
+ """
+ State storage based on pickle file.
+
+ .. warning::
+
+ This storage is not recommended for production use.
+ Data may be corrupted. If you face a case where states do not work as expected,
+ try to use another storage.
+
+ .. code-block:: python3
+
+ storage = StatePickleStorage()
+ bot = AsyncTeleBot(token, storage=storage)
+
+ :param file_path: Path to file where states will be stored.
+ :type file_path: str
+
+ :param prefix: Prefix for keys, default is "telebot".
+ :type prefix: Optional[str]
+
+ :param separator: Separator for keys, default is ":".
+ :type separator: Optional[str]
+ """
+
+ def __init__(
+ self,
+ file_path: str = "./.state-save/states.pkl",
+ prefix="telebot",
+ separator: Optional[str] = ":",
+ ) -> None:
+
+ if not aiofiles_installed:
+ raise ImportError("Please install aiofiles using `pip install aiofiles`")
+
+ self.file_path = file_path
+ self.prefix = prefix
+ self.separator = separator
+ self.lock = asyncio.Lock()
+ self.create_dir()
+
+ async def _read_from_file(self) -> dict:
+ async with aiofiles.open(self.file_path, "rb") as f:
+ data = await f.read()
+ return pickle.loads(data)
+
+ async def _write_to_file(self, data: dict) -> None:
+ async with aiofiles.open(self.file_path, "wb") as f:
+ await f.write(pickle.dumps(data))
+
+ def create_dir(self):
+ """
+ Create directory .save-handlers.
+ """
+ dirs, filename = os.path.split(self.file_path)
+ os.makedirs(dirs, exist_ok=True)
+ if not os.path.isfile(self.file_path):
+ with open(self.file_path, "wb") as file:
+ pickle.dump({}, file)
+
+ @with_lock
+ async def set_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ state: str,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = await self._read_from_file()
+ if _key not in data:
+ data[_key] = {"state": state, "data": {}}
+ else:
+ data[_key]["state"] = state
+ await self._write_to_file(data)
+ return True
+
+ @with_lock
+ async def get_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Union[str, None]:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = await self._read_from_file()
+ return data.get(_key, {}).get("state")
+
+ @with_lock
+ async def delete_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = await self._read_from_file()
+ if _key in data:
+ del data[_key]
+ await self._write_to_file(data)
+ return True
+ return False
+
+ @with_lock
+ async def set_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ key: str,
+ value: Union[str, int, float, dict],
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = await self._read_from_file()
+ state_data = data.get(_key, {})
+ state_data["data"][key] = value
+ if _key not in data:
+ raise RuntimeError(f"StatePickleStorage: key {_key} does not exist.")
+ else:
+ data[_key]["data"][key] = value
+ await self._write_to_file(data)
+ return True
+
+ @with_lock
+ async def get_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> dict:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = await self._read_from_file()
+ return data.get(_key, {}).get("data", {})
+
+ @with_lock
+ async def reset_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = await self._read_from_file()
+ if _key in data:
+ data[_key]["data"] = {}
+ await self._write_to_file(data)
+ return True
+ return False
+
+ def get_interactive_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Optional[dict]:
+ return StateDataContext(
+ self,
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ message_thread_id=message_thread_id,
+ bot_id=bot_id,
+ )
+
+ @with_lock
+ async def save(
+ self,
+ chat_id: int,
+ user_id: int,
+ data: dict,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ file_data = await self._read_from_file()
+ file_data[_key]["data"] = data
+ await self._write_to_file(file_data)
+ return True
+
+ def __str__(self) -> str:
+ return f"StatePickleStorage({self.file_path}, {self.prefix})"
diff --git a/telebot/asyncio_storage/redis_storage.py b/telebot/asyncio_storage/redis_storage.py
new file mode 100644
index 000000000..08e255809
--- /dev/null
+++ b/telebot/asyncio_storage/redis_storage.py
@@ -0,0 +1,339 @@
+redis_installed = True
+try:
+ import redis
+ from redis.asyncio import Redis, ConnectionPool
+except ImportError:
+ redis_installed = False
+
+import json
+from typing import Optional, Union, Callable, Coroutine
+import asyncio
+
+from telebot.asyncio_storage.base_storage import StateStorageBase, StateDataContext
+
+
+def async_with_lock(func: Callable[..., Coroutine]) -> Callable[..., Coroutine]:
+ async def wrapper(self, *args, **kwargs):
+ async with self.lock:
+ return await func(self, *args, **kwargs)
+
+ return wrapper
+
+
+def async_with_pipeline(func: Callable[..., Coroutine]) -> Callable[..., Coroutine]:
+ async def wrapper(self, *args, **kwargs):
+ async with self.redis.pipeline() as pipe:
+ pipe.multi()
+ result = await func(self, pipe, *args, **kwargs)
+ await pipe.execute()
+ return result
+
+ return wrapper
+
+
+class StateRedisStorage(StateStorageBase):
+ """
+ State storage based on Redis.
+
+ .. code-block:: python3
+
+ storage = StateRedisStorage(...)
+ bot = AsyncTeleBot(token, storage=storage)
+
+ :param host: Redis host, default is "localhost".
+ :type host: str
+
+ :param port: Redis port, default is 6379.
+ :type port: int
+
+ :param db: Redis database, default is 0.
+ :type db: int
+
+ :param password: Redis password, default is None.
+ :type password: Optional[str]
+
+ :param prefix: Prefix for keys, default is "telebot".
+ :type prefix: Optional[str]
+
+ :param redis_url: Redis URL, default is None.
+ :type redis_url: Optional[str]
+
+ :param connection_pool: Redis connection pool, default is None.
+ :type connection_pool: Optional[ConnectionPool]
+
+ :param separator: Separator for keys, default is ":".
+ :type separator: Optional[str]
+
+ """
+
+ def __init__(
+ self,
+ host="localhost",
+ port=6379,
+ db=0,
+ password=None,
+ prefix="telebot",
+ redis_url=None,
+ connection_pool: "ConnectionPool" = None,
+ separator: Optional[str] = ":",
+ ) -> None:
+
+ if not redis_installed:
+ raise ImportError("Please install redis using `pip install redis`")
+
+ self.separator = separator
+ self.prefix = prefix
+ if not self.prefix:
+ raise ValueError("Prefix cannot be empty")
+
+ if redis_url:
+ self.redis = redis.asyncio.from_url(redis_url)
+ elif connection_pool:
+ self.redis = Redis(connection_pool=connection_pool)
+ else:
+ self.redis = Redis(host=host, port=port, db=db, password=password)
+
+ self.lock = asyncio.Lock()
+
+ @async_with_lock
+ @async_with_pipeline
+ async def set_state(
+ self,
+ pipe,
+ chat_id: int,
+ user_id: int,
+ state: str,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ if hasattr(state, "name"):
+ state = state.name
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ pipe.hget(_key, "data")
+ result = await pipe.execute()
+ data = result[0]
+ if data is None:
+ pipe.hset(_key, "data", json.dumps({}))
+
+ await pipe.hset(_key, "state", state)
+
+ return True
+
+ async def get_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Union[str, None]:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ state_bytes = await self.redis.hget(_key, "state")
+ return state_bytes.decode("utf-8") if state_bytes else None
+
+ async def delete_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ result = await self.redis.delete(_key)
+ return result > 0
+
+ @async_with_lock
+ @async_with_pipeline
+ async def set_data(
+ self,
+ pipe,
+ chat_id: int,
+ user_id: int,
+ key: str,
+ value: Union[str, int, float, dict],
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = await pipe.hget(_key, "data")
+ data = await pipe.execute()
+ data = data[0]
+ if data is None:
+ raise RuntimeError(f"StateRedisStorage: key {_key} does not exist.")
+ else:
+ data = json.loads(data)
+ data[key] = value
+ await pipe.hset(_key, "data", json.dumps(data))
+ return True
+
+ async def get_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> dict:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = await self.redis.hget(_key, "data")
+ return json.loads(data) if data else {}
+
+ @async_with_lock
+ @async_with_pipeline
+ async def reset_data(
+ self,
+ pipe,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ if await pipe.exists(_key):
+ await pipe.hset(_key, "data", "{}")
+ else:
+ return False
+ return True
+
+ def get_interactive_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Optional[dict]:
+ return StateDataContext(
+ self,
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ message_thread_id=message_thread_id,
+ bot_id=bot_id,
+ )
+
+ @async_with_lock
+ @async_with_pipeline
+ async def save(
+ self,
+ pipe,
+ chat_id: int,
+ user_id: int,
+ data: dict,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ if await pipe.exists(_key):
+ await pipe.hset(_key, "data", json.dumps(data))
+ else:
+ return False
+ return True
+
+ def migrate_format(self, bot_id: int, prefix: Optional[str] = "telebot_"):
+ """
+ Migrate from old to new format of keys.
+ Run this function once to migrate all redis existing keys to new format.
+
+ Starting from version 4.23.0, the format of keys has been changed:
+ :value
+ - Old format: {prefix}chat_id: {user_id: {'state': None, 'data': {}}, ...}
+ - New format:
+ {prefix}{separator}{bot_id}{separator}{business_connection_id}{separator}{message_thread_id}{separator}{chat_id}{separator}{user_id}: {'state': ..., 'data': {}}
+
+ This function will help you to migrate from the old format to the new one in order to avoid data loss.
+
+ :param bot_id: Bot ID; To get it, call a getMe request and grab the id from the response.
+ :type bot_id: int
+
+ :param prefix: Prefix for keys, default is "telebot_"(old default value)
+ :type prefix: Optional[str]
+ """
+ keys = self.redis.keys(f"{prefix}*")
+
+ for key in keys:
+ old_key = key.decode("utf-8")
+ # old: {prefix}chat_id: {user_id: {'state': None, 'data': {}}, ...}
+ value = self.redis.get(old_key)
+ value = json.loads(value)
+
+ chat_id = old_key[len(prefix) :]
+ user_id = list(value.keys())[0]
+ state = value[user_id]["state"]
+ state_data = value[user_id]["data"]
+
+ # set new format
+ new_key = self._get_key(
+ int(chat_id), int(user_id), self.prefix, self.separator, bot_id=bot_id
+ )
+ self.redis.hset(new_key, "state", state)
+ self.redis.hset(new_key, "data", json.dumps(state_data))
+
+ # delete old key
+ self.redis.delete(old_key)
+
+ def __str__(self) -> str:
+ # include some connection info
+ return f"StateRedisStorage({self.redis})"
diff --git a/telebot/callback_data.py b/telebot/callback_data.py
new file mode 100644
index 000000000..57e4833da
--- /dev/null
+++ b/telebot/callback_data.py
@@ -0,0 +1,155 @@
+"""
+Callback data factory's file.
+"""
+
+"""
+Copyright (c) 2017-2018 Alex Root Junior
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this
+software and associated documentation files (the "Software"), to deal in the Software
+without restriction, including without limitation the rights to use, copy, modify,
+merge, publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
+OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+This file was added during the pull request. The maintainers overlooked that it was copied
+"as is" from another project and they do not consider it as a right way to develop a project.
+However, due to backward compatibility we had to leave this file in the project with the above
+copyright added, as it is required by the original project license.
+"""
+
+import typing
+
+
+class CallbackDataFilter:
+ """
+ Filter for CallbackData.
+ """
+
+ def __init__(self, factory, config: typing.Dict[str, str]):
+ self.config = config
+ self.factory = factory
+
+ def check(self, query) -> bool:
+ """
+ Checks if query.data appropriates to specified config
+
+ :param query: telebot.types.CallbackQuery
+ :type query: telebot.types.CallbackQuery
+
+ :return: True if query.data appropriates to specified config
+ :rtype: bool
+ """
+
+ try:
+ data = self.factory.parse(query.data)
+ except ValueError:
+ return False
+
+ for key, value in self.config.items():
+ if isinstance(value, (list, tuple, set, frozenset)):
+ if data.get(key) not in value:
+ return False
+ elif data.get(key) != value:
+ return False
+ return True
+
+
+class CallbackData:
+ """
+ Callback data factory
+ This class will help you to work with CallbackQuery
+ """
+
+ def __init__(self, *parts, prefix: str, sep=':'):
+ if not isinstance(prefix, str):
+ raise TypeError(f'Prefix must be instance of str not {type(prefix).__name__}')
+ if not prefix:
+ raise ValueError("Prefix can't be empty")
+ if sep in prefix:
+ raise ValueError(f"Separator {sep!r} can't be used in prefix")
+
+ self.prefix = prefix
+ self.sep = sep
+
+ self._part_names = parts
+
+ def new(self, *args, **kwargs) -> str:
+ """
+ Generate callback data
+
+ :param args: positional parameters of CallbackData instance parts
+ :param kwargs: named parameters
+ :return: str
+ """
+ args = list(args)
+
+ data = [self.prefix]
+
+ for part in self._part_names:
+ value = kwargs.pop(part, None)
+ if value is None:
+ if args:
+ value = args.pop(0)
+ else:
+ raise ValueError(f'Value for {part!r} was not passed!')
+
+ if value is not None and not isinstance(value, str):
+ value = str(value)
+
+ if self.sep in value:
+ raise ValueError(f"Symbol {self.sep!r} is defined as the separator and can't be used in parts' values")
+
+ data.append(value)
+
+ if args or kwargs:
+ raise TypeError('Too many arguments were passed!')
+
+ callback_data = self.sep.join(data)
+
+ if len(callback_data.encode()) > 64:
+ raise ValueError('Resulted callback data is too long!')
+
+ return callback_data
+
+ def parse(self, callback_data: str) -> typing.Dict[str, str]:
+ """
+ Parse data from the callback data
+
+ :param callback_data: string, use to telebot.types.CallbackQuery to parse it from string to a dict
+ :return: dict parsed from callback data
+ """
+
+ prefix, *parts = callback_data.split(self.sep)
+ if prefix != self.prefix:
+ raise ValueError("Passed callback data can't be parsed with that prefix.")
+ elif len(parts) != len(self._part_names):
+ raise ValueError('Invalid parts count!')
+
+ result = {'@': prefix}
+ result.update(zip(self._part_names, parts))
+ return result
+
+ def filter(self, **config) -> CallbackDataFilter:
+ """
+ Generate filter
+
+ :param config: specified named parameters will be checked with CallbackQuery.data
+ :return: CallbackDataFilter class
+ """
+
+ for key in config.keys():
+ if key not in self._part_names:
+ raise ValueError(f'Invalid field name {key!r}')
+ return CallbackDataFilter(self, config)
diff --git a/telebot/custom_filters.py b/telebot/custom_filters.py
new file mode 100644
index 000000000..f56535a57
--- /dev/null
+++ b/telebot/custom_filters.py
@@ -0,0 +1,455 @@
+from abc import ABC
+from typing import Optional, Union
+from telebot.handler_backends import State
+
+from telebot import types
+
+from telebot.states import resolve_context
+
+class SimpleCustomFilter(ABC):
+ """
+ Simple Custom Filter base class.
+ Create child class with check() method.
+ Accepts only message, returns bool value, that is compared with given in handler.
+
+ Child classes should have .key property.
+
+ .. code-block:: python3
+ :caption: Example on creating a simple custom filter.
+
+ class ForwardFilter(SimpleCustomFilter):
+ # Check whether message was forwarded from channel or group.
+ key = 'is_forwarded'
+
+ def check(self, message):
+ return message.forward_date is not None
+
+ """
+
+ key: str = None
+
+ def check(self, message):
+ """
+ Perform a check.
+ """
+ pass
+
+
+class AdvancedCustomFilter(ABC):
+ """
+ Advanced Custom Filter base class.
+ Create child class with check() method.
+ Accepts two parameters, returns bool: True - filter passed, False - filter failed.
+ message: Message class
+ text: Filter value given in handler
+
+ Child classes should have .key property.
+
+ .. code-block:: python3
+ :caption: Example on creating an advanced custom filter.
+
+ class TextStartsFilter(AdvancedCustomFilter):
+ # Filter to check whether message starts with some text.
+ key = 'text_startswith'
+
+ def check(self, message, text):
+ return message.text.startswith(text)
+ """
+
+ key: str = None
+
+ def check(self, message, text):
+ """
+ Perform a check.
+ """
+ pass
+
+
+class TextFilter:
+ """
+ Advanced text filter to check (types.Message, types.CallbackQuery, types.InlineQuery, types.Poll)
+
+ example of usage is in examples/custom_filters/advanced_text_filter.py
+
+ :param equals: string, True if object's text is equal to passed string
+ :type equals: :obj:`str`
+
+ :param contains: list[str] or tuple[str], True if any string element of iterable is in text
+ :type contains: list[str] or tuple[str]
+
+ :param starts_with: string, True if object's text starts with passed string
+ :type starts_with: :obj:`str`
+
+ :param ends_with: string, True if object's text starts with passed string
+ :type ends_with: :obj:`str`
+
+ :param ignore_case: bool (default False), case insensitive
+ :type ignore_case: :obj:`bool`
+
+ :raises ValueError: if incorrect value for a parameter was supplied
+
+ :return: None
+ """
+
+ def __init__(self,
+ equals: Optional[str] = None,
+ contains: Optional[Union[list, tuple]] = None,
+ starts_with: Optional[Union[str, list, tuple]] = None,
+ ends_with: Optional[Union[str, list, tuple]] = None,
+ ignore_case: bool = False):
+ """
+ :param equals: string, True if object's text is equal to passed string
+ :type equals: :obj:`str`
+
+ :param contains: list[str] or tuple[str], True if any string element of iterable is in text
+ :type contains: list[str] or tuple[str]
+
+ :param starts_with: string, True if object's text starts with passed string
+ :type starts_with: :obj:`str`
+
+ :param ends_with: string, True if object's text starts with passed string
+ :type ends_with: :obj:`str`
+
+ :param ignore_case: bool (default False), case insensitive
+ :type ignore_case: :obj:`bool`
+
+ :raises ValueError: if incorrect value for a parameter was supplied
+
+ :return: None
+ """
+
+ to_check = sum((pattern is not None for pattern in (equals, contains, starts_with, ends_with)))
+ if to_check == 0:
+ raise ValueError('None of the check modes was specified')
+
+ self.equals = equals
+ self.contains = self._check_iterable(contains, filter_name='contains')
+ self.starts_with = self._check_iterable(starts_with, filter_name='starts_with')
+ self.ends_with = self._check_iterable(ends_with, filter_name='ends_with')
+ self.ignore_case = ignore_case
+
+ def _check_iterable(self, iterable, filter_name: str):
+ if not iterable:
+ pass
+ elif not isinstance(iterable, str) and not isinstance(iterable, list) and not isinstance(iterable, tuple):
+ raise ValueError(f"Incorrect value of {filter_name!r}")
+ elif isinstance(iterable, str):
+ iterable = [iterable]
+ elif isinstance(iterable, list) or isinstance(iterable, tuple):
+ iterable = [i for i in iterable if isinstance(i, str)]
+ return iterable
+
+ def check(self, obj: Union[types.Message, types.CallbackQuery, types.InlineQuery, types.Poll]):
+ """
+ :meta private:
+ """
+
+ if isinstance(obj, types.Poll):
+ text = obj.question
+ elif isinstance(obj, types.Message):
+ text = obj.text or obj.caption
+ if text is None:
+ return False
+ elif isinstance(obj, types.CallbackQuery):
+ text = obj.data
+ elif isinstance(obj, types.InlineQuery):
+ text = obj.query
+ else:
+ return False
+
+ if self.ignore_case:
+ text = text.lower()
+
+ if self.equals:
+ self.equals = self.equals.lower()
+ elif self.contains:
+ self.contains = tuple(map(str.lower, self.contains))
+ elif self.starts_with:
+ self.starts_with = tuple(map(str.lower, self.starts_with))
+ elif self.ends_with:
+ self.ends_with = tuple(map(str.lower, self.ends_with))
+
+ if self.equals:
+ result = self.equals == text
+ if result:
+ return True
+ elif not result and not any((self.contains, self.starts_with, self.ends_with)):
+ return False
+
+ if self.contains:
+ result = any([i in text for i in self.contains])
+ if result:
+ return True
+ elif not result and not any((self.starts_with, self.ends_with)):
+ return False
+
+ if self.starts_with:
+ result = any([text.startswith(i) for i in self.starts_with])
+ if result:
+ return True
+ elif not result and not self.ends_with:
+ return False
+
+ if self.ends_with:
+ return any([text.endswith(i) for i in self.ends_with])
+
+ return False
+
+class TextMatchFilter(AdvancedCustomFilter):
+ """
+ Filter to check Text message.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(text=['account'])
+ # your function
+ """
+
+ key = 'text'
+
+ def check(self, message, text):
+ """
+ :meta private:
+ """
+ if isinstance(text, TextFilter):
+ return text.check(message)
+ elif isinstance(text, list):
+ return message.text in text
+ else:
+ return text == message.text
+
+
+class TextContainsFilter(AdvancedCustomFilter):
+ """
+ Filter to check Text message.
+ key: text
+
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ # Will respond if any message.text contains word 'account'
+ @bot.message_handler(text_contains=['account'])
+ # your function
+ """
+
+ key = 'text_contains'
+
+ def check(self, message, text):
+ """
+ :meta private:
+ """
+ if not isinstance(text, str) and not isinstance(text, list) and not isinstance(text, tuple):
+ raise ValueError("Incorrect text_contains value")
+ elif isinstance(text, str):
+ text = [text]
+ elif isinstance(text, list) or isinstance(text, tuple):
+ text = [i for i in text if isinstance(i, str)]
+
+ return any([i in message.text for i in text])
+
+
+class TextStartsFilter(AdvancedCustomFilter):
+ """
+ Filter to check whether message starts with some text.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ # Will work if message.text starts with 'sir'.
+ @bot.message_handler(text_startswith='sir')
+ # your function
+ """
+
+ key = 'text_startswith'
+
+ def check(self, message, text):
+ """
+ :meta private:
+ """
+ return message.text.startswith(text)
+
+
+class ChatFilter(AdvancedCustomFilter):
+ """
+ Check whether chat_id corresponds to given chat_id.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(chat_id=[99999])
+ # your function
+ """
+
+ key = 'chat_id'
+
+ def check(self, message, text):
+ """
+ :meta private:
+ """
+ if isinstance(message, types.CallbackQuery):
+ return message.message.chat.id in text
+ return message.chat.id in text
+
+
+class ForwardFilter(SimpleCustomFilter):
+ """
+ Check whether message was forwarded from channel or group.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(is_forwarded=True)
+ # your function
+ """
+
+ key = 'is_forwarded'
+
+ def check(self, message):
+ """
+ :meta private:
+ """
+ return message.forward_origin is not None
+
+
+class IsReplyFilter(SimpleCustomFilter):
+ """
+ Check whether message is a reply.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(is_reply=True)
+ # your function
+ """
+
+ key = 'is_reply'
+
+ def check(self, message):
+ """
+ :meta private:
+ """
+ if isinstance(message, types.CallbackQuery):
+ return message.message.reply_to_message is not None
+ return message.reply_to_message is not None
+
+
+class LanguageFilter(AdvancedCustomFilter):
+ """
+ Check users language_code.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(language_code=['ru'])
+ # your function
+ """
+
+ key = 'language_code'
+
+ def check(self, message, text):
+ """
+ :meta private:
+ """
+ if isinstance(text, list):
+ return message.from_user.language_code in text
+ else:
+ return message.from_user.language_code == text
+
+
+class IsAdminFilter(SimpleCustomFilter):
+ """
+ Check whether the user is administrator / owner of the chat.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(chat_types=['supergroup'], is_chat_admin=True)
+ # your function
+ """
+
+ key = 'is_chat_admin'
+
+ def __init__(self, bot):
+ self._bot = bot
+
+ def check(self, message):
+ """
+ :meta private:
+ """
+ if isinstance(message, types.CallbackQuery):
+ return self._bot.get_chat_member(message.message.chat.id, message.from_user.id).status in ['creator', 'administrator']
+ return self._bot.get_chat_member(message.chat.id, message.from_user.id).status in ['creator', 'administrator']
+
+
+class StateFilter(AdvancedCustomFilter):
+ """
+ Filter to check state.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(state=1)
+ # your function
+ """
+
+ def __init__(self, bot):
+ self.bot = bot
+
+ key = 'state'
+
+ def check(self, message, text):
+ """
+ :meta private:
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = resolve_context(message, self.bot.bot_id)
+
+ if chat_id is None:
+ chat_id = user_id # May change in future
+
+ if isinstance(text, list):
+ new_text = []
+ for i in text:
+ if isinstance(i, State): i = i.name
+ new_text.append(i)
+ text = new_text
+ elif isinstance(text, State):
+ text = text.name
+
+ user_state = self.bot.current_states.get_state(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id
+ )
+
+ # CHANGED BEHAVIOUR
+ if text == "*" and user_state is not None:
+ return True
+
+ if user_state == text:
+ return True
+ elif type(text) is list and user_state in text:
+ return True
+ return False
+
+class IsDigitFilter(SimpleCustomFilter):
+ """
+ Filter to check whether the string is made up of only digits.
+
+ .. code-block:: python3
+ :caption: Example on using this filter:
+
+ @bot.message_handler(is_digit=True)
+ # your function
+ """
+ key = 'is_digit'
+
+ def check(self, message):
+ """
+ :meta private:
+ """
+ return message.text.isdigit()
diff --git a/telebot/ext/__init__.py b/telebot/ext/__init__.py
new file mode 100644
index 000000000..e417b38c2
--- /dev/null
+++ b/telebot/ext/__init__.py
@@ -0,0 +1,3 @@
+"""
+A folder with asynchronous and synchronous extensions.
+"""
diff --git a/telebot/ext/aio/__init__.py b/telebot/ext/aio/__init__.py
new file mode 100644
index 000000000..3d2fd2654
--- /dev/null
+++ b/telebot/ext/aio/__init__.py
@@ -0,0 +1,10 @@
+"""
+A folder with all the async extensions.
+"""
+
+from .webhooks import AsyncWebhookListener
+
+
+__all__ = [
+ "AsyncWebhookListener"
+]
\ No newline at end of file
diff --git a/telebot/ext/aio/webhooks.py b/telebot/ext/aio/webhooks.py
new file mode 100644
index 000000000..5a692b304
--- /dev/null
+++ b/telebot/ext/aio/webhooks.py
@@ -0,0 +1,123 @@
+"""
+This file is used by AsyncTeleBot.run_webhooks() function.
+
+Fastapi and starlette(0.20.2+) libraries are required to run this script.
+"""
+
+# modules required for running this script
+fastapi_installed = True
+try:
+ import fastapi
+ from fastapi.responses import JSONResponse
+ from fastapi.requests import Request
+ from uvicorn import Server, Config
+except ImportError:
+ fastapi_installed = False
+
+import asyncio
+
+
+from telebot.types import Update
+
+
+from typing import Optional
+
+
+class AsyncWebhookListener:
+ def __init__(self, bot,
+ secret_token: str,
+ host: Optional[str]="127.0.0.1",
+ port: Optional[int]=443,
+ ssl_context: Optional[tuple]=None,
+ url_path: Optional[str]=None,
+ ) -> None:
+ """
+ Aynchronous implementation of webhook listener
+ for asynchronous version of telebot.
+ Not supposed to be used manually by user.
+ Use AsyncTeleBot.run_webhooks() instead.
+
+ :param bot: AsyncTeleBot instance.
+ :type bot: telebot.async_telebot.AsyncTeleBot
+
+ :param secret_token: Telegram secret token
+ :type secret_token: str
+
+ :param host: Webhook host
+ :type host: str
+
+ :param port: Webhook port
+ :type port: int
+
+ :param ssl_context: SSL context
+ :type ssl_context: tuple
+
+ :param url_path: Webhook url path
+ :type url_path: str
+
+ :raises ImportError: If FastAPI or uvicorn is not installed.
+ :raises ImportError: If Starlette version is too old.
+
+ :return: None
+ """
+ self._check_dependencies()
+
+ self.app = fastapi.FastAPI()
+ self._secret_token = secret_token
+ self._bot = bot
+ self._port = port
+ self._host = host
+ self._ssl_context = ssl_context
+ self._url_path = url_path
+ self._prepare_endpoint_urls()
+
+
+ def _check_dependencies(self):
+ if not fastapi_installed:
+ raise ImportError('Fastapi or uvicorn is not installed. Please install it via pip.')
+
+ import starlette
+ if starlette.__version__ < '0.20.2':
+ raise ImportError('Starlette version is too old. Please upgrade it: `pip3 install starlette -U`')
+ return
+
+
+ def _prepare_endpoint_urls(self):
+ self.app.add_api_route(endpoint=self.process_update,path= self._url_path, methods=["POST"])
+
+
+ async def process_update(self, request: Request, update: dict):
+ """
+ Processes updates.
+
+ :meta private:
+ """
+ # header containsX-Telegram-Bot-Api-Secret-Token
+ if request.headers.get('X-Telegram-Bot-Api-Secret-Token') != self._secret_token:
+ # secret token didn't match
+ return JSONResponse(status_code=403, content={"error": "Forbidden"})
+ if request.headers.get('content-type') == 'application/json':
+ json_string = update
+ asyncio.create_task(self._bot.process_new_updates([Update.de_json(json_string)]))
+ return JSONResponse('', status_code=200)
+
+ return JSONResponse(status_code=403, content={"error": "Forbidden"})
+
+
+ async def run_app(self):
+ """
+ Run app with the given parameters to init.
+ Not supposed to be used manually by user.
+
+ :return: None
+ """
+
+ config = Config(app=self.app,
+ host=self._host,
+ port=self._port,
+ ssl_certfile=self._ssl_context[0],
+ ssl_keyfile=self._ssl_context[1]
+ )
+ server = Server(config)
+ await server.serve()
+ await self._bot.close_session()
\ No newline at end of file
diff --git a/telebot/ext/reloader.py b/telebot/ext/reloader.py
new file mode 100644
index 000000000..b6fd49b75
--- /dev/null
+++ b/telebot/ext/reloader.py
@@ -0,0 +1,31 @@
+
+from watchdog.events import FileSystemEventHandler
+from watchdog.events import FileSystemEvent
+import psutil
+import os
+import sys
+import logging
+
+logger = logging.getLogger('TeleBot')
+
+class EventHandler(FileSystemEventHandler):
+ def on_any_event(self, event: FileSystemEvent):
+ logger.info('* Detected changes in: %s, reloading', (event.src_path))
+ restart_file()
+
+def restart_file():
+ try:
+ p = psutil.Process(os.getpid())
+ for handler in p.open_files() + p.connections():
+ os.close(handler.fd)
+ except OSError:
+ pass
+ except Exception as e:
+ logger.error(e)
+
+ python = sys.executable
+
+ if os.name == 'nt':
+ os.execv(sys.executable, ['python'] + sys.argv)
+ else:
+ os.execl(python, python, *sys.argv)
diff --git a/telebot/ext/sync/__init__.py b/telebot/ext/sync/__init__.py
new file mode 100644
index 000000000..f7728aec7
--- /dev/null
+++ b/telebot/ext/sync/__init__.py
@@ -0,0 +1,10 @@
+"""
+A folder with all the sync extensions.
+"""
+
+from .webhooks import SyncWebhookListener
+
+
+__all__ = [
+ "SyncWebhookListener"
+]
\ No newline at end of file
diff --git a/telebot/ext/sync/webhooks.py b/telebot/ext/sync/webhooks.py
new file mode 100644
index 000000000..0d41b7205
--- /dev/null
+++ b/telebot/ext/sync/webhooks.py
@@ -0,0 +1,116 @@
+"""
+This file is used by TeleBot.run_webhooks() function.
+Fastapi is required to run this script.
+"""
+
+# modules required for running this script
+fastapi_installed = True
+
+try:
+ import fastapi
+ from fastapi.responses import JSONResponse
+ from fastapi.requests import Request
+ import uvicorn
+except ImportError:
+ fastapi_installed = False
+
+from telebot.types import Update
+
+from typing import Optional
+
+
+class SyncWebhookListener:
+ def __init__(self, bot,
+ secret_token: str,
+ host: Optional[str]="127.0.0.1",
+ port: Optional[int]=443,
+ ssl_context: Optional[tuple]=None,
+ url_path: Optional[str]=None,
+ ) -> None:
+ """
+ Synchronous implementation of webhook listener
+ for synchronous version of telebot.
+ Not supposed to be used manually by user.
+ Use TeleBot.run_webhooks() instead.
+
+ :param bot: TeleBot instance.
+ :type bot: telebot.TeleBot
+
+ :param secret_token: Telegram secret token
+ :type secret_token: str
+
+ :param host: Webhook host
+ :type host: str
+
+ :param port: Webhook port
+ :type port: int
+
+ :param ssl_context: SSL context
+ :type ssl_context: tuple
+
+ :param url_path: Webhook url path
+ :type url_path: str
+
+ :raises ImportError: If FastAPI or uvicorn is not installed.
+ :raises ImportError: If Starlette version is too old.
+
+ :return: None
+ """
+ self._check_dependencies()
+
+ self.app = fastapi.FastAPI()
+ self._secret_token = secret_token
+ self._bot = bot
+ self._port = port
+ self._host = host
+ self._ssl_context = ssl_context
+ self._url_path = url_path
+ self._prepare_endpoint_urls()
+
+
+ @staticmethod
+ def _check_dependencies():
+ if not fastapi_installed:
+ raise ImportError('Fastapi or uvicorn is not installed. Please install it via pip.')
+
+ import starlette
+ if starlette.__version__ < '0.20.2':
+ raise ImportError('Starlette version is too old. Please upgrade it: `pip3 install starlette -U`')
+ return
+
+
+ def _prepare_endpoint_urls(self):
+ self.app.add_api_route(endpoint=self.process_update,path= self._url_path, methods=["POST"])
+
+
+ def process_update(self, request: Request, update: dict):
+ """
+ Processes updates.
+
+ :meta private:
+ """
+ # header containsX-Telegram-Bot-Api-Secret-Token
+ if request.headers.get('X-Telegram-Bot-Api-Secret-Token') != self._secret_token:
+ # secret token didn't match
+ return JSONResponse(status_code=403, content={"error": "Forbidden"})
+ if request.headers.get('content-type') == 'application/json':
+ self._bot.process_new_updates([Update.de_json(update)])
+ return JSONResponse('', status_code=200)
+
+ return JSONResponse(status_code=403, content={"error": "Forbidden"})
+
+
+ def run_app(self):
+ """
+ Run app with the given parameters to init.
+ Not supposed to be used manually by user.
+
+ :return: None
+ """
+
+ uvicorn.run(app=self.app,
+ host=self._host,
+ port=self._port,
+ ssl_certfile=self._ssl_context[0],
+ ssl_keyfile=self._ssl_context[1]
+ )
diff --git a/telebot/formatting.py b/telebot/formatting.py
new file mode 100644
index 000000000..0e300f7c1
--- /dev/null
+++ b/telebot/formatting.py
@@ -0,0 +1,479 @@
+"""
+Markdown & HTML formatting functions.
+
+.. versionadded:: 4.5.1
+"""
+
+import re
+import html
+from typing import Optional, List, Dict
+
+
+def format_text(*args, separator="\n"):
+ """
+ Formats a list of strings into a single string.
+
+ .. code:: python3
+
+ format_text( # just an example
+ mbold('Hello'),
+ mitalic('World')
+ )
+
+ :param args: Strings to format.
+ :type args: :obj:`str`
+
+ :param separator: The separator to use between each string.
+ :type separator: :obj:`str`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return separator.join(args)
+
+
+def escape_html(content: str) -> str:
+ """
+ Escapes HTML characters in a string of HTML.
+
+ :param content: The string of HTML to escape.
+ :type content: :obj:`str`
+
+ :return: The escaped string.
+ :rtype: :obj:`str`
+ """
+ return html.escape(content)
+
+
+def escape_markdown(content: str) -> str:
+ """
+ Escapes Markdown characters in a string of Markdown.
+
+ Credits to: simonsmh
+
+ :param content: The string of Markdown to escape.
+ :type content: :obj:`str`
+
+ :return: The escaped string.
+ :rtype: :obj:`str`
+ """
+
+ parse = re.sub(r"([_*\[\]()~`>\#\+\-=|\.!\{\}\\])", r"\\\1", content)
+ reparse = re.sub(r"\\\\([_*\[\]()~`>\#\+\-=|\.!\{\}\\])", r"\1", parse)
+ return reparse
+
+
+def mbold(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns a Markdown-formatted bold string.
+
+ :param content: The string to bold.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '*{}*'.format(escape_markdown(content) if escape else content)
+
+
+def hbold(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns an HTML-formatted bold string.
+
+ :param content: The string to bold.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '{}'.format(escape_html(content) if escape else content)
+
+
+def mitalic(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns a Markdown-formatted italic string.
+
+ :param content: The string to italicize.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '_{}_\r'.format(escape_markdown(content) if escape else content)
+
+
+def hitalic(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns an HTML-formatted italic string.
+
+ :param content: The string to italicize.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '{}'.format(escape_html(content) if escape else content)
+
+
+def munderline(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns a Markdown-formatted underline string.
+
+ :param content: The string to underline.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '__{}__'.format(escape_markdown(content) if escape else content)
+
+
+def hunderline(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns an HTML-formatted underline string.
+
+ :param content: The string to underline.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+
+ """
+ return '{}'.format(escape_html(content) if escape else content)
+
+
+def mstrikethrough(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns a Markdown-formatted strikethrough string.
+
+ :param content: The string to strikethrough.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '~{}~'.format(escape_markdown(content) if escape else content)
+
+
+def hstrikethrough(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns an HTML-formatted strikethrough string.
+
+ :param content: The string to strikethrough.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '{}'.format(escape_html(content) if escape else content)
+
+
+def mspoiler(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns a Markdown-formatted spoiler string.
+
+ :param content: The string to spoiler.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '||{}||'.format(escape_markdown(content) if escape else content)
+
+
+def hspoiler(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns an HTML-formatted spoiler string.
+
+ :param content: The string to spoiler.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '{}'.format(escape_html(content) if escape else content)
+
+
+def mlink(content: str, url: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns a Markdown-formatted link string.
+
+ :param content: The string to link.
+ :type content: :obj:`str`
+
+ :param url: The URL to link to.
+ :type url: str
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '[{}]({})'.format(escape_markdown(content), escape_markdown(url) if escape else url)
+
+
+def hlink(content: str, url: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns an HTML-formatted link string.
+
+ :param content: The string to link.
+ :type content: :obj:`str`
+
+ :param url: The URL to link to.
+ :type url: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '{}'.format(escape_html(url), escape_html(content) if escape else content)
+
+
+def mcode(content: str, language: str="", escape: Optional[bool]=True) -> str:
+ """
+ Returns a Markdown-formatted code string.
+
+ :param content: The string to code.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '```{}\n{}```'.format(language, escape_markdown(content) if escape else content)
+
+
+def hcode(content: str, escape: Optional[bool]=True) -> str:
+ """
+ Returns an HTML-formatted code string.
+
+ :param content: The string to code.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '{}'.format(escape_html(content) if escape else content)
+
+
+def hpre(content: str, escape: Optional[bool]=True, language: str="") -> str:
+ """
+ Returns an HTML-formatted preformatted string.
+
+ :param content: The string to preformatted.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return '
{}
'.format(language, escape_html(content) if escape else content)
+
+
+def hide_link(url: str) -> str:
+ """
+ Hide url of an image.
+
+ :param url: The url of the image.
+ :type url: :obj:`str`
+
+ :return: The hidden url.
+ :rtype: :obj:`str`
+ """
+ return f''
+
+
+def mcite(content: str, escape: Optional[bool] = True, expandable: Optional[bool] = False) -> str:
+ """
+ Returns a Markdown-formatted block-quotation string.
+
+ :param content: The string to bold.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :param expandable: True if you need the quote to be expandable. Defaults to False.
+ :type expandable: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ content = escape_markdown(content) if escape else content
+ content = "\n".join([">" + line for line in content.split("\n")])
+ if expandable:
+ return f"**{content}||"
+ return content
+
+
+def hcite(content: str, escape: Optional[bool] = True, expandable: Optional[bool] = False) -> str:
+ """
+ Returns a html-formatted block-quotation string.
+
+ :param content: The string to bold.
+ :type content: :obj:`str`
+
+ :param escape: True if you need to escape special characters. Defaults to True.
+ :type escape: :obj:`bool`
+
+ :param expandable: True if you need the quote to be expandable. Defaults to False.
+ :type expandable: :obj:`bool`
+
+ :return: The formatted string.
+ :rtype: :obj:`str`
+ """
+ return "
{}
".format(
+ " expandable" if expandable else "",
+ escape_html(content) if escape else content,
+ )
+
+
+def apply_html_entities(text: str, entities: Optional[List], custom_subs: Optional[Dict[str, str]]) -> str:
+ """
+ Author: @sviat9440
+ Updaters: @badiboy, @EgorKhabarov
+ Message: "*Test* parse _formatting_, [url](https://example.com), [text_mention](tg://user?id=123456) and mention @username"
+
+ .. code-block:: python3
+ :caption: Example:
+
+ apply_html_entities(text, entities)
+ >> "Test parse formatting, url, text_mention and mention @username"
+
+ Custom subs:
+ You can customize the substitutes. By default, there is no substitute for the entities: hashtag, bot_command, email. You can add or modify substitute an existing entity.
+ .. code-block:: python3
+ :caption: Example:
+
+ apply_html_entities(
+ text,
+ entities,
+ {"bold": "{text}", "italic": "{text}", "mention": "{text}"},
+ )
+ >> "Test parse formatting, url and text_mention and mention @username"
+ """
+
+ if not entities:
+ return text.replace("&", "&").replace("<", "<").replace(">", ">")
+
+ _subs = {
+ "bold": "{text}",
+ "italic": "{text}",
+ "pre": "
{text}
",
+ "code": "{text}",
+ # "url": "{text}", # @badiboy plain URLs have no text and do not need tags
+ "text_link": "{text}",
+ "strikethrough": "{text}",
+ "underline": "{text}",
+ "spoiler": "{text}",
+ "custom_emoji": "{text}",
+ "blockquote": "
{text}
",
+ "expandable_blockquote": "
{text}
",
+
+ }
+
+ if custom_subs:
+ for key, value in custom_subs.items():
+ _subs[key] = value
+ utf16_text = text.encode("utf-16-le")
+ html_text = ""
+
+ def func(upd_text, subst_type=None, url=None, user=None, custom_emoji_id=None, language=None):
+ upd_text = upd_text.decode("utf-16-le")
+ if subst_type == "text_mention":
+ subst_type = "text_link"
+ url = "tg://user?id={0}".format(user.id)
+ elif subst_type == "mention":
+ url = "https://t.me/{0}".format(upd_text[1:])
+ upd_text = upd_text.replace("&", "&").replace("<", "<").replace(">", ">")
+ if not subst_type or not _subs.get(subst_type):
+ return upd_text
+ subs = _subs.get(subst_type)
+ if subst_type == "custom_emoji":
+ return subs.format(text=upd_text, custom_emoji_id=custom_emoji_id)
+ elif (subst_type == "pre") and language:
+ return "
{1}
".format(language, upd_text)
+ return subs.format(text=upd_text, url=url)
+
+ offset = 0
+ start_index = 0
+ end_index = 0
+ for entity in entities:
+ if entity.offset > offset:
+ # when the offset is not 0: for example, a __b__
+ # we need to add the text before the entity to the html_text
+ html_text += func(utf16_text[offset * 2: entity.offset * 2])
+ offset = entity.offset
+
+ new_string = func(utf16_text[offset * 2: (offset + entity.length) * 2], subst_type=entity.type,
+ url=entity.url, user=entity.user, custom_emoji_id=entity.custom_emoji_id,
+ language=entity.language)
+ start_index = len(html_text)
+ html_text += new_string
+ offset += entity.length
+ end_index = len(html_text)
+ elif entity.offset == offset:
+ new_string = func(utf16_text[offset * 2: (offset + entity.length) * 2], subst_type=entity.type,
+ url=entity.url, user=entity.user, custom_emoji_id=entity.custom_emoji_id,
+ language=entity.language)
+ start_index = len(html_text)
+ html_text += new_string
+ end_index = len(html_text)
+ offset += entity.length
+ else:
+ # Here we are processing nested entities.
+ # We shouldn't update offset, because they are the same as entity before.
+ # And, here we are replacing previous string with a new html-rendered text(previous string is already html-rendered,
+ # And we don't change it).
+ entity_string = html_text[start_index: end_index].encode("utf-16-le")
+ formatted_string = func(entity_string, subst_type=entity.type, url=entity.url, user=entity.user,
+ custom_emoji_id=entity.custom_emoji_id,
+ language=entity.language). \
+ replace("&", "&").replace("<", "<").replace(">", ">")
+ html_text = html_text[:start_index] + formatted_string + html_text[end_index:]
+ end_index = len(html_text)
+
+ if offset * 2 < len(utf16_text):
+ html_text += func(utf16_text[offset * 2:])
+
+ return html_text
diff --git a/telebot/handler_backends.py b/telebot/handler_backends.py
new file mode 100644
index 000000000..12f8c89bf
--- /dev/null
+++ b/telebot/handler_backends.py
@@ -0,0 +1,258 @@
+import os
+import pickle
+import threading
+
+from telebot import apihelper
+try:
+ from redis import Redis
+ redis_installed = True
+except:
+ redis_installed = False
+
+# backward compatibility
+from telebot.states import State, StatesGroup
+
+class HandlerBackend(object):
+ """
+ Class for saving (next step|reply) handlers.
+
+ :meta private:
+ """
+ def __init__(self, handlers=None):
+ if handlers is None:
+ handlers = {}
+ self.handlers = handlers
+
+ def register_handler(self, handler_group_id, handler):
+ raise NotImplementedError()
+
+ def clear_handlers(self, handler_group_id):
+ raise NotImplementedError()
+
+ def get_handlers(self, handler_group_id):
+ raise NotImplementedError()
+
+
+class MemoryHandlerBackend(HandlerBackend):
+ """
+ :meta private:
+ """
+ def register_handler(self, handler_group_id, handler):
+ if handler_group_id in self.handlers:
+ self.handlers[handler_group_id].append(handler)
+ else:
+ self.handlers[handler_group_id] = [handler]
+
+ def clear_handlers(self, handler_group_id):
+ self.handlers.pop(handler_group_id, None)
+
+ def get_handlers(self, handler_group_id):
+ return self.handlers.pop(handler_group_id, None)
+
+ def load_handlers(self, filename, del_file_after_loading):
+ raise NotImplementedError()
+
+
+class FileHandlerBackend(HandlerBackend):
+ """
+ :meta private:
+ """
+ def __init__(self, handlers=None, filename='./.handler-saves/handlers.save', delay=120):
+ super(FileHandlerBackend, self).__init__(handlers)
+ self.filename = filename
+ self.delay = delay
+ self.timer = threading.Timer(delay, self.save_handlers)
+
+ def register_handler(self, handler_group_id, handler):
+ if handler_group_id in self.handlers:
+ self.handlers[handler_group_id].append(handler)
+ else:
+ self.handlers[handler_group_id] = [handler]
+ self.start_save_timer()
+
+ def clear_handlers(self, handler_group_id):
+ self.handlers.pop(handler_group_id, None)
+ self.start_save_timer()
+
+ def get_handlers(self, handler_group_id):
+ handlers = self.handlers.pop(handler_group_id, None)
+ self.start_save_timer()
+ return handlers
+
+ def start_save_timer(self):
+ if not self.timer.is_alive():
+ if self.delay <= 0:
+ self.save_handlers()
+ else:
+ self.timer = threading.Timer(self.delay, self.save_handlers)
+ self.timer.start()
+
+ def save_handlers(self):
+ self.dump_handlers(self.handlers, self.filename)
+
+ def load_handlers(self, filename=None, del_file_after_loading=True):
+ if not filename:
+ filename = self.filename
+ tmp = self.return_load_handlers(filename, del_file_after_loading=del_file_after_loading)
+ if tmp is not None:
+ self.handlers.update(tmp)
+
+ @staticmethod
+ def dump_handlers(handlers, filename, file_mode="wb"):
+ dirs = filename.rsplit('/', maxsplit=1)[0]
+ os.makedirs(dirs, exist_ok=True)
+
+ with open(filename + ".tmp", file_mode) as file:
+ if (apihelper.CUSTOM_SERIALIZER is None):
+ pickle.dump(handlers, file)
+ else:
+ apihelper.CUSTOM_SERIALIZER.dump(handlers, file)
+
+ if os.path.isfile(filename):
+ os.remove(filename)
+
+ os.rename(filename + ".tmp", filename)
+
+ @staticmethod
+ def return_load_handlers(filename, del_file_after_loading=True):
+ if os.path.isfile(filename) and os.path.getsize(filename) > 0:
+ with open(filename, "rb") as file:
+ if (apihelper.CUSTOM_SERIALIZER is None):
+ handlers = pickle.load(file)
+ else:
+ handlers = apihelper.CUSTOM_SERIALIZER.load(file)
+
+ if del_file_after_loading:
+ os.remove(filename)
+
+ return handlers
+
+
+class RedisHandlerBackend(HandlerBackend):
+ """
+ :meta private:
+ """
+ def __init__(self, handlers=None, host='localhost', port=6379, db=0, prefix='telebot', password=None):
+ super(RedisHandlerBackend, self).__init__(handlers)
+ if not redis_installed:
+ raise Exception("Redis is not installed. Install it via 'pip install redis'")
+ self.prefix = prefix
+ self.redis = Redis(host, port, db, password)
+
+ def _key(self, handle_group_id):
+ return ':'.join((self.prefix, str(handle_group_id)))
+
+ def register_handler(self, handler_group_id, handler):
+ handlers = []
+ value = self.redis.get(self._key(handler_group_id))
+ if value:
+ handlers = pickle.loads(value)
+ handlers.append(handler)
+ self.redis.set(self._key(handler_group_id), pickle.dumps(handlers))
+
+ def clear_handlers(self, handler_group_id):
+ self.redis.delete(self._key(handler_group_id))
+
+ def get_handlers(self, handler_group_id):
+ handlers = None
+ value = self.redis.get(self._key(handler_group_id))
+ if value:
+ handlers = pickle.loads(value)
+ self.clear_handlers(handler_group_id)
+ return handlers
+
+
+class BaseMiddleware:
+ """
+ Base class for middleware.
+ Your middlewares should be inherited from this class.
+
+ Set update_sensitive=True if you want to get different updates on
+ different functions. For example, if you want to handle pre_process for
+ message update, then you will have to create pre_process_message function, and
+ so on. Same applies to post_process.
+
+ .. note::
+ If you want to use middleware, you have to set use_class_middlewares=True in your
+ TeleBot instance.
+
+ .. code-block:: python3
+ :caption: Example of class-based middlewares.
+
+ class MyMiddleware(BaseMiddleware):
+ def __init__(self):
+ self.update_sensitive = True
+ self.update_types = ['message', 'edited_message']
+
+ def pre_process_message(self, message, data):
+ # only message update here
+ pass
+
+ def post_process_message(self, message, data, exception):
+ pass # only message update here for post_process
+
+ def pre_process_edited_message(self, message, data):
+ # only edited_message update here
+ pass
+
+ def post_process_edited_message(self, message, data, exception):
+ pass # only edited_message update here for post_process
+ """
+
+ update_sensitive: bool = False
+
+ def __init__(self):
+ pass
+
+ def pre_process(self, message, data):
+ raise NotImplementedError
+
+ def post_process(self, message, data, exception):
+ raise NotImplementedError
+
+
+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 ContinueHandling:
+ """
+ Class for continue updates in handlers.
+ Just return instance of this class
+ in handlers to continue process.
+
+ .. code-block:: python3
+ :caption: Example of using ContinueHandling
+
+ @bot.message_handler(commands=['start'])
+ def start(message):
+ bot.send_message(message.chat.id, 'Hello World!')
+ return ContinueHandling()
+
+ @bot.message_handler(commands=['start'])
+ def start2(message):
+ bot.send_message(message.chat.id, 'Hello World2!')
+
+ """
+ def __init__(self) -> None:
+ pass
\ No newline at end of file
diff --git a/telebot/py.typed b/telebot/py.typed
new file mode 100644
index 000000000..e69de29bb
diff --git a/telebot/service_utils.py b/telebot/service_utils.py
new file mode 100644
index 000000000..2e4390904
--- /dev/null
+++ b/telebot/service_utils.py
@@ -0,0 +1,84 @@
+import random
+import string
+from io import BytesIO
+
+try:
+ # noinspection PyPackageRequirements
+ from PIL import Image
+ pil_imported = True
+except ImportError:
+ pil_imported = False
+
+
+def is_string(var) -> bool:
+ """
+ Returns True if the given object is a string.
+ """
+ return isinstance(var, str)
+
+
+def is_dict(var) -> bool:
+ """
+ Returns True if the given object is a dictionary.
+
+ :param var: object to be checked
+ :type var: :obj:`object`
+
+ :return: True if the given object is a dictionary.
+ :rtype: :obj:`bool`
+ """
+ return isinstance(var, dict)
+
+
+def is_bytes(var) -> bool:
+ """
+ Returns True if the given object is a bytes object.
+
+ :param var: object to be checked
+ :type var: :obj:`object`
+
+ :return: True if the given object is a bytes object.
+ :rtype: :obj:`bool`
+ """
+ return isinstance(var, bytes)
+
+
+def is_pil_image(var) -> bool:
+ """
+ Returns True if the given object is a PIL.Image.Image object.
+
+ :param var: object to be checked
+ :type var: :obj:`object`
+
+ :return: True if the given object is a PIL.Image.Image object.
+ :rtype: :obj:`bool`
+ """
+ return pil_imported and isinstance(var, Image.Image)
+
+
+def pil_image_to_file(image, extension='JPEG', quality='web_low'):
+ if pil_imported:
+ photoBuffer = BytesIO()
+ image.convert('RGB').save(photoBuffer, extension, quality=quality)
+ photoBuffer.seek(0)
+
+ return photoBuffer
+ else:
+ raise RuntimeError('PIL module is not imported')
+
+
+def chunks(lst, n):
+ """Yield successive n-sized chunks from lst."""
+ # https://stackoverflow.com/a/312464/9935473
+ for i in range(0, len(lst), n):
+ yield lst[i:i + n]
+
+
+def generate_random_token() -> str:
+ """
+ Generates a random token consisting of letters and digits, 16 characters long.
+
+ :return: a random token
+ :rtype: :obj:`str`
+ """
+ return ''.join(random.sample(string.ascii_letters, 16))
diff --git a/telebot/states/__init__.py b/telebot/states/__init__.py
new file mode 100644
index 000000000..2491608ee
--- /dev/null
+++ b/telebot/states/__init__.py
@@ -0,0 +1,128 @@
+"""
+Contains classes for states and state groups.
+"""
+
+from telebot import types
+
+
+class State:
+ """
+ Class representing a state.
+
+ .. code-block:: python3
+
+ class MyStates(StatesGroup):
+ my_state = State() # returns my_state:State string.
+ """
+
+ def __init__(self) -> None:
+ self.name: str = None
+ self.group: StatesGroup = None
+
+ def __str__(self) -> str:
+ return f"<{self.name}>"
+
+
+class StatesGroup:
+ """
+ Class representing common states.
+
+ .. code-block:: python3
+
+ class MyStates(StatesGroup):
+ my_state = State() # returns my_state:State string.
+ """
+
+ def __init_subclass__(cls) -> None:
+ state_list = []
+ for name, value in cls.__dict__.items():
+ if (
+ not name.startswith("__")
+ and not callable(value)
+ and isinstance(value, State)
+ ):
+ # change value of that variable
+ value.name = ":".join((cls.__name__, name))
+ value.group = cls
+ state_list.append(value)
+ cls._state_list = state_list
+
+ @classmethod
+ def state_list(self):
+ return self._state_list
+
+
+def resolve_context(message, bot_id: int) -> tuple:
+ # chat_id, user_id, business_connection_id, bot_id, message_thread_id
+
+ # message, edited_message, channel_post, edited_channel_post, business_message, edited_business_message
+ if isinstance(message, types.Message):
+ return (
+ message.chat.id,
+ message.from_user.id,
+ message.business_connection_id,
+ bot_id,
+ message.message_thread_id if message.is_topic_message else None,
+ )
+ elif isinstance(message, types.CallbackQuery): # callback_query
+ return (
+ message.message.chat.id,
+ message.from_user.id,
+ message.message.business_connection_id,
+ bot_id,
+ (
+ message.message.message_thread_id
+ if message.message.is_topic_message
+ else None
+ ),
+ )
+ elif isinstance(message, types.BusinessConnection): # business_connection
+ return (message.user_chat_id, message.user.id, message.id, bot_id, None)
+ elif isinstance(
+ message, types.BusinessMessagesDeleted
+ ): # deleted_business_messages
+ return (
+ message.chat.id,
+ message.chat.id,
+ message.business_connection_id,
+ bot_id,
+ None,
+ )
+ elif isinstance(message, types.MessageReactionUpdated): # message_reaction
+ return (message.chat.id, message.user.id, None, bot_id, None)
+ elif isinstance(
+ message, types.MessageReactionCountUpdated
+ ): # message_reaction_count
+ return (message.chat.id, None, None, bot_id, None)
+ elif isinstance(message, types.InlineQuery): # inline_query
+ return (None, message.from_user.id, None, bot_id, None)
+ elif isinstance(message, types.ChosenInlineResult): # chosen_inline_result
+ return (None, message.from_user.id, None, bot_id, None)
+ elif isinstance(message, types.ShippingQuery): # shipping_query
+ return (None, message.from_user.id, None, bot_id, None)
+ elif isinstance(message, types.PreCheckoutQuery): # pre_checkout_query
+ return (None, message.from_user.id, None, bot_id, None)
+ elif isinstance(message, types.PollAnswer): # poll_answer
+ return (None, message.user.id, None, bot_id, None)
+ elif isinstance(message, types.ChatMemberUpdated): # chat_member # my_chat_member
+ return (message.chat.id, message.from_user.id, None, bot_id, None)
+ elif isinstance(message, types.ChatJoinRequest): # chat_join_request
+ return (message.chat.id, message.from_user.id, None, bot_id, None)
+ elif isinstance(message, types.ChatBoostRemoved): # removed_chat_boost
+ return (
+ message.chat.id,
+ message.source.user.id if message.source else None,
+ None,
+ bot_id,
+ None,
+ )
+ elif isinstance(message, types.ChatBoostUpdated): # chat_boost
+ return (
+ message.chat.id,
+ message.boost.source.user.id if message.boost.source else None,
+ None,
+ bot_id,
+ None,
+ )
+ else:
+ pass # not yet supported :(
diff --git a/telebot/states/asyncio/__init__.py b/telebot/states/asyncio/__init__.py
new file mode 100644
index 000000000..14ef19536
--- /dev/null
+++ b/telebot/states/asyncio/__init__.py
@@ -0,0 +1,7 @@
+from .context import StateContext
+from .middleware import StateMiddleware
+
+__all__ = [
+ "StateContext",
+ "StateMiddleware",
+]
diff --git a/telebot/states/asyncio/context.py b/telebot/states/asyncio/context.py
new file mode 100644
index 000000000..50f252021
--- /dev/null
+++ b/telebot/states/asyncio/context.py
@@ -0,0 +1,153 @@
+from telebot.states import State
+from telebot.types import CallbackQuery, Message
+from telebot.async_telebot import AsyncTeleBot
+from telebot.states import resolve_context
+
+from typing import Union
+
+
+class StateContext:
+ """
+ Class representing a state context.
+
+ Passed through a middleware to provide easy way to set states.
+
+ .. code-block:: python3
+
+ @bot.message_handler(commands=['start'])
+ async def start_ex(message: types.Message, state_context: StateContext):
+ await state_context.set(MyStates.name)
+ await bot.send_message(message.chat.id, 'Hi, write me a name', reply_to_message_id=message.message_id)
+ # also, state_context.data(), .add_data(), .reset_data(), .delete() methods available.
+ """
+
+ def __init__(self, message: Union[Message, CallbackQuery], bot: AsyncTeleBot) -> None:
+ self.message: Union[Message, CallbackQuery] = message
+ self.bot: AsyncTeleBot = bot
+ self.bot_id = self.bot.bot_id
+
+ async def set(self, state: Union[State, str]) -> bool:
+ """
+ Set state for current user.
+
+ :param state: State object or state name.
+ :type state: Union[State, str]
+
+ .. code-block:: python3
+
+ @bot.message_handler(commands=['start'])
+ async def start_ex(message: types.Message, state_context: StateContext):
+ await state_context.set(MyStates.name)
+ await bot.send_message(message.chat.id, 'Hi, write me a name', reply_to_message_id=message.message_id)
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = (
+ resolve_context(self.message, self.bot.bot_id)
+ )
+ if isinstance(state, State):
+ state = state.name
+ return await self.bot.set_state(
+ chat_id=chat_id,
+ user_id=user_id,
+ state=state,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id,
+ )
+
+ async def get(self) -> str:
+ """
+ Get current state for current user.
+
+ :return: Current state name.
+ :rtype: str
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = (
+ resolve_context(self.message, self.bot.bot_id)
+ )
+ return await self.bot.get_state(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id,
+ )
+
+ async def delete(self) -> bool:
+ """
+ Deletes state and data for current user.
+
+ .. warning::
+
+ This method deletes state and associated data for current user.
+ """
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = (
+ resolve_context(self.message, self.bot.bot_id)
+ )
+ return await self.bot.delete_state(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id,
+ )
+
+ async def reset_data(self) -> bool:
+ """
+ Reset data for current user.
+ State will not be changed.
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = (
+ resolve_context(self.message, self.bot.bot_id)
+ )
+ return await self.bot.reset_data(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id,
+ )
+
+ def data(self) -> dict:
+ """
+ Get data for current user.
+
+ .. code-block:: python3
+
+ with state_context.data() as data:
+ print(data)
+ data['name'] = 'John'
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = (
+ resolve_context(self.message, self.bot.bot_id)
+ )
+ return self.bot.retrieve_data(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id,
+ )
+
+ async def add_data(self, **kwargs) -> None:
+ """
+ Add data for current user.
+
+ :param kwargs: Data to add.
+ :type kwargs: dict
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = (
+ resolve_context(self.message, self.bot.bot_id)
+ )
+ return await self.bot.add_data(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id,
+ **kwargs
+ )
diff --git a/telebot/states/asyncio/middleware.py b/telebot/states/asyncio/middleware.py
new file mode 100644
index 000000000..675b7b462
--- /dev/null
+++ b/telebot/states/asyncio/middleware.py
@@ -0,0 +1,21 @@
+from telebot.asyncio_handler_backends import BaseMiddleware
+from telebot.async_telebot import AsyncTeleBot
+from telebot.states.sync.context import StateContext
+from telebot.util import update_types
+from telebot import types
+
+
+class StateMiddleware(BaseMiddleware):
+
+ def __init__(self, bot: AsyncTeleBot) -> None:
+ self.update_sensitive = False
+ self.update_types = update_types
+ self.bot: AsyncTeleBot = bot
+
+ async def pre_process(self, message, data):
+ state_context = StateContext(message, self.bot)
+ data["state_context"] = state_context
+ data["state"] = state_context # 2 ways to access state context
+
+ async def post_process(self, message, data, exception):
+ pass
diff --git a/telebot/states/sync/__init__.py b/telebot/states/sync/__init__.py
new file mode 100644
index 000000000..60f9ea2b7
--- /dev/null
+++ b/telebot/states/sync/__init__.py
@@ -0,0 +1,7 @@
+from .context import StateContext
+from .middleware import StateMiddleware
+
+__all__ = [
+ 'StateContext',
+ 'StateMiddleware',
+]
\ No newline at end of file
diff --git a/telebot/states/sync/context.py b/telebot/states/sync/context.py
new file mode 100644
index 000000000..c0611f6bb
--- /dev/null
+++ b/telebot/states/sync/context.py
@@ -0,0 +1,143 @@
+from telebot.states import State, StatesGroup
+from telebot.types import CallbackQuery, Message
+from telebot import TeleBot, types
+from telebot.states import resolve_context
+
+from typing import Union
+
+
+
+class StateContext():
+ """
+ Class representing a state context.
+
+ Passed through a middleware to provide easy way to set states.
+
+ .. code-block:: python3
+
+ @bot.message_handler(commands=['start'])
+ def start_ex(message: types.Message, state_context: StateContext):
+ state_context.set(MyStates.name)
+ bot.send_message(message.chat.id, 'Hi, write me a name', reply_to_message_id=message.message_id)
+ # also, state_context.data(), .add_data(), .reset_data(), .delete() methods available.
+ """
+
+ def __init__(self, message: Union[Message, CallbackQuery], bot: str) -> None:
+ self.message: Union[Message, CallbackQuery] = message
+ self.bot: TeleBot = bot
+ self.bot_id = self.bot.bot_id
+
+ def set(self, state: Union[State, str]) -> bool:
+ """
+ Set state for current user.
+
+ :param state: State object or state name.
+ :type state: Union[State, str]
+
+ .. code-block:: python3
+
+ @bot.message_handler(commands=['start'])
+ def start_ex(message: types.Message, state_context: StateContext):
+ state_context.set(MyStates.name)
+ bot.send_message(message.chat.id, 'Hi, write me a name', reply_to_message_id=message.message_id)
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = resolve_context(self.message, self.bot.bot_id)
+ if isinstance(state, State):
+ state = state.name
+ return self.bot.set_state(
+ chat_id=chat_id,
+ user_id=user_id,
+ state=state,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id
+ )
+
+ def get(self) -> str:
+ """
+ Get current state for current user.
+
+ :return: Current state name.
+ :rtype: str
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = resolve_context(self.message, self.bot.bot_id)
+ return self.bot.get_state(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id
+ )
+
+ def delete(self) -> bool:
+ """
+ Deletes state and data for current user.
+
+ .. warning::
+
+ This method deletes state and associated data for current user.
+ """
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = resolve_context(self.message, self.bot.bot_id)
+ return self.bot.delete_state(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id
+ )
+
+ def reset_data(self) -> bool:
+ """
+ Reset data for current user.
+ State will not be changed.
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = resolve_context(self.message, self.bot.bot_id)
+ return self.bot.reset_data(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id
+ )
+
+ def data(self) -> dict:
+ """
+ Get data for current user.
+
+ .. code-block:: python3
+
+ with state_context.data() as data:
+ print(data)
+ data['name'] = 'John'
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = resolve_context(self.message, self.bot.bot_id)
+ return self.bot.retrieve_data(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id
+ )
+
+ def add_data(self, **kwargs) -> None:
+ """
+ Add data for current user.
+
+ :param kwargs: Data to add.
+ :type kwargs: dict
+ """
+
+ chat_id, user_id, business_connection_id, bot_id, message_thread_id = resolve_context(self.message, self.bot.bot_id)
+ return self.bot.add_data(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ bot_id=bot_id,
+ message_thread_id=message_thread_id,
+ **kwargs
+ )
+
\ No newline at end of file
diff --git a/telebot/states/sync/middleware.py b/telebot/states/sync/middleware.py
new file mode 100644
index 000000000..4a252158b
--- /dev/null
+++ b/telebot/states/sync/middleware.py
@@ -0,0 +1,21 @@
+from telebot.handler_backends import BaseMiddleware
+from telebot import TeleBot
+from telebot.states.sync.context import StateContext
+from telebot.util import update_types
+from telebot import types
+
+
+class StateMiddleware(BaseMiddleware):
+
+ def __init__(self, bot: TeleBot) -> None:
+ self.update_sensitive = False
+ self.update_types = update_types
+ self.bot: TeleBot = bot
+
+ def pre_process(self, message, data):
+ state_context = StateContext(message, self.bot)
+ data['state_context'] = state_context
+ data['state'] = state_context # 2 ways to access state context
+
+ def post_process(self, message, data, exception):
+ pass
diff --git a/telebot/storage/__init__.py b/telebot/storage/__init__.py
new file mode 100644
index 000000000..bb3dd7f07
--- /dev/null
+++ b/telebot/storage/__init__.py
@@ -0,0 +1,13 @@
+from telebot.storage.memory_storage import StateMemoryStorage
+from telebot.storage.redis_storage import StateRedisStorage
+from telebot.storage.pickle_storage import StatePickleStorage
+from telebot.storage.base_storage import StateDataContext, StateStorageBase
+
+
+__all__ = [
+ "StateStorageBase",
+ "StateDataContext",
+ "StateMemoryStorage",
+ "StateRedisStorage",
+ "StatePickleStorage",
+]
diff --git a/telebot/storage/base_storage.py b/telebot/storage/base_storage.py
new file mode 100644
index 000000000..033f63231
--- /dev/null
+++ b/telebot/storage/base_storage.py
@@ -0,0 +1,142 @@
+import copy
+
+
+class StateStorageBase:
+ def __init__(self) -> None:
+ pass
+
+ def set_data(self, chat_id, user_id, key, value,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ """
+ Set data for a user in a particular chat.
+ """
+ raise NotImplementedError
+
+ def get_data(self, chat_id, user_id):
+ """
+ Get data for a user in a particular chat.
+ """
+ raise NotImplementedError
+
+ def set_state(self, chat_id, user_id, state,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ """
+ Set state for a particular user.
+
+ ! Note that you should create a
+ record if it does not exist, and
+ if a record with state already exists,
+ you need to update a record.
+ """
+ raise NotImplementedError
+
+ def delete_state(self, chat_id, user_id,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ """
+ Delete state for a particular user.
+ """
+ raise NotImplementedError
+
+ def reset_data(self, chat_id, user_id,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ """
+ Reset data for a particular user in a chat.
+ """
+ raise NotImplementedError
+
+ def get_state(self, chat_id, user_id,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ raise NotImplementedError
+
+ def get_interactive_data(self, chat_id, user_id,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ raise NotImplementedError
+
+ def save(self, chat_id, user_id, data):
+ raise NotImplementedError
+
+ def _get_key(
+ self,
+ chat_id: int,
+ user_id: int,
+ prefix: str,
+ separator: str,
+ business_connection_id: str = None,
+ message_thread_id: int = None,
+ bot_id: int = None,
+ ) -> str:
+ """
+ Convert parameters to a key.
+ """
+ params = [prefix]
+ if bot_id:
+ params.append(str(bot_id))
+ if business_connection_id:
+ params.append(business_connection_id)
+ if message_thread_id:
+ params.append(str(message_thread_id))
+ params.append(str(chat_id))
+ params.append(str(user_id))
+
+ return separator.join(params)
+
+
+class StateDataContext:
+ """
+ Class for data.
+ """
+
+ def __init__(
+ self,
+ obj,
+ chat_id,
+ user_id,
+ business_connection_id=None,
+ message_thread_id=None,
+ bot_id=None,
+ ):
+ self.obj = obj
+ res = obj.get_data(
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ message_thread_id=message_thread_id,
+ bot_id=bot_id,
+ )
+ self.data = copy.deepcopy(res)
+ self.chat_id = chat_id
+ self.user_id = user_id
+ self.bot_id = bot_id
+ self.business_connection_id = business_connection_id
+ self.message_thread_id = message_thread_id
+
+ def __enter__(self):
+ return self.data
+
+ def __exit__(self, exc_type, exc_val, exc_tb):
+ return self.obj.save(
+ self.chat_id,
+ self.user_id,
+ self.data,
+ self.business_connection_id,
+ self.message_thread_id,
+ self.bot_id,
+ )
diff --git a/telebot/storage/memory_storage.py b/telebot/storage/memory_storage.py
new file mode 100644
index 000000000..21266632c
--- /dev/null
+++ b/telebot/storage/memory_storage.py
@@ -0,0 +1,225 @@
+from telebot.storage.base_storage import StateStorageBase, StateDataContext
+from typing import Optional, Union
+
+
+class StateMemoryStorage(StateStorageBase):
+ """
+ Memory storage for states.
+
+ Stores states in memory as a dictionary.
+
+ .. code-block:: python3
+
+ storage = StateMemoryStorage()
+ bot = TeleBot(token, storage=storage)
+
+ :param separator: Separator for keys, default is ":".
+ :type separator: Optional[str]
+
+ :param prefix: Prefix for keys, default is "telebot".
+ :type prefix: Optional[str]
+ """
+
+ def __init__(
+ self, separator: Optional[str] = ":", prefix: Optional[str] = "telebot"
+ ) -> None:
+ self.separator = separator
+ self.prefix = prefix
+ if not self.prefix:
+ raise ValueError("Prefix cannot be empty")
+
+ self.data = (
+ {}
+ ) # key: telebot:bot_id:business_connection_id:message_thread_id:chat_id:user_id
+
+ def set_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ state: str,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ if hasattr(state, "name"):
+ state = state.name
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ self.data[_key] = {"state": state, "data": {}}
+ else:
+ self.data[_key]["state"] = state
+
+ return True
+
+ def get_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Union[str, None]:
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ return None
+
+ return self.data[_key]["state"]
+
+ def delete_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ return False
+
+ del self.data[_key]
+ return True
+
+ def set_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ key: str,
+ value: Union[str, int, float, dict],
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ raise RuntimeError(f"StateMemoryStorage: key {_key} does not exist.")
+ self.data[_key]["data"][key] = value
+ return True
+
+ def get_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> dict:
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ return self.data.get(_key, {}).get("data", {})
+
+ def reset_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ return False
+ self.data[_key]["data"] = {}
+ return True
+
+ def get_interactive_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Optional[dict]:
+ return StateDataContext(
+ self,
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ message_thread_id=message_thread_id,
+ bot_id=bot_id,
+ )
+
+ def save(
+ self,
+ chat_id: int,
+ user_id: int,
+ data: dict,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ if self.data.get(_key) is None:
+ return False
+ self.data[_key]["data"] = data
+ return True
+
+ def __str__(self) -> str:
+ return f""
diff --git a/telebot/storage/pickle_storage.py b/telebot/storage/pickle_storage.py
new file mode 100644
index 000000000..b4c44e8fa
--- /dev/null
+++ b/telebot/storage/pickle_storage.py
@@ -0,0 +1,263 @@
+import os
+import pickle
+import threading
+from typing import Optional, Union, Callable
+from telebot.storage.base_storage import StateStorageBase, StateDataContext
+
+
+def with_lock(func: Callable) -> Callable:
+ def wrapper(self, *args, **kwargs):
+ with self.lock:
+ return func(self, *args, **kwargs)
+
+ return wrapper
+
+
+class StatePickleStorage(StateStorageBase):
+ """
+ State storage based on pickle file.
+
+ .. warning::
+
+ This storage is not recommended for production use.
+ Data may be corrupted. If you face a case where states do not work as expected,
+ try to use another storage.
+
+ .. code-block:: python3
+
+ storage = StatePickleStorage()
+ bot = TeleBot(token, storage=storage)
+
+ :param file_path: Path to file where states will be stored.
+ :type file_path: str
+
+ :param prefix: Prefix for keys, default is "telebot".
+ :type prefix: Optional[str]
+
+ :param separator: Separator for keys, default is ":".
+ :type separator: Optional[str]
+ """
+
+ def __init__(
+ self,
+ file_path: str = "./.state-save/states.pkl",
+ prefix="telebot",
+ separator: Optional[str] = ":",
+ ) -> None:
+ self.file_path = file_path
+ self.prefix = prefix
+ self.separator = separator
+ self.lock = threading.Lock()
+
+ self.create_dir()
+
+ def _read_from_file(self) -> dict:
+ with open(self.file_path, "rb") as f:
+ return pickle.load(f)
+
+ def _write_to_file(self, data: dict) -> None:
+ with open(self.file_path, "wb") as f:
+ pickle.dump(data, f)
+
+ def create_dir(self):
+ """
+ Create directory .save-handlers.
+ """
+ dirs, filename = os.path.split(self.file_path)
+ os.makedirs(dirs, exist_ok=True)
+ if not os.path.isfile(self.file_path):
+ with open(self.file_path, "wb") as file:
+ pickle.dump({}, file)
+
+ @with_lock
+ def set_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ state: str,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = self._read_from_file()
+ if _key not in data:
+ data[_key] = {"state": state, "data": {}}
+ else:
+ data[_key]["state"] = state
+ self._write_to_file(data)
+ return True
+
+ @with_lock
+ def get_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Union[str, None]:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = self._read_from_file()
+ return data.get(_key, {}).get("state")
+
+ @with_lock
+ def delete_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = self._read_from_file()
+ if _key in data:
+ del data[_key]
+ self._write_to_file(data)
+ return True
+ return False
+
+ @with_lock
+ def set_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ key: str,
+ value: Union[str, int, float, dict],
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = self._read_from_file()
+ state_data = data.get(_key, {})
+ state_data["data"][key] = value
+
+ if _key not in data:
+ raise RuntimeError(f"PickleStorage: key {_key} does not exist.")
+
+ self._write_to_file(data)
+ return True
+
+ @with_lock
+ def get_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> dict:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = self._read_from_file()
+ return data.get(_key, {}).get("data", {})
+
+ @with_lock
+ def reset_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = self._read_from_file()
+ if _key in data:
+ data[_key]["data"] = {}
+ self._write_to_file(data)
+ return True
+ return False
+
+ def get_interactive_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Optional[dict]:
+ return StateDataContext(
+ self,
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ message_thread_id=message_thread_id,
+ bot_id=bot_id,
+ )
+
+ @with_lock
+ def save(
+ self,
+ chat_id: int,
+ user_id: int,
+ data: dict,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ file_data = self._read_from_file()
+ file_data[_key]["data"] = data
+ self._write_to_file(file_data)
+ return True
+
+ def __str__(self) -> str:
+ return f"StatePickleStorage({self.file_path}, {self.prefix})"
diff --git a/telebot/storage/redis_storage.py b/telebot/storage/redis_storage.py
new file mode 100644
index 000000000..c9935ac5e
--- /dev/null
+++ b/telebot/storage/redis_storage.py
@@ -0,0 +1,324 @@
+import json
+from telebot.storage.base_storage import StateStorageBase, StateDataContext
+from typing import Optional, Union
+
+redis_installed = True
+try:
+ import redis
+except ImportError:
+ redis_installed = False
+
+
+class StateRedisStorage(StateStorageBase):
+ """
+ State storage based on Redis.
+
+ .. code-block:: python3
+
+ storage = StateRedisStorage(...)
+ bot = TeleBot(token, storage=storage)
+
+ :param host: Redis host, default is "localhost".
+ :type host: str
+
+ :param port: Redis port, default is 6379.
+ :type port: int
+
+ :param db: Redis database, default is 0.
+ :type db: int
+
+ :param password: Redis password, default is None.
+ :type password: Optional[str]
+
+ :param prefix: Prefix for keys, default is "telebot".
+ :type prefix: Optional[str]
+
+ :param redis_url: Redis URL, default is None.
+ :type redis_url: Optional[str]
+
+ :param connection_pool: Redis connection pool, default is None.
+ :type connection_pool: Optional[ConnectionPool]
+
+ :param separator: Separator for keys, default is ":".
+ :type separator: Optional[str]
+
+ """
+
+ def __init__(
+ self,
+ host="localhost",
+ port=6379,
+ db=0,
+ password=None,
+ prefix="telebot",
+ redis_url=None,
+ connection_pool: "redis.ConnectionPool" = None,
+ separator: Optional[str] = ":",
+ ) -> None:
+
+ if not redis_installed:
+ raise ImportError(
+ "Redis is not installed. Please install it via pip install redis"
+ )
+
+ self.separator = separator
+ self.prefix = prefix
+ if not self.prefix:
+ raise ValueError("Prefix cannot be empty")
+
+ if redis_url:
+ self.redis = redis.Redis.from_url(redis_url)
+ elif connection_pool:
+ self.redis = redis.Redis(connection_pool=connection_pool)
+ else:
+ self.redis = redis.Redis(host=host, port=port, db=db, password=password)
+
+ def set_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ state: str,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ if hasattr(state, "name"):
+ state = state.name
+
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ def set_state_action(pipe):
+ pipe.multi()
+
+ data = pipe.hget(_key, "data")
+ result = pipe.execute()
+ data = result[0]
+ if data is None:
+ # If data is None, set it to an empty dictionary
+ data = {}
+ pipe.hset(_key, "data", json.dumps(data))
+
+ pipe.hset(_key, "state", state)
+
+ self.redis.transaction(set_state_action, _key)
+ return True
+
+ def get_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Union[str, None]:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ state_bytes = self.redis.hget(_key, "state")
+ return state_bytes.decode("utf-8") if state_bytes else None
+
+ def delete_state(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ return self.redis.delete(_key) > 0
+
+ def set_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ key: str,
+ value: Union[str, int, float, dict],
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ def set_data_action(pipe):
+ pipe.multi()
+ data = pipe.hget(_key, "data")
+ data = data.execute()[0]
+ if data is None:
+ raise RuntimeError(f"RedisStorage: key {_key} does not exist.")
+ else:
+ data = json.loads(data)
+ data[key] = value
+ pipe.hset(_key, "data", json.dumps(data))
+
+ self.redis.transaction(set_data_action, _key)
+ return True
+
+ def get_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> dict:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+ data = self.redis.hget(_key, "data")
+ return json.loads(data) if data else {}
+
+ def reset_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ def reset_data_action(pipe):
+ pipe.multi()
+ if pipe.exists(_key):
+ pipe.hset(_key, "data", "{}")
+ else:
+ return False
+
+ self.redis.transaction(reset_data_action, _key)
+ return True
+
+ def get_interactive_data(
+ self,
+ chat_id: int,
+ user_id: int,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> Optional[dict]:
+ return StateDataContext(
+ self,
+ chat_id=chat_id,
+ user_id=user_id,
+ business_connection_id=business_connection_id,
+ message_thread_id=message_thread_id,
+ bot_id=bot_id,
+ )
+
+ def save(
+ self,
+ chat_id: int,
+ user_id: int,
+ data: dict,
+ business_connection_id: Optional[str] = None,
+ message_thread_id: Optional[int] = None,
+ bot_id: Optional[int] = None,
+ ) -> bool:
+ _key = self._get_key(
+ chat_id,
+ user_id,
+ self.prefix,
+ self.separator,
+ business_connection_id,
+ message_thread_id,
+ bot_id,
+ )
+
+ def save_action(pipe):
+ pipe.multi()
+ if pipe.exists(_key):
+ pipe.hset(_key, "data", json.dumps(data))
+ else:
+ return False
+
+ self.redis.transaction(save_action, _key)
+ return True
+
+ def migrate_format(self, bot_id: int, prefix: Optional[str] = "telebot_"):
+ """
+ Migrate from old to new format of keys.
+ Run this function once to migrate all redis existing keys to new format.
+
+ Starting from version 4.23.0, the format of keys has been changed:
+ :value
+ - Old format: {prefix}chat_id: {user_id: {'state': None, 'data': {}}, ...}
+ - New format:
+ {prefix}{separator}{bot_id}{separator}{business_connection_id}{separator}{message_thread_id}{separator}{chat_id}{separator}{user_id}: {'state': ..., 'data': {}}
+
+ This function will help you to migrate from the old format to the new one in order to avoid data loss.
+
+ :param bot_id: Bot ID; To get it, call a getMe request and grab the id from the response.
+ :type bot_id: int
+
+ :param prefix: Prefix for keys, default is "telebot_"(old default value)
+ :type prefix: Optional[str]
+ """
+ keys = self.redis.keys(f"{prefix}*")
+
+ for key in keys:
+ old_key = key.decode("utf-8")
+ # old: {prefix}chat_id: {user_id: {'state': None, 'data': {}}, ...}
+ value = self.redis.get(old_key)
+ value = json.loads(value)
+
+ chat_id = old_key[len(prefix) :]
+ user_id = list(value.keys())[0]
+ state = value[user_id]["state"]
+ state_data = value[user_id]["data"]
+
+ # set new format
+ new_key = self._get_key(
+ int(chat_id), int(user_id), self.prefix, self.separator, bot_id=bot_id
+ )
+ self.redis.hset(new_key, "state", state)
+ self.redis.hset(new_key, "data", json.dumps(state_data))
+
+ # delete old key
+ self.redis.delete(old_key)
+
+ def __str__(self) -> str:
+ return f"StateRedisStorage({self.redis})"
diff --git a/telebot/types.py b/telebot/types.py
index 6165c9479..b0dffd358 100644
--- a/telebot/types.py
+++ b/telebot/types.py
@@ -1,13 +1,37 @@
# -*- coding: utf-8 -*-
+from __future__ import annotations
+
+from io import IOBase
+import logging
+import os
+import traceback
+from pathlib import Path
+from typing import Dict, List, Optional, Union, Any, Tuple
+from abc import ABC
try:
+ # noinspection PyPackageRequirements
import ujson as json
except ImportError:
import json
-import six
+from telebot import service_utils
+from telebot.formatting import apply_html_entities
+
+
+DISABLE_KEYLEN_ERROR = False
+DEPRECATION_STACK_SHOW_DEPTH = 0
+
+logger = logging.getLogger('TeleBot')
-from telebot import util
+
+def log_deprecation_warning(warning_message, logging_level=logging.WARNING):
+ """
+ Logs a deprecation warning message.
+ """
+ logger.log(logging_level, warning_message)
+ if DEPRECATION_STACK_SHOW_DEPTH:
+ logger.log(logging_level, "".join(traceback.format_stack(limit=DEPRECATION_STACK_SHOW_DEPTH)))
class JsonSerializable(object):
@@ -20,6 +44,8 @@ def to_json(self):
"""
Returns a JSON string representation of this class.
+ :meta private:
+
This function must be overridden by subclasses.
:return: a JSON formatted string.
"""
@@ -29,15 +55,17 @@ def to_json(self):
class Dictionaryable(object):
"""
Subclasses of this class are guaranteed to be able to be converted to dictionary.
- All subclasses of this class must override to_dic.
+ All subclasses of this class must override to_dict.
"""
- def to_dic(self):
+ def to_dict(self):
"""
- Returns a JSON string representation of this class.
+ Returns a DICT with class field values
+
+ :meta private:
This function must be overridden by subclasses.
- :return: a JSON formatted string.
+ :return: a DICT
"""
raise NotImplementedError
@@ -49,2127 +77,13170 @@ class JsonDeserializable(object):
"""
@classmethod
- def de_json(cls, json_type):
+ def de_json(cls, json_string):
"""
Returns an instance of this class from the given json dict or string.
+ :meta private:
+
This function must be overridden by subclasses.
:return: an instance of this class created from the given json dict or string.
"""
raise NotImplementedError
@staticmethod
- def check_json(json_type):
+ def check_json(json_type, dict_copy = True):
"""
Checks whether json_type is a dict or a string. If it is already a dict, it is returned as-is.
If it is not, it is converted to a dict by means of json.loads(json_type)
- :param json_type:
- :return:
- """
- try:
- str_types = (str, unicode)
- except NameError:
- str_types = (str,)
- if type(json_type) == dict:
- return json_type
- elif type(json_type) in str_types:
+ :meta private:
+
+ :param json_type: input json or parsed dict
+ :param dict_copy: if dict is passed and it is changed outside - should be True!
+ :return: Dictionary parsed from json or original dict
+ """
+ if service_utils.is_dict(json_type):
+ return json_type.copy() if dict_copy else json_type
+ elif service_utils.is_string(json_type):
return json.loads(json_type)
else:
raise ValueError("json_type should be a json dict or string.")
def __str__(self):
- d = {}
- for x, y in six.iteritems(self.__dict__):
- if hasattr(y, '__dict__'):
- d[x] = y.__dict__
- else:
- d[x] = y
-
- return six.text_type(d)
+ d = {
+ x: y.__dict__ if hasattr(y, '__dict__') else y
+ for x, y in self.__dict__.items()
+ }
+ return str(d)
class Update(JsonDeserializable):
- @classmethod
- def de_json(cls, json_type):
- obj = cls.check_json(json_type)
- update_id = obj['update_id']
- message = None
- edited_message = None
- channel_post = None
- edited_channel_post = None
- inline_query = None
- chosen_inline_result = None
- callback_query = None
- shipping_query = None
- pre_checkout_query = None
- if 'message' in obj:
- message = Message.de_json(obj['message'])
- if 'edited_message' in obj:
- edited_message = Message.de_json(obj['edited_message'])
- if 'channel_post' in obj:
- channel_post = Message.de_json(obj['channel_post'])
- if 'edited_channel_post' in obj:
- edited_channel_post = Message.de_json(obj['edited_channel_post'])
- if 'inline_query' in obj:
- inline_query = InlineQuery.de_json(obj['inline_query'])
- if 'chosen_inline_result' in obj:
- chosen_inline_result = ChosenInlineResult.de_json(obj['chosen_inline_result'])
- if 'callback_query' in obj:
- callback_query = CallbackQuery.de_json(obj['callback_query'])
- if 'shipping_query' in obj:
- shipping_query = ShippingQuery.de_json(obj['shipping_query'])
- if 'pre_checkout_query' in obj:
- pre_checkout_query = PreCheckoutQuery.de_json(obj['pre_checkout_query'])
- return cls(update_id, message, edited_message, channel_post, edited_channel_post, inline_query,
- chosen_inline_result, callback_query, shipping_query, pre_checkout_query)
-
- def __init__(self, update_id, message, edited_message, channel_post, edited_channel_post, inline_query,
- chosen_inline_result, callback_query, shipping_query, pre_checkout_query):
- self.update_id = update_id
- self.message = message
- self.edited_message = edited_message
- self.channel_post = channel_post
- self.edited_channel_post = edited_channel_post
- self.inline_query = inline_query
- self.chosen_inline_result = chosen_inline_result
- self.callback_query = callback_query
- self.shipping_query = shipping_query
- self.pre_checkout_query = pre_checkout_query
+ """
+ This object represents an incoming update.At most one of the optional parameters can be present in any given update.
+ Telegram Documentation: https://core.telegram.org/bots/api#update
-class WebhookInfo(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- url = obj['url']
- has_custom_certificate = obj['has_custom_certificate']
- pending_update_count = obj['pending_update_count']
- last_error_date = None
- last_error_message = None
- max_connections = None
- allowed_updates = None
- if 'last_error_message' in obj:
- last_error_date = obj['last_error_date']
- if 'last_error_message' in obj:
- last_error_message = obj['last_error_message']
- if 'max_connections' in obj:
- max_connections = obj['max_connections']
- if 'allowed_updates' in obj:
- allowed_updates = obj['allowed_updates']
- return cls(url, has_custom_certificate, pending_update_count, last_error_date, last_error_message,
- max_connections, allowed_updates)
-
- def __init__(self, url, has_custom_certificate, pending_update_count, last_error_date, last_error_message,
- max_connections, allowed_updates):
- self.url = url
- self.has_custom_certificate = has_custom_certificate
- self.pending_update_count = pending_update_count
- self.last_error_date = last_error_date
- self.last_error_message = last_error_message
- self.max_connections = max_connections
- self.allowed_updates = allowed_updates
-
-
-class User(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- id = obj['id']
- is_bot = obj['is_bot']
- first_name = obj['first_name']
- last_name = obj.get('last_name')
- username = obj.get('username')
- language_code = obj.get('language_code')
- return cls(id, is_bot, first_name, last_name, username, language_code)
-
- def __init__(self, id, is_bot, first_name, last_name=None, username=None, language_code=None):
- self.id = id
- self.is_bot = is_bot
- self.first_name = first_name
- self.username = username
- self.last_name = last_name
- self.language_code = language_code
+ :param update_id: The update's unique identifier. Update identifiers start from a certain positive number and
+ increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore
+ repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates
+ for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.
+ :type update_id: :obj:`int`
+ :param message: Optional. New incoming message of any kind - text, photo, sticker, etc.
+ :type message: :class:`telebot.types.Message`
-class GroupChat(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- id = obj['id']
- title = obj['title']
- return cls(id, title)
+ :param edited_message: Optional. New version of a message that is known to the bot and was edited
+ :type edited_message: :class:`telebot.types.Message`
- def __init__(self, id, title):
- self.id = id
- self.title = title
+ :param channel_post: Optional. New incoming channel post of any kind - text, photo, sticker, etc.
+ :type channel_post: :class:`telebot.types.Message`
+ :param edited_channel_post: Optional. New version of a channel post that is known to the bot and was edited
+ :type edited_channel_post: :class:`telebot.types.Message`
-class Chat(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- id = obj['id']
- type = obj['type']
- title = obj.get('title')
- username = obj.get('username')
- first_name = obj.get('first_name')
- last_name = obj.get('last_name')
- all_members_are_administrators = obj.get('all_members_are_administrators')
- photo = None
- if 'photo' in obj:
- photo = ChatPhoto.de_json(obj['photo'])
- description = obj.get('description')
- invite_link = obj.get('invite_link')
- pinned_message = None
- if 'pinned_message' in obj:
- pinned_message = Message.de_json(obj['pinned_message'])
- sticker_set_name = obj.get('sticker_set_name')
- can_set_sticker_set = obj.get('can_set_sticker_set')
- return cls(id, type, title, username, first_name, last_name, all_members_are_administrators,
- photo, description, invite_link, pinned_message, sticker_set_name, can_set_sticker_set)
-
- def __init__(self, id, type, title=None, username=None, first_name=None, last_name=None,
- all_members_are_administrators=None, photo=None, description=None, invite_link=None,
- pinned_message=None, sticker_set_name=None, can_set_sticker_set=None):
- self.type = type
- self.last_name = last_name
- self.first_name = first_name
- self.username = username
- self.id = id
- self.title = title
- self.all_members_are_administrators = all_members_are_administrators
- self.photo = photo
- self.description = description
- self.invite_link = invite_link
- self.pinned_message = pinned_message
- self.sticker_set_name = sticker_set_name
- self.can_set_sticker_set = can_set_sticker_set
+ :param message_reaction: Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat
+ and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.
+ :type message_reaction: :class:`telebot.types.MessageReactionUpdated`
+ :param message_reaction_count: Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify
+ "message_reaction_count" in the list of allowed_updates to receive these updates.
+ :type message_reaction_count: :class:`telebot.types.MessageReactionCountUpdated`
-class Message(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- message_id = obj['message_id']
- from_user = None
- if 'from' in obj:
- from_user = User.de_json(obj['from'])
- date = obj['date']
- chat = Chat.de_json(obj['chat'])
- content_type = None
- opts = {}
- if 'forward_from' in obj:
- opts['forward_from'] = User.de_json(obj['forward_from'])
- if 'forward_from_chat' in obj:
- opts['forward_from_chat'] = Chat.de_json(obj['forward_from_chat'])
- if 'forward_from_message_id' in obj:
- opts['forward_from_message_id'] = obj.get('forward_from_message_id')
- if 'forward_signature' in obj:
- opts['forward_signature'] = obj.get('forward_signature')
- if 'forward_date' in obj:
- opts['forward_date'] = obj.get('forward_date')
- if 'reply_to_message' in obj:
- opts['reply_to_message'] = Message.de_json(obj['reply_to_message'])
- if 'edit_date' in obj:
- opts['edit_date'] = obj.get('edit_date')
- if 'media_group_id' in obj:
- opts['media_group_id'] = obj.get('media_group_id')
- if 'author_signature' in obj:
- opts['author_signature'] = obj.get('author_signature')
- if 'text' in obj:
- opts['text'] = obj['text']
- content_type = 'text'
- if 'entities' in obj:
- opts['entities'] = Message.parse_entities(obj['entities'])
- if 'caption_entities' in obj:
- opts['caption_entities'] = Message.parse_entities(obj['caption_entities'])
- if 'audio' in obj:
- opts['audio'] = Audio.de_json(obj['audio'])
- content_type = 'audio'
- if 'document' in obj:
- opts['document'] = Document.de_json(obj['document'])
- content_type = 'document'
- if 'game' in obj:
- opts['game'] = Game.de_json(obj['game'])
- content_type = 'game'
- if 'photo' in obj:
- opts['photo'] = Message.parse_photo(obj['photo'])
- content_type = 'photo'
- if 'sticker' in obj:
- opts['sticker'] = Sticker.de_json(obj['sticker'])
- content_type = 'sticker'
- if 'video' in obj:
- opts['video'] = Video.de_json(obj['video'])
- content_type = 'video'
- if 'video_note' in obj:
- opts['video_note'] = VideoNote.de_json(obj['video_note'])
- content_type = 'video_note'
- if 'voice' in obj:
- opts['voice'] = Audio.de_json(obj['voice'])
- content_type = 'voice'
- if 'caption' in obj:
- opts['caption'] = obj['caption']
- if 'contact' in obj:
- opts['contact'] = Contact.de_json(json.dumps(obj['contact']))
- content_type = 'contact'
- if 'location' in obj:
- opts['location'] = Location.de_json(obj['location'])
- content_type = 'location'
- if 'venue' in obj:
- opts['venue'] = Venue.de_json(obj['venue'])
- content_type = 'venue'
- if 'new_chat_member' in obj:
- opts['new_chat_member'] = User.de_json(obj['new_chat_member'])
- content_type = 'new_chat_member'
- if 'new_chat_members' in obj:
- chat_members = obj['new_chat_members']
- nms = []
- for m in chat_members:
- nms.append(User.de_json(m))
- opts['new_chat_members'] = nms
- content_type = 'new_chat_members'
- if 'left_chat_member' in obj:
- opts['left_chat_member'] = User.de_json(obj['left_chat_member'])
- content_type = 'left_chat_member'
- if 'new_chat_title' in obj:
- opts['new_chat_title'] = obj['new_chat_title']
- content_type = 'new_chat_title'
- if 'new_chat_photo' in obj:
- opts['new_chat_photo'] = Message.parse_photo(obj['new_chat_photo'])
- content_type = 'new_chat_photo'
- if 'delete_chat_photo' in obj:
- opts['delete_chat_photo'] = obj['delete_chat_photo']
- content_type = 'delete_chat_photo'
- if 'group_chat_created' in obj:
- opts['group_chat_created'] = obj['group_chat_created']
- content_type = 'group_chat_created'
- if 'supergroup_chat_created' in obj:
- opts['supergroup_chat_created'] = obj['supergroup_chat_created']
- content_type = 'supergroup_chat_created'
- if 'channel_chat_created' in obj:
- opts['channel_chat_created'] = obj['channel_chat_created']
- content_type = 'channel_chat_created'
- if 'migrate_to_chat_id' in obj:
- opts['migrate_to_chat_id'] = obj['migrate_to_chat_id']
- content_type = 'migrate_to_chat_id'
- if 'migrate_from_chat_id' in obj:
- opts['migrate_from_chat_id'] = obj['migrate_from_chat_id']
- content_type = 'migrate_from_chat_id'
- if 'pinned_message' in obj:
- opts['pinned_message'] = Message.de_json(obj['pinned_message'])
- content_type = 'pinned_message'
- if 'invoice' in obj:
- opts['invoice'] = Invoice.de_json(obj['invoice'])
- content_type = 'invoice'
- if 'successful_payment' in obj:
- opts['successful_payment'] = SuccessfulPayment.de_json(obj['successful_payment'])
- content_type = 'successful_payment'
- if 'connected_website' in obj:
- opts['connected_website'] = obj['connected_website']
- content_type = 'connected_website'
- return cls(message_id, from_user, date, chat, content_type, opts, json_string)
+ :param inline_query: Optional. New incoming inline query
+ :type inline_query: :class:`telebot.types.InlineQuery`
- @classmethod
- def parse_chat(cls, chat):
- if 'first_name' not in chat:
- return GroupChat.de_json(chat)
- else:
- return User.de_json(chat)
+ :param chosen_inline_result: Optional. The result of an inline query that was chosen by a user and sent to their chat
+ partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your
+ bot.
+ :type chosen_inline_result: :class:`telebot.types.ChosenInlineResult`
- @classmethod
- def parse_photo(cls, photo_size_array):
- ret = []
- for ps in photo_size_array:
- ret.append(PhotoSize.de_json(ps))
- return ret
+ :param callback_query: Optional. New incoming callback query
+ :type callback_query: :class:`telebot.types.CallbackQuery`
- @classmethod
- def parse_entities(cls, message_entity_array):
- ret = []
- for me in message_entity_array:
- ret.append(MessageEntity.de_json(me))
- return ret
+ :param shipping_query: Optional. New incoming shipping query. Only for invoices with flexible price
+ :type shipping_query: :class:`telebot.types.ShippingQuery`
- def __init__(self, message_id, from_user, date, chat, content_type, options, json_string):
- self.content_type = content_type
- self.message_id = message_id
- self.from_user = from_user
- self.date = date
- self.chat = chat
- self.forward_from_chat = None
- self.forward_from = None
- self.forward_date = None
- self.reply_to_message = None
- self.edit_date = None
- self.media_group_id = None
- self.author_signature = None
- self.text = None
- self.entities = None
- self.caption_entities = None
- self.audio = None
- self.document = None
- self.photo = None
- self.sticker = None
- self.video = None
- self.video_note = None
- self.voice = None
- self.caption = None
- self.contact = None
- self.location = None
- self.venue = None
- self.new_chat_member = None
- self.new_chat_members = None
- self.left_chat_member = None
- self.new_chat_title = None
- self.new_chat_photo = None
- self.delete_chat_photo = None
- self.group_chat_created = None
- self.supergroup_chat_created = None
- self.channel_chat_created = None
- self.migrate_to_chat_id = None
- self.migrate_from_chat_id = None
- self.pinned_message = None
- self.invoice = None
- self.successful_payment = None
- self.connected_website = None
- for key in options:
- setattr(self, key, options[key])
- self.json = json_string
+ :param pre_checkout_query: Optional. New incoming pre-checkout query. Contains full information about
+ checkout
+ :type pre_checkout_query: :class:`telebot.types.PreCheckoutQuery`
- def __html_text(self, text, entities):
- """
- Author: @sviat9440
- Message: "*Test* parse _formatting_, [url](https://example.com), [text_mention](tg://user?id=123456) and mention @username"
+ :purchased_paid_media: Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat
+ :type purchased_paid_media: :class:`telebot.types.PaidMediaPurchased`
- Example:
- message.html_text
- >> "Test parse formatting, url, text_mention and mention @username"
+ :param poll: Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the
+ bot
+ :type poll: :class:`telebot.types.Poll`
- Cusom subs:
- You can customize the substitutes. By default, there is no substitute for the entities: hashtag, bot_command, email. You can add or modify substitute an existing entity.
- Example:
- message.custom_subs = {"bold": "{text}", "italic": "{text}", "mention": "{text}"}
- message.html_text
- >> "Test parse formatting, url and text_mention and mention @username"
- """
+ :param poll_answer: Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in
+ polls that were sent by the bot itself.
+ :type poll_answer: :class:`telebot.types.PollAnswer`
- if not entities:
- return text
- _subs = {
- "bold" : "{text}",
- "italic" : "{text}",
- "pre" : "
{text}
",
- "code" : "{text}",
- "url" : "{text}",
- "text_link": "{text}"
- }
- if hasattr(self, "custom_subs"):
- for type in self.custom_subs:
- _subs[type] = self.custom_subs[type]
- utf16_text = text.encode("utf-16-le")
- html_text = ""
-
- def func(text, type=None, url=None, user=None):
- text = text.decode("utf-16-le")
- if type == "text_mention":
- type = "url"
- url = "tg://user?id={0}".format(user.id)
- elif type == "mention":
- url = "https://t.me/{0}".format(text[1:])
- if not type or not _subs.get(type):
- return text
- subs = _subs.get(type)
- text = text.replace("&", "&").replace("<", "<").replace(">", ">")
- return subs.format(text=text, url=url)
-
- offset = 0
- for entity in entities:
- if entity.offset > offset:
- html_text += func(utf16_text[offset * 2 : entity.offset * 2])
- offset = entity.offset
- html_text += func(utf16_text[offset * 2 : (offset + entity.length) * 2], entity.type, entity.url, entity.user)
- offset += entity.length
- if offset * 2 < len(utf16_text):
- html_text += func(utf16_text[offset * 2:])
- return html_text
+ :param my_chat_member: Optional. The bot's chat member status was updated in a chat. For private chats, this update
+ is received only when the bot is blocked or unblocked by the user.
+ :type my_chat_member: :class:`telebot.types.ChatMemberUpdated`
- @property
- def html_text(self):
- return self.__html_text(self.text, self.entities)
+ :param chat_member: Optional. A chat member's status was updated in a chat. The bot must be an administrator in the
+ chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates.
+ :type chat_member: :class:`telebot.types.ChatMemberUpdated`
- @property
- def html_caption(self):
- return self.__html_text(self.caption, self.caption_entities)
+ :param chat_join_request: Optional. A request to join the chat has been sent. The bot must have the
+ can_invite_users administrator right in the chat to receive these updates.
+ :type chat_join_request: :class:`telebot.types.ChatJoinRequest`
+ :param chat_boost: Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.
+ :type chat_boost: :class:`telebot.types.ChatBoostUpdated`
-class MessageEntity(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- type = obj['type']
- offset = obj['offset']
- length = obj['length']
- url = obj.get('url')
- user = None
- if 'user' in obj:
- user = User.de_json(obj['user'])
- return cls(type, offset, length, url, user)
+ :param removed_chat_boost: Optional. A chat boost was removed. The bot must be an administrator in the chat to receive these updates.
+ :type removed_chat_boost: :class:`telebot.types.RemovedChatBoost`
- def __init__(self, type, offset, length, url=None, user=None):
- self.type = type
- self.offset = offset
- self.length = length
- self.url = url
- self.user = user
+ :param business_connection: Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot
+ :type business_connection: :class:`telebot.types.BusinessConnection`
+ :param business_message: Optional. New non-service message from a connected business account
+ :type business_message: :class:`telebot.types.Message`
-class PhotoSize(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- file_id = obj['file_id']
- width = obj['width']
- height = obj['height']
- file_size = obj.get('file_size')
- return cls(file_id, width, height, file_size)
+ :param edited_business_message: Optional. New version of a non-service message from a connected business account that is known to the bot and was edited
+ :type edited_business_message: :class:`telebot.types.Message`
- def __init__(self, file_id, width, height, file_size=None):
- self.file_size = file_size
- self.height = height
- self.width = width
- self.file_id = file_id
+ :param deleted_business_messages: Optional. Service message: the chat connected to the business account was deleted
+ :type deleted_business_messages: :class:`telebot.types.BusinessMessagesDeleted`
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Update`
-class Audio(JsonDeserializable):
+ """
@classmethod
def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- file_id = obj['file_id']
- duration = obj['duration']
- performer = obj.get('performer')
- title = obj.get('title')
- mime_type = obj.get('mime_type')
- file_size = obj.get('file_size')
- return cls(file_id, duration, performer, title, mime_type, file_size)
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ update_id = obj['update_id']
+ message = Message.de_json(obj.get('message'))
+ edited_message = Message.de_json(obj.get('edited_message'))
+ channel_post = Message.de_json(obj.get('channel_post'))
+ edited_channel_post = Message.de_json(obj.get('edited_channel_post'))
+ inline_query = InlineQuery.de_json(obj.get('inline_query'))
+ chosen_inline_result = ChosenInlineResult.de_json(obj.get('chosen_inline_result'))
+ callback_query = CallbackQuery.de_json(obj.get('callback_query'))
+ shipping_query = ShippingQuery.de_json(obj.get('shipping_query'))
+ pre_checkout_query = PreCheckoutQuery.de_json(obj.get('pre_checkout_query'))
+ poll = Poll.de_json(obj.get('poll'))
+ poll_answer = PollAnswer.de_json(obj.get('poll_answer'))
+ my_chat_member = ChatMemberUpdated.de_json(obj.get('my_chat_member'))
+ chat_member = ChatMemberUpdated.de_json(obj.get('chat_member'))
+ chat_join_request = ChatJoinRequest.de_json(obj.get('chat_join_request'))
+ message_reaction = MessageReactionUpdated.de_json(obj.get('message_reaction'))
+ message_reaction_count = MessageReactionCountUpdated.de_json(obj.get('message_reaction_count'))
+ removed_chat_boost = ChatBoostRemoved.de_json(obj.get('removed_chat_boost'))
+ chat_boost = ChatBoostUpdated.de_json(obj.get('chat_boost'))
+ business_connection = BusinessConnection.de_json(obj.get('business_connection'))
+ business_message = Message.de_json(obj.get('business_message'))
+ edited_business_message = Message.de_json(obj.get('edited_business_message'))
+ deleted_business_messages = BusinessMessagesDeleted.de_json(obj.get('deleted_business_messages'))
+ purchased_paid_media = PaidMediaPurchased.de_json(obj.get('purchased_paid_media'))
- def __init__(self, file_id, duration, performer=None, title=None, mime_type=None, file_size=None):
- self.file_id = file_id
- self.duration = duration
- self.performer = performer
- self.title = title
- self.mime_type = mime_type
- self.file_size = file_size
+ return cls(update_id, message, edited_message, channel_post, edited_channel_post, inline_query,
+ chosen_inline_result, callback_query, shipping_query, pre_checkout_query, poll, poll_answer,
+ my_chat_member, chat_member, chat_join_request, message_reaction, message_reaction_count,
+ removed_chat_boost, chat_boost, business_connection, business_message, edited_business_message,
+ deleted_business_messages, purchased_paid_media)
+ def __init__(self, update_id, message, edited_message, channel_post, edited_channel_post, inline_query,
+ chosen_inline_result, callback_query, shipping_query, pre_checkout_query, poll, poll_answer,
+ my_chat_member, chat_member, chat_join_request, message_reaction, message_reaction_count,
+ removed_chat_boost, chat_boost, business_connection, business_message, edited_business_message,
+ deleted_business_messages, purchased_paid_media):
+ self.update_id: int = update_id
+ self.message: Optional[Message] = message
+ self.edited_message: Optional[Message] = edited_message
+ self.channel_post: Optional[Message] = channel_post
+ self.edited_channel_post: Optional[Message] = edited_channel_post
+ self.inline_query: Optional[InlineQuery] = inline_query
+ self.chosen_inline_result: Optional[ChosenInlineResult] = chosen_inline_result
+ self.callback_query: Optional[CallbackQuery] = callback_query
+ self.shipping_query: Optional[ShippingQuery] = shipping_query
+ self.pre_checkout_query: Optional[PreCheckoutQuery] = pre_checkout_query
+ self.poll: Optional[Poll] = poll
+ self.poll_answer: Optional[PollAnswer] = poll_answer
+ self.my_chat_member: Optional[ChatMemberUpdated] = my_chat_member
+ self.chat_member: Optional[ChatMemberUpdated] = chat_member
+ self.chat_join_request: Optional[ChatJoinRequest] = chat_join_request
+ self.message_reaction: Optional[MessageReactionUpdated] = message_reaction
+ self.message_reaction_count: Optional[MessageReactionCountUpdated] = message_reaction_count
+ self.removed_chat_boost: Optional[ChatBoostRemoved] = removed_chat_boost
+ self.chat_boost: Optional[ChatBoostUpdated] = chat_boost
+ self.business_connection: Optional[BusinessConnection] = business_connection
+ self.business_message: Optional[Message] = business_message
+ self.edited_business_message: Optional[Message] = edited_business_message
+ self.deleted_business_messages: Optional[BusinessMessagesDeleted] = deleted_business_messages
+ self.purchased_paid_media: Optional[PaidMediaPurchased] = purchased_paid_media
+
+
+class ChatMemberUpdated(JsonDeserializable):
+ """
+ This object represents changes in the status of a chat member.
-class Voice(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- file_id = obj['file_id']
- duration = obj['duration']
- mime_type = obj.get('mime_type')
- file_size = obj.get('file_size')
- return cls(file_id, duration, mime_type, file_size)
+ Telegram Documentation: https://core.telegram.org/bots/api#chatmemberupdated
- def __init__(self, file_id, duration, mime_type=None, file_size=None):
- self.file_id = file_id
- self.duration = duration
- self.mime_type = mime_type
- self.file_size = file_size
+ :param chat: Chat the user belongs to
+ :type chat: :class:`telebot.types.Chat`
+ :param from_user: Performer of the action, which resulted in the change
+ :type from_user: :class:`telebot.types.User`
-class Document(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- file_id = obj['file_id']
- thumb = None
- if 'thumb' in obj and 'file_id' in obj['thumb']:
- thumb = PhotoSize.de_json(obj['thumb'])
- file_name = obj.get('file_name')
- mime_type = obj.get('mime_type')
- file_size = obj.get('file_size')
- return cls(file_id, thumb, file_name, mime_type, file_size)
+ :param date: Date the change was done in Unix time
+ :type date: :obj:`int`
- def __init__(self, file_id, thumb=None, file_name=None, mime_type=None, file_size=None):
- self.file_id = file_id
- self.thumb = thumb
- self.file_name = file_name
- self.mime_type = mime_type
- self.file_size = file_size
+ :param old_chat_member: Previous information about the chat member
+ :type old_chat_member: :class:`telebot.types.ChatMember`
+ :param new_chat_member: New information about the chat member
+ :type new_chat_member: :class:`telebot.types.ChatMember`
-class Video(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- file_id = obj['file_id']
- width = obj['width']
- height = obj['height']
- duration = obj['duration']
- thumb = None
- if 'thumb' in obj:
- thumb = PhotoSize.de_json(obj['thumb'])
- mime_type = obj.get('mime_type')
- file_size = obj.get('file_size')
- return cls(file_id, width, height, duration, thumb, mime_type, file_size)
+ :param invite_link: Optional. Chat invite link, which was used by the user to join the chat; for joining by invite
+ link events only.
+ :type invite_link: :class:`telebot.types.ChatInviteLink`
- def __init__(self, file_id, width, height, duration, thumb=None, mime_type=None, file_size=None):
- self.file_id = file_id
- self.width = width
- self.height = height
- self.duration = duration
- self.thumb = thumb
- self.mime_type = mime_type
- self.file_size = file_size
+ :param via_join_request: Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator
+ :type via_join_request: :obj:`bool`
+ :param via_chat_folder_invite_link: Optional. True, if the user joined the chat via a chat folder invite link
+ :type via_chat_folder_invite_link: :obj:`bool`
-class VideoNote(JsonDeserializable):
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatMemberUpdated`
+ """
@classmethod
def de_json(cls, json_string):
+ if json_string is None: return None
obj = cls.check_json(json_string)
- file_id = obj['file_id']
- length = obj['length']
- duration = obj['duration']
- thumb = None
- if 'thumb' in obj:
- thumb = PhotoSize.de_json(obj['thumb'])
- file_size = obj.get('file_size')
- return cls(file_id, length, duration, thumb, file_size)
+ obj['chat'] = Chat.de_json(obj['chat'])
+ obj['from_user'] = User.de_json(obj.pop('from'))
+ obj['old_chat_member'] = ChatMember.de_json(obj['old_chat_member'])
+ obj['new_chat_member'] = ChatMember.de_json(obj['new_chat_member'])
+ obj['invite_link'] = ChatInviteLink.de_json(obj.get('invite_link'))
+ return cls(**obj)
+
+ def __init__(self, chat, from_user, date, old_chat_member, new_chat_member, invite_link=None,
+ via_join_request=None, via_chat_folder_invite_link=None,
+ **kwargs):
+ self.chat: Chat = chat
+ self.from_user: User = from_user
+ self.date: int = date
+ self.old_chat_member: ChatMember = old_chat_member
+ self.new_chat_member: ChatMember = new_chat_member
+ self.invite_link: Optional[ChatInviteLink] = invite_link
+ self.via_join_request: Optional[bool] = via_join_request
+ self.via_chat_folder_invite_link: Optional[bool] = via_chat_folder_invite_link
- def __init__(self, file_id, length, duration, thumb=None, file_size=None):
- self.file_id = file_id
- self.length = length
- self.duration = duration
- self.thumb = thumb
- self.file_size = file_size
+ @property
+ def difference(self) -> Dict[str, List]:
+ """
+ Get the difference between `old_chat_member` and `new_chat_member`
+ as a dict in the following format {'parameter': [old_value, new_value]}
+ E.g {'status': ['member', 'kicked'], 'until_date': [None, 1625055092]}
-class Contact(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- phone_number = obj['phone_number']
- first_name = obj['first_name']
- last_name = obj.get('last_name')
- user_id = obj.get('user_id')
- return cls(phone_number, first_name, last_name, user_id)
+ :return: Dict of differences
+ :rtype: Dict[str, List]
+ """
+ old: Dict = self.old_chat_member.__dict__
+ new: Dict = self.new_chat_member.__dict__
+ dif = {}
+ for key in new:
+ if key == 'user': continue
+ if new[key] != old[key]:
+ dif[key] = [old[key], new[key]]
+ return dif
- def __init__(self, phone_number, first_name, last_name=None, user_id=None):
- self.phone_number = phone_number
- self.first_name = first_name
- self.last_name = last_name
- self.user_id = user_id
+class ChatJoinRequest(JsonDeserializable):
+ """
+ Represents a join request sent to a chat.
-class Location(JsonDeserializable):
- @classmethod
- def de_json(cls, json_string):
- obj = cls.check_json(json_string)
- longitude = obj['longitude']
- latitude = obj['latitude']
- return cls(longitude, latitude)
+ Telegram Documentation: https://core.telegram.org/bots/api#chatjoinrequest
- def __init__(self, longitude, latitude):
- self.longitude = longitude
- self.latitude = latitude
+ :param chat: Chat to which the request was sent
+ :type chat: :class:`telebot.types.Chat`
+ :param from_user: User that sent the join request
+ :type from_user: :class:`telebot.types.User`
-class Venue(JsonDeserializable):
- @classmethod
- def de_json(cls, json_type):
- obj = cls.check_json(json_type)
- location = Location.de_json(obj['location'])
- title = obj['title']
- address = obj['address']
- foursquare_id = obj.get('foursquare_id')
- return cls(location, title, address, foursquare_id)
+ :param user_chat_id: Optional. Identifier of a private chat with the user who sent the join request.
+ This number may have more than 32 significant bits and some programming languages may have difficulty/silent
+ defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision
+ float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages
+ until the join request is processed, assuming no other administrator contacted the user.
+ :type user_chat_id: :obj:`int`
- def __init__(self, location, title, address, foursquare_id=None):
- self.location = location
- self.title = title
- self.address = address
- self.foursquare_id = foursquare_id
+ :param date: Date the request was sent in Unix time
+ :type date: :obj:`int`
+ :param bio: Optional. Bio of the user.
+ :type bio: :obj:`str`
-class UserProfilePhotos(JsonDeserializable):
+ :param invite_link: Optional. Chat invite link that was used by the user to send the join request
+ :type invite_link: :class:`telebot.types.ChatInviteLink`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatJoinRequest`
+ """
@classmethod
def de_json(cls, json_string):
+ if json_string is None: return None
obj = cls.check_json(json_string)
- total_count = obj['total_count']
- photos = [[PhotoSize.de_json(y) for y in x] for x in obj['photos']]
- return cls(total_count, photos)
+ obj['chat'] = Chat.de_json(obj['chat'])
+ obj['from_user'] = User.de_json(obj['from'])
+ obj['invite_link'] = ChatInviteLink.de_json(obj.get('invite_link'))
+ return cls(**obj)
- def __init__(self, total_count, photos):
- self.total_count = total_count
- self.photos = photos
+ def __init__(self, chat, from_user, user_chat_id, date, bio=None, invite_link=None, **kwargs):
+ self.chat: Chat = chat
+ self.from_user: User = from_user
+ self.date: str = date
+ self.bio: Optional[str] = bio
+ self.invite_link: Optional[ChatInviteLink] = invite_link
+ self.user_chat_id: int = user_chat_id
-class File(JsonDeserializable):
- @classmethod
- def de_json(cls, json_type):
- obj = cls.check_json(json_type)
- file_id = obj['file_id']
- file_size = obj.get('file_size')
- file_path = obj.get('file_path')
- return cls(file_id, file_size, file_path)
+class WebhookInfo(JsonDeserializable):
+ """
+ Describes the current status of a webhook.
- def __init__(self, file_id, file_size, file_path):
- self.file_id = file_id
- self.file_size = file_size
- self.file_path = file_path
+ Telegram Documentation: https://core.telegram.org/bots/api#webhookinfo
+ :param url: Webhook URL, may be empty if webhook is not set up
+ :type url: :obj:`str`
-class ForceReply(JsonSerializable):
- def __init__(self, selective=None):
- self.selective = selective
+ :param has_custom_certificate: True, if a custom certificate was provided for webhook certificate checks
+ :type has_custom_certificate: :obj:`bool`
- def to_json(self):
- json_dict = {'force_reply': True}
- if self.selective:
- json_dict['selective'] = True
- return json.dumps(json_dict)
+ :param pending_update_count: Number of updates awaiting delivery
+ :type pending_update_count: :obj:`int`
+ :param ip_address: Optional. Currently used webhook IP address
+ :type ip_address: :obj:`str`
-class ReplyKeyboardRemove(JsonSerializable):
- def __init__(self, selective=None):
- self.selective = selective
+ :param last_error_date: Optional. Unix time for the most recent error that happened when trying to deliver an
+ update via webhook
+ :type last_error_date: :obj:`int`
- def to_json(self):
- json_dict = {'remove_keyboard': True}
- if self.selective:
- json_dict['selective'] = True
- return json.dumps(json_dict)
+ :param last_error_message: Optional. Error message in human-readable format for the most recent error that
+ happened when trying to deliver an update via webhook
+ :type last_error_message: :obj:`str`
+ :param last_synchronization_error_date: Optional. Unix time of the most recent error that happened when trying
+ to synchronize available updates with Telegram datacenters
+ :type last_synchronization_error_date: :obj:`int`
-class ReplyKeyboardMarkup(JsonSerializable):
- def __init__(self, resize_keyboard=None, one_time_keyboard=None, selective=None, row_width=3):
- self.resize_keyboard = resize_keyboard
- self.one_time_keyboard = one_time_keyboard
- self.selective = selective
- self.row_width = row_width
+ :param max_connections: Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook
+ for update delivery
+ :type max_connections: :obj:`int`
- self.keyboard = []
+ :param allowed_updates: Optional. A list of update types the bot is subscribed to. Defaults to all update types
+ except chat_member
+ :type allowed_updates: :obj:`list` of :obj:`str`
- def add(self, *args):
- """
- This function adds strings to the keyboard, while not exceeding row_width.
- E.g. ReplyKeyboardMarkup#add("A", "B", "C") yields the json result {keyboard: [["A"], ["B"], ["C"]]}
- when row_width is set to 1.
- When row_width is set to 2, the following is the result of this function: {keyboard: [["A", "B"], ["C"]]}
- See https://core.telegram.org/bots/api#replykeyboardmarkup
- :param args: KeyboardButton to append to the keyboard
- """
- i = 1
- row = []
- for button in args:
- if util.is_string(button):
- row.append({'text': button})
- elif isinstance(button, bytes):
- row.append({'text': button.decode('utf-8')})
- else:
- row.append(button.to_dic())
- if i % self.row_width == 0:
- self.keyboard.append(row)
- row = []
- i += 1
- if len(row) > 0:
- self.keyboard.append(row)
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.WebhookInfo`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, url, has_custom_certificate, pending_update_count, ip_address=None,
+ last_error_date=None, last_error_message=None, last_synchronization_error_date=None,
+ max_connections=None, allowed_updates=None, **kwargs):
+ self.url: str = url
+ self.has_custom_certificate: bool = has_custom_certificate
+ self.pending_update_count: int = pending_update_count
+ self.ip_address: Optional[str] = ip_address
+ self.last_error_date: Optional[int] = last_error_date
+ self.last_error_message: Optional[str] = last_error_message
+ self.last_synchronization_error_date: Optional[int] = last_synchronization_error_date
+ self.max_connections: Optional[int] = max_connections
+ self.allowed_updates: Optional[int] = allowed_updates
+
+
+class User(JsonDeserializable, Dictionaryable, JsonSerializable):
+ """
+ This object represents a Telegram user or bot.
- def row(self, *args):
- """
- Adds a list of KeyboardButton to the keyboard. This function does not consider row_width.
- ReplyKeyboardMarkup#row("A")#row("B", "C")#to_json() outputs '{keyboard: [["A"], ["B", "C"]]}'
- See https://core.telegram.org/bots/api#replykeyboardmarkup
- :param args: strings
- :return: self, to allow function chaining.
- """
- btn_array = []
- for button in args:
- if util.is_string(button):
- btn_array.append({'text': button})
- else:
- btn_array.append(button.to_dic())
- self.keyboard.append(btn_array)
- return self
+ Telegram Documentation: https://core.telegram.org/bots/api#user
- def to_json(self):
- """
- Converts this object to its json representation following the Telegram API guidelines described here:
- https://core.telegram.org/bots/api#replykeyboardmarkup
- :return:
- """
- json_dict = {'keyboard': self.keyboard}
- if self.one_time_keyboard:
- json_dict['one_time_keyboard'] = True
+ :param id: Unique identifier for this user or bot. This number may have more than 32 significant bits and some
+ programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant
+ bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
+ :type id: :obj:`int`
- if self.resize_keyboard:
- json_dict['resize_keyboard'] = True
+ :param is_bot: True, if this user is a bot
+ :type is_bot: :obj:`bool`
- if self.selective:
- json_dict['selective'] = True
+ :param first_name: User's or bot's first name
+ :type first_name: :obj:`str`
- return json.dumps(json_dict)
+ :param last_name: Optional. User's or bot's last name
+ :type last_name: :obj:`str`
+ :param username: Optional. User's or bot's username
+ :type username: :obj:`str`
-class KeyboardButton(Dictionaryable, JsonSerializable):
- def __init__(self, text, request_contact=None, request_location=None):
- self.text = text
- self.request_contact = request_contact
- self.request_location = request_location
+ :param language_code: Optional. IETF language tag of the user's language
+ :type language_code: :obj:`str`
- def to_json(self):
- return json.dumps(self.to_dic())
+ :param is_premium: Optional. :obj:`bool`, if this user is a Telegram Premium user
+ :type is_premium: :obj:`bool`
- def to_dic(self):
- json_dic = {'text': self.text}
- if self.request_contact:
- json_dic['request_contact'] = self.request_contact
- if self.request_location:
- json_dic['request_location'] = self.request_location
- return json_dic
+ :param added_to_attachment_menu: Optional. :obj:`bool`, if this user added the bot to the attachment menu
+ :type added_to_attachment_menu: :obj:`bool`
+ :param can_join_groups: Optional. True, if the bot can be invited to groups. Returned only in getMe.
+ :type can_join_groups: :obj:`bool`
-class InlineKeyboardMarkup(Dictionaryable, JsonSerializable):
- def __init__(self, row_width=3):
- self.row_width = row_width
+ :param can_read_all_group_messages: Optional. True, if privacy mode is disabled for the bot. Returned only in
+ getMe.
+ :type can_read_all_group_messages: :obj:`bool`
- self.keyboard = []
+ :param supports_inline_queries: Optional. True, if the bot supports inline queries. Returned only in getMe.
+ :type supports_inline_queries: :obj:`bool`
- def add(self, *args):
- """
- This function adds strings to the keyboard, while not exceeding row_width.
- E.g. ReplyKeyboardMarkup#add("A", "B", "C") yields the json result {keyboard: [["A"], ["B"], ["C"]]}
- when row_width is set to 1.
- When row_width is set to 2, the following is the result of this function: {keyboard: [["A", "B"], ["C"]]}
- See https://core.telegram.org/bots/api#replykeyboardmarkup
- :param args: KeyboardButton to append to the keyboard
+ :param can_connect_to_business: Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.
+ :type can_connect_to_business: :obj:`bool`
+
+ :param has_main_web_app: Optional. True, if the bot has a main Web App. Returned only in getMe.
+ :type has_main_web_app: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.User`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ # noinspection PyShadowingBuiltins
+ def __init__(self, id, is_bot, first_name, last_name=None, username=None, language_code=None,
+ can_join_groups=None, can_read_all_group_messages=None, supports_inline_queries=None,
+ is_premium=None, added_to_attachment_menu=None, can_connect_to_business=None,
+ has_main_web_app=None, **kwargs):
+ self.id: int = id
+ self.is_bot: bool = is_bot
+ self.first_name: str = first_name
+ self.username: Optional[str] = username
+ self.last_name: Optional[str] = last_name
+ self.language_code: Optional[str] = language_code
+ self.can_join_groups: Optional[bool] = can_join_groups
+ self.can_read_all_group_messages: Optional[bool] = can_read_all_group_messages
+ self.supports_inline_queries: Optional[bool] = supports_inline_queries
+ self.is_premium: Optional[bool] = is_premium
+ self.added_to_attachment_menu: Optional[bool] = added_to_attachment_menu
+ self.can_connect_to_business: Optional[bool] = can_connect_to_business
+ self.has_main_web_app: Optional[bool] = has_main_web_app
+
+ @property
+ def full_name(self) -> str:
+ """
+ :return: User's full name
+ """
+ full_name = self.first_name
+ if self.last_name:
+ full_name += ' {0}'.format(self.last_name)
+ return full_name
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ return {'id': self.id,
+ 'is_bot': self.is_bot,
+ 'first_name': self.first_name,
+ 'last_name': self.last_name,
+ 'username': self.username,
+ 'language_code': self.language_code,
+ 'can_join_groups': self.can_join_groups,
+ 'can_read_all_group_messages': self.can_read_all_group_messages,
+ 'supports_inline_queries': self.supports_inline_queries,
+ 'is_premium': self.is_premium,
+ 'added_to_attachment_menu': self.added_to_attachment_menu,
+ 'can_connect_to_business': self.can_connect_to_business,
+ 'has_main_web_app': self.has_main_web_app}
+
+
+# noinspection PyShadowingBuiltins
+class GroupChat(JsonDeserializable):
+ """
+ :meta private:
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, id, title, **kwargs):
+ self.id: int = id
+ self.title: str = title
+
+
+# noinspection PyShadowingBuiltins
+class ChatFullInfo(JsonDeserializable):
+ """
+ This object represents a chat.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#chat
+
+ :param id: Unique identifier for this chat. This number may have more than 32 significant bits and some programming
+ languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed
+ 64-bit integer or double-precision float type are safe for storing this identifier.
+ :type id: :obj:`int`
+
+ :param type: Type of chat, can be either “private”, “group”, “supergroup” or “channel”
+ :type type: :obj:`str`
+
+ :param title: Optional. Title, for supergroups, channels and group chats
+ :type title: :obj:`str`
+
+ :param username: Optional. Username, for private chats, supergroups and channels if available
+ :type username: :obj:`str`
+
+ :param first_name: Optional. First name of the other party in a private chat
+ :type first_name: :obj:`str`
+
+ :param last_name: Optional. Last name of the other party in a private chat
+ :type last_name: :obj:`str`
+
+ :param is_forum: Optional. True, if the supergroup chat is a forum (has topics enabled)
+ :type is_forum: :obj:`bool`
+
+ :param is_direct_messages: Optional. True, if the chat is the direct messages chat of a channel
+ :type is_direct_messages: :obj:`bool`
+
+ :param max_reaction_count: Optional. The maximum number of reactions that can be set on a message in the chat
+ :type max_reaction_count: :obj:`int`
+
+ :param photo: Optional. Chat photo. Returned only in getChat.
+ :type photo: :class:`telebot.types.ChatPhoto`
+
+ :param active_usernames: Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.
+ :type active_usernames: :obj:`list` of :obj:`str`
+
+ :param birthdate: Optional. Birthdate of the other party in a private chat. Returned only in getChat.
+ :type birthdate: :obj:`str`
+
+ :param business_intro: Optional. Business intro for the chat. Returned only in getChat.
+ :type business_intro: :class:`telebot.types.BusinessIntro`
+
+ :param business_location: Optional. Business location for the chat. Returned only in getChat.
+ :type business_location: :class:`telebot.types.BusinessLocation`
+
+ :param business_opening_hours : Optional. Business opening hours for the chat. Returned only in getChat.
+ :type business_opening_hours: :class:`telebot.types.BusinessHours`
+
+ :param personal_chat: Optional. For private chats, the personal channel of the user. Returned only in getChat.
+ :type personal_chat: :class:`telebot.types.Chat`
+
+ :param parent_chat: Optional. Information about the corresponding channel chat; for direct messages chats only
+ :type parent_chat: :class:`telebot.types.Chat`
+
+ :param available_reactions: Optional. List of available chat reactions; for private chats, supergroups and channels. Returned only in getChat.
+ :type available_reactions: :obj:`list` of :class:`telebot.types.ReactionType`
+
+ :param accent_color_id: Optional. Optional. Identifier of the accent color for the chat name and backgrounds of the chat photo,
+ reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat.
+ :type accent_color_id: :obj:`int`
+
+ :param background_custom_emoji_id: Optional. Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat.
+ :type background_custom_emoji_id: :obj:`str`
+
+ :param profile_accent_color_id: Optional. Identifier of the accent color for the chat's profile background. See profile accent colors for more details. Returned only in getChat.
+ :type profile_accent_color_id: :obj:`int`
+
+ :param profile_background_custom_emoji_id: Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat.
+ :type profile_background_custom_emoji_id: :obj:`str`
+
+ :param emoji_status_custom_emoji_id: Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.
+ :type emoji_status_custom_emoji_id: :obj:`str`
+
+ :param emoji_status_expiration_date: Optional. Expiration date of the emoji status of the other party in a private chat, if any. Returned only in getChat.
+ :type emoji_status_expiration_date: :obj:`int`
+
+ :param bio: Optional. Bio of the other party in a private chat. Returned only in getChat.
+ :type bio: :obj:`str`
+
+ :param has_private_forwards: Optional. :obj:`bool`, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat.
+ :type has_private_forwards: :obj:`bool`
+
+ :param has_restricted_voice_and_video_messages: Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.
+ :type :obj:`bool`
+
+ :param join_to_send_messages: Optional. :obj:`bool`, if users need to join the supergroup before they can send messages. Returned only in getChat.
+ :type join_to_send_messages: :obj:`bool`
+
+ :param join_by_request: Optional. :obj:`bool`, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
+ :type join_by_request: :obj:`bool`
+
+ :param description: Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
+ :type description: :obj:`str`
+
+ :param invite_link: Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
+ :type invite_link: :obj:`str`
+
+ :param pinned_message: Optional. The most recent pinned message (by sending date). Returned only in getChat.
+ :type pinned_message: :class:`telebot.types.Message`
+
+ :param permissions: Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
+ :type permissions: :class:`telebot.types.ChatPermissions`
+
+ :param can_send_gift: deprecated, use accepted_gift_types instead.
+ :type can_send_gift: :obj:`bool`
+
+ :param accepted_gift_types: Information about types of gifts that are accepted by the chat or by the corresponding user for private chats
+ :type accepted_gift_types: :class:`telebot.types.AcceptedGiftTypes`
+
+ :param can_send_paid_media: Optional. True, if paid media messages can be sent or forwarded to the channel chat.
+ The field is available only for channel chats.
+ :type can_send_paid_media: :obj:`bool`
+
+ :param slow_mode_delay: Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.
+ :type slow_mode_delay: :obj:`int`
+
+ :param unrestrict_boost_count: Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions. Returned only in getChat.
+ :type unrestrict_boost_count: :obj:`int`
+
+ :param message_auto_delete_time: Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
+ :type message_auto_delete_time: :obj:`int`
+
+ :param has_aggressive_anti_spam_enabled: Optional. :obj:`bool`, if the chat has enabled aggressive anti-spam protection. Returned only in getChat.
+ :type has_aggressive_anti_spam_enabled: :obj:`bool`
+
+ :param has_hidden_members: Optional. :obj:`bool`, if the chat has enabled hidden members. Returned only in getChat.
+ :type has_hidden_members: :obj:`bool`
+
+ :param has_protected_content: Optional. :obj:`bool`, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
+ :type has_protected_content: :obj:`bool`
+
+ :param has_visible_history: Optional. True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat.
+ :type has_visible_history: :obj:`bool`
+
+ :param sticker_set_name: Optional. For supergroups, name of group sticker set. Returned only in getChat.
+ :type sticker_set_name: :obj:`str`
+
+ :param can_set_sticker_set: Optional. :obj:`bool`, if the bot can change the group sticker set. Returned only in getChat.
+ :type can_set_sticker_set: :obj:`bool`
+
+ :param custom_emoji_sticker_set_name: Optional. For supergroups, the name of the group's custom emoji sticker set.
+ Custom emoji from this set can be used by all users and bots in the group. Returned only in getChat.
+ :param custom_emoji_sticker_set_name: :obj:`str`
+
+ :param linked_chat_id: Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for
+ a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some
+ programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a
+ signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.
+ :type linked_chat_id: :obj:`int`
+
+ :param location: Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
+ :type location: :class:`telebot.types.ChatLocation`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatFullInfo`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if 'photo' in obj:
+ obj['photo'] = ChatPhoto.de_json(obj['photo'])
+ if 'pinned_message' in obj:
+ obj['pinned_message'] = Message.de_json(obj['pinned_message'])
+ if 'permissions' in obj:
+ obj['permissions'] = ChatPermissions.de_json(obj['permissions'])
+ if 'location' in obj:
+ obj['location'] = ChatLocation.de_json(obj['location'])
+ if 'available_reactions' in obj:
+ obj['available_reactions'] = [ReactionType(reaction) for reaction in obj['available_reactions']]
+ if 'business_intro' in obj:
+ obj['business_intro'] = BusinessIntro.de_json(obj['business_intro'])
+ if 'business_location' in obj:
+ obj['business_location'] = BusinessLocation.de_json(obj['business_location'])
+ if 'business_opening_hours' in obj:
+ obj['business_opening_hours'] = BusinessOpeningHours.de_json(obj['business_opening_hours'])
+ if 'personal_chat' in obj:
+ obj['personal_chat'] = Chat.de_json(obj['personal_chat'])
+ if 'birthdate' in obj:
+ obj['birthdate'] = Birthdate.de_json(obj['birthdate'])
+ if 'accepted_gift_types' in obj:
+ obj['accepted_gift_types'] = AcceptedGiftTypes.de_json(obj['accepted_gift_types'])
+ if 'parent_chat' in obj:
+ obj['parent_chat'] = Chat.de_json(obj['parent_chat'])
+ return cls(**obj)
+
+ def __init__(self, id, type, title=None, username=None, first_name=None,
+ last_name=None, photo=None, bio=None, has_private_forwards=None,
+ description=None, invite_link=None, pinned_message=None,
+ permissions=None, slow_mode_delay=None,
+ message_auto_delete_time=None, has_protected_content=None, sticker_set_name=None,
+ can_set_sticker_set=None, linked_chat_id=None, location=None,
+ join_to_send_messages=None, join_by_request=None, has_restricted_voice_and_video_messages=None,
+ is_forum=None, max_reaction_count=None, active_usernames=None, emoji_status_custom_emoji_id=None,
+ has_hidden_members=None, has_aggressive_anti_spam_enabled=None, emoji_status_expiration_date=None,
+ available_reactions=None, accent_color_id=None, background_custom_emoji_id=None, profile_accent_color_id=None,
+ profile_background_custom_emoji_id=None, has_visible_history=None,
+ unrestrict_boost_count=None, custom_emoji_sticker_set_name=None, business_intro=None, business_location=None,
+ business_opening_hours=None, personal_chat=None, birthdate=None,
+ can_send_paid_media=None,
+ accepted_gift_types=None, is_direct_messages=None, parent_chat=None, **kwargs):
+ self.id: int = id
+ self.type: str = type
+ self.title: Optional[str] = title
+ self.username: Optional[str] = username
+ self.first_name: Optional[str] = first_name
+ self.last_name: Optional[str] = last_name
+ self.is_forum: Optional[bool] = is_forum
+ self.max_reaction_count: Optional[int] = max_reaction_count
+ self.photo: Optional[ChatPhoto] = photo
+ self.bio: Optional[str] = bio
+ self.join_to_send_messages: Optional[bool] = join_to_send_messages
+ self.join_by_request: Optional[bool] = join_by_request
+ self.has_private_forwards: Optional[bool] = has_private_forwards
+ self.has_restricted_voice_and_video_messages: Optional[bool] = has_restricted_voice_and_video_messages
+ self.description: Optional[str] = description
+ self.invite_link: Optional[str] = invite_link
+ self.pinned_message: Optional[Message] = pinned_message
+ self.permissions: Optional[ChatPermissions] = permissions
+ self.slow_mode_delay: Optional[int] = slow_mode_delay
+ self.message_auto_delete_time: Optional[int] = message_auto_delete_time
+ self.has_protected_content: Optional[bool] = has_protected_content
+ self.sticker_set_name: Optional[str] = sticker_set_name
+ self.can_set_sticker_set: Optional[bool] = can_set_sticker_set
+ self.linked_chat_id: Optional[int] = linked_chat_id
+ self.location: Optional[ChatLocation] = location
+ self.active_usernames: Optional[List[str]] = active_usernames
+ self.emoji_status_custom_emoji_id: Optional[str] = emoji_status_custom_emoji_id
+ self.has_hidden_members: Optional[bool] = has_hidden_members
+ self.has_aggressive_anti_spam_enabled: Optional[bool] = has_aggressive_anti_spam_enabled
+ self.emoji_status_expiration_date: Optional[int] = emoji_status_expiration_date
+ self.available_reactions: Optional[List[ReactionType]] = available_reactions
+ self.accent_color_id: Optional[int] = accent_color_id
+ self.background_custom_emoji_id: Optional[str] = background_custom_emoji_id
+ self.profile_accent_color_id: Optional[int] = profile_accent_color_id
+ self.profile_background_custom_emoji_id: Optional[str] = profile_background_custom_emoji_id
+ self.has_visible_history: Optional[bool] = has_visible_history
+ self.unrestrict_boost_count: Optional[int] = unrestrict_boost_count
+ self.custom_emoji_sticker_set_name: Optional[str] = custom_emoji_sticker_set_name
+ self.business_intro: Optional[BusinessIntro] = business_intro
+ self.business_location: Optional[BusinessLocation] = business_location
+ self.business_opening_hours: Optional[BusinessOpeningHours] = business_opening_hours
+ self.personal_chat: Optional[Chat] = personal_chat
+ self.birthdate: Optional[Birthdate] = birthdate
+ self.can_send_paid_media: Optional[bool] = can_send_paid_media
+ self.accepted_gift_types: AcceptedGiftTypes = accepted_gift_types
+ self.is_direct_messages: Optional[bool] = is_direct_messages
+ self.parent_chat: Optional[Chat] = parent_chat
+ @property
+ def can_send_gift(self) -> bool:
"""
- i = 1
- row = []
- for button in args:
- row.append(button.to_dic())
- if i % self.row_width == 0:
- self.keyboard.append(row)
- row = []
- i += 1
- if len(row) > 0:
- self.keyboard.append(row)
+ Deprecated. Use `accepted_gift_types` instead.
+
+ :return: True if the chat can send gifts
+ """
+ log_deprecation_warning("The parameter 'can_send_gift' is deprecated. Use 'accepted_gift_types' instead.")
+ if self.accepted_gift_types is not None: # just in case
+ return any([self.accepted_gift_types.unique_gifts, self.accepted_gift_types.unlimited_gifts, self.accepted_gift_types.limited_gifts])
+ return False
+
+
+class Chat(ChatFullInfo):
+ """
+ In BotAPI 7.3 Chat was reduced and full info moved to ChatFullInfo:
+ "Split out the class ChatFullInfo from the class Chat and changed the return type of the method getChat to ChatFullInfo."
+
+ https://core.telegram.org/bots/api#chatfullinfo
+
+ Currently Chat is left as full copy of ChatFullInfo for compatibility.
+ """
+ pass
+
+
+class MessageID(JsonDeserializable):
+ """
+ This object represents a unique message identifier.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#messageid
+
+ :param message_id: Unique message identifier
+ :type message_id: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.MessageId`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, message_id, **kwargs):
+ self.message_id: int = message_id
+
+
+class WebAppData(JsonDeserializable, Dictionaryable):
+ """
+ Describes data sent from a Web App to the bot.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#webappdata
+
+ :param data: The data. Be aware that a bad client can send arbitrary data in this field.
+ :type data: :obj:`str`
+
+ :param button_text: Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client
+ can send arbitrary data in this field.
+ :type button_text: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.WebAppData`
+ """
+
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ return cls(**obj)
+
+ def __init__(self, data, button_text, **kwargs):
+ self.data: str = data
+ self.button_text: str = button_text
+ def to_dict(self):
+ return {'data': self.data, 'button_text': self.button_text}
+
+
+# noinspection PyUnresolvedReferences
+class Message(JsonDeserializable):
+ """
+ This object represents a message.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#message
+
+ :param message_id: Unique message identifier inside this chat
+ :type message_id: :obj:`int`
+
+ :param message_thread_id: Optional. Unique identifier of a message thread to which the message belongs; for supergroups only
+ :type message_thread_id: :obj:`int`
+
+ :param direct_messages_topic: Optional. Information about the direct messages chat topic that contains the message
+ :type direct_messages_topic: :class:`telebot.types.DirectMessagesTopic`
+
+ :param from_user: Optional. Sender of the message; empty for messages sent to channels. For backward compatibility, the
+ field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.
+ :type from_user: :class:`telebot.types.User`
+
+ :param sender_chat: Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for
+ channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for
+ messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a
+ fake sender user in non-channel chats, if the message was sent on behalf of a chat.
+ :type sender_chat: :class:`telebot.types.Chat`
+
+ :param sender_boost_count: Optional. If the sender of the message boosted the chat, the number of boosts added by the user
+ :type sender_boost_count: :obj:`int`
+
+ :param sender_business_bot info: Optional. Information about the business bot that sent the message
+ :type sender_business_bot_info: :class:`telebot.types.User`
+
+ :param date: Date the message was sent in Unix time
+ :type date: :obj:`int`
+
+ :param business_connection_id: Optional. Unique identifier of the business connection from which the message was received. If non-empty,
+ the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.
+ :type business_connection_id: :obj:`str`
+
+ :param chat: Conversation the message belongs to
+ :type chat: :class:`telebot.types.Chat`
+
+ :forward_origin: Optional. For forwarded messages, information about the original message;
+ :type forward_origin: :class:`telebot.types.MessageOrigin`
+
+ :param is_topic_message: Optional. True, if the message is sent to a forum topic
+ :type is_topic_message: :obj:`bool`
+
+ :param is_automatic_forward: Optional. :obj:`bool`, if the message is a channel post that was automatically
+ forwarded to the connected discussion group
+ :type is_automatic_forward: :obj:`bool`
+
+ :param reply_to_message: Optional. For replies, the original message. Note that the Message object in this field
+ will not contain further reply_to_message fields even if it itself is a reply.
+ :type reply_to_message: :class:`telebot.types.Message`
+
+ :param external_reply: Optional. Information about the message that is being replied to, which may come from another chat or forum topic
+ :type external_reply: :class:`telebot.types.ExternalReplyInfo`
+
+ :param quote: Optional. For replies that quote part of the original message, the quoted part of the message
+ :type quote: :class:`telebot.types.TextQuote`
+
+ :param reply_to_story: Optional. For replies to a story, the original story
+ :type reply_to_story: :class:`telebot.types.Story`
+
+ :param reply_to_checklist_task_id: Optional. Identifier of the specific checklist task that is being replied to
+ :type reply_to_checklist_task_id: :obj:`str`
+
+ :param via_bot: Optional. Bot through which the message was sent
+ :type via_bot: :class:`telebot.types.User`
+
+ :param edit_date: Optional. Date the message was last edited in Unix time
+ :type edit_date: :obj:`int`
+
+ :param has_protected_content: Optional. :obj:`bool`, if the message can't be forwarded
+ :type has_protected_content: :obj:`bool`
+
+ :param is_from_offline: Optional. True, if the message was sent by an implicit action, for example,
+ as an away or a greeting business message, or as a scheduled message
+ :type is_from_offline: :obj:`bool`
+
+ :param is_paid_post: Optional. True, if the message is a paid post. Note that such posts must not be
+ deleted for 24 hours to receive the payment and can't be edited.
+ :type is_paid_post: :obj:`bool`
+
+ :param media_group_id: Optional. The unique identifier of a media message group this message belongs to
+ :type media_group_id: :obj:`str`
+
+ :param author_signature: Optional. Signature of the post author for messages in channels, or the custom title of an
+ anonymous group administrator
+ :type author_signature: :obj:`str`
+
+ :param paid_star_count: Optional. The number of Telegram Stars that were paid by the sender of the message to send it
+ :type paid_star_count: :obj:`int`
+
+ :param text: Optional. For text messages, the actual UTF-8 text of the message
+ :type text: :obj:`str`
+
+ :param entities: Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that
+ appear in the text
+ :type entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param link_preview_options: Optional. Options used for link preview generation for the message,
+ if it is a text message and link preview options were changed
+ :type link_preview_options: :class:`telebot.types.LinkPreviewOptions`
+
+ :param suggested_post_info: Optional. Information about suggested post parameters if the message is a suggested post
+ in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited.
+ :type suggested_post_info: :class:`telebot.types.SuggestedPostInfo`
+
+ :param effect_id: Optional. Unique identifier of the message effect added to the message
+ :type effect_id: :obj:`str`
+
+ :param animation: Optional. Message is an animation, information about the animation. For backward
+ compatibility, when this field is set, the document field will also be set
+ :type animation: :class:`telebot.types.Animation`
+
+ :param audio: Optional. Message is an audio file, information about the file
+ :type audio: :class:`telebot.types.Audio`
+
+ :param document: Optional. Message is a general file, information about the file
+ :type document: :class:`telebot.types.Document`
+
+ :param paid_media: Optional. Message contains paid media; information about the paid media
+ :type paid_media: :class:`telebot.types.PaidMediaInfo`
+
+ :param photo: Optional. Message is a photo, available sizes of the photo
+ :type photo: :obj:`list` of :class:`telebot.types.PhotoSize`
+
+ :param sticker: Optional. Message is a sticker, information about the sticker
+ :type sticker: :class:`telebot.types.Sticker`
+
+ :param story: Optional. Message is a forwarded story
+ :type story: :class:`telebot.types.Story`
+
+ :param video: Optional. Message is a video, information about the video
+ :type video: :class:`telebot.types.Video`
+
+ :param video_note: Optional. Message is a video note, information about the video message
+ :type video_note: :class:`telebot.types.VideoNote`
+
+ :param voice: Optional. Message is a voice message, information about the file
+ :type voice: :class:`telebot.types.Voice`
+
+ :param caption: Optional. Caption for the animation, audio, document, photo, video or voice
+ :type caption: :obj:`str`
+
+ :param caption_entities: Optional. For messages with a caption, special entities like usernames, URLs, bot
+ commands, etc. that appear in the caption
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param show_caption_above_media: Optional. True, if the caption must be shown above the message media
+ :type show_caption_above_media: :obj:`bool`
+
+ :param has_media_spoiler: Optional. True, if the message media is covered by a spoiler animation
+ :type has_media_spoiler: :obj:`bool`
+
+ :param checklist: Optional. Message is a checklist
+ :type checklist: :class:`telebot.types.Checklist`
+
+ :param contact: Optional. Message is a shared contact, information about the contact
+ :type contact: :class:`telebot.types.Contact`
+
+ :param dice: Optional. Message is a dice with random value
+ :type dice: :class:`telebot.types.Dice`
+
+ :param game: Optional. Message is a game, information about the game. More about games »
+ :type game: :class:`telebot.types.Game`
+
+ :param poll: Optional. Message is a native poll, information about the poll
+ :type poll: :class:`telebot.types.Poll`
+
+ :param venue: Optional. Message is a venue, information about the venue. For backward compatibility, when this
+ field is set, the location field will also be set
+ :type venue: :class:`telebot.types.Venue`
+
+ :param location: Optional. Message is a shared location, information about the location
+ :type location: :class:`telebot.types.Location`
+
+ :param new_chat_members: Optional. New members that were added to the group or supergroup and information about
+ them (the bot itself may be one of these members)
+ :type new_chat_members: :obj:`list` of :class:`telebot.types.User`
+
+ :param left_chat_member: Optional. A member was removed from the group, information about them (this member may be
+ the bot itself)
+ :type left_chat_member: :class:`telebot.types.User`
+
+ :param new_chat_title: Optional. A chat title was changed to this value
+ :type new_chat_title: :obj:`str`
+
+ :param new_chat_photo: Optional. A chat photo was change to this value
+ :type new_chat_photo: :obj:`list` of :class:`telebot.types.PhotoSize`
+
+ :param delete_chat_photo: Optional. Service message: the chat photo was deleted
+ :type delete_chat_photo: :obj:`bool`
+
+ :param group_chat_created: Optional. Service message: the group has been created
+ :type group_chat_created: :obj:`bool`
+
+ :param supergroup_chat_created: Optional. Service message: the supergroup has been created. This field can't be
+ received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can
+ only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
+ :type supergroup_chat_created: :obj:`bool`
+
+ :param channel_chat_created: Optional. Service message: the channel has been created. This field can't be
+ received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only
+ be found in reply_to_message if someone replies to a very first message in a channel.
+ :type channel_chat_created: :obj:`bool`
+
+ :param message_auto_delete_timer_changed: Optional. Service message: auto-delete timer settings changed in
+ the chat
+ :type message_auto_delete_timer_changed: :class:`telebot.types.MessageAutoDeleteTimerChanged`
+
+ :param migrate_to_chat_id: Optional. The group has been migrated to a supergroup with the specified identifier.
+ This number may have more than 32 significant bits and some programming languages may have difficulty/silent
+ defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
+ float type are safe for storing this identifier.
+ :type migrate_to_chat_id: :obj:`int`
+
+ :param migrate_from_chat_id: Optional. The supergroup has been migrated from a group with the specified
+ identifier. This number may have more than 32 significant bits and some programming languages may have
+ difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
+ double-precision float type are safe for storing this identifier.
+ :type migrate_from_chat_id: :obj:`int`
+
+ :param pinned_message: Optional. Specified message was pinned. Note that the Message object in this field will not
+ contain further reply_to_message fields even if it is itself a reply.
+ :type pinned_message: :class:`telebot.types.Message` or :class:`telebot.types.InaccessibleMessage`
+
+ :param invoice: Optional. Message is an invoice for a payment, information about the invoice. More about payments »
+ :type invoice: :class:`telebot.types.Invoice`
+
+ :param successful_payment: Optional. Message is a service message about a successful payment, information about
+ the payment. More about payments »
+ :type successful_payment: :class:`telebot.types.SuccessfulPayment`
+
+ :param refunded_payment: Optional. Message is a service message about a refunded payment, information about the payment. More about payments »
+ :type refunded_payment: :class:`telebot.types.RefundedPayment`
+
+ :param users_shared: Optional. Service message: a user was shared with the bot
+ :type users_shared: :class:`telebot.types.UsersShared`
+
+ :param chat_shared: Optional. Service message: a chat was shared with the bot
+ :type chat_shared: :class:`telebot.types.ChatShared`
+
+ :param gift: Optional. Service message: a regular gift was sent or received
+ :type gift: :class:`telebot.types.GiftInfo`
+
+ :param unique_gift: Optional. Service message: a unique gift was sent or received
+ :type unique_gift: :class:`telebot.types.UniqueGiftInfo`
+
+ :param connected_website: Optional. The domain name of the website on which the user has logged in. More about
+ Telegram Login »
+ :type connected_website: :obj:`str`
+
+ :param write_access_allowed: Optional. Service message: the user allowed the bot added to the attachment
+ menu to write messages
+ :type write_access_allowed: :class:`telebot.types.WriteAccessAllowed`
+
+ :param passport_data: Optional. Telegram Passport data
+ :type passport_data: :class:`telebot.types.PassportData`
+
+ :param proximity_alert_triggered: Optional. Service message. A user in the chat triggered another user's
+ proximity alert while sharing Live Location.
+ :type proximity_alert_triggered: :class:`telebot.types.ProximityAlertTriggered`
+
+ :param boost_added: Optional. Service message: user boosted the chat
+ :type boost_added: :class:`telebot.types.ChatBoostAdded`
+
+ :param chat_background_set: Optional. Service message: chat background set
+ :type chat_background_set: :class:`telebot.types.ChatBackground`
+
+ :param checklist_tasks_done: Optional. Service message: some tasks in a checklist were marked as done or not done
+ :type checklist_tasks_done: :class:`telebot.types.ChecklistTasksDone`
+
+ :param checklist_tasks_added: Optional. Service message: tasks were added to a checklist
+ :type checklist_tasks_added: :class:`telebot.types.ChecklistTasksAdded`
+
+ :param direct_message_price_changed: Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed
+ :type direct_message_price_changed: :class:`telebot.types.DirectMessagePriceChanged`
+
+ :param forum_topic_created: Optional. Service message: forum topic created
+ :type forum_topic_created: :class:`telebot.types.ForumTopicCreated`
+
+ :param forum_topic_edited: Optional. Service message: forum topic edited
+ :type forum_topic_edited: :class:`telebot.types.ForumTopicEdited`
+
+ :param forum_topic_closed: Optional. Service message: forum topic closed
+ :type forum_topic_closed: :class:`telebot.types.ForumTopicClosed`
+
+ :param forum_topic_reopened: Optional. Service message: forum topic reopened
+ :type forum_topic_reopened: :class:`telebot.types.ForumTopicReopened`
+
+ :param general_forum_topic_hidden: Optional. Service message: the 'General' forum topic hidden
+ :type general_forum_topic_hidden: :class:`telebot.types.GeneralForumTopicHidden`
+
+ :param general_forum_topic_unhidden: Optional. Service message: the 'General' forum topic unhidden
+ :type general_forum_topic_unhidden: :class:`telebot.types.GeneralForumTopicUnhidden`
+
+ :param giveaway_created: Optional. Service message: a giveaway has been created
+ :type giveaway_created: :class:`telebot.types.GiveawayCreated`
+
+ :param giveaway: Optional. The message is a scheduled giveaway message
+ :type giveaway: :class:`telebot.types.Giveaway`
+
+ :param giveaway_winners: Optional. Service message: giveaway winners(public winners)
+ :type giveaway_winners: :class:`telebot.types.GiveawayWinners`
+
+ :param giveaway_completed: Optional. Service message: giveaway completed, without public winners
+ :type giveaway_completed: :class:`telebot.types.GiveawayCompleted`
+
+ :param paid_message_price_changed: Optional. Service message: the price for paid messages has changed in the chat
+ :type paid_message_price_changed: :class:`telebot.types.PaidMessagePriceChanged`
+
+ :param suggested_post_approved: Optional. Service message: a suggested post was approved
+ :type suggested_post_approved: :class:`telebot.types.SuggestedPostApproved
+
+ :param suggested_post_approval_failed: Optional. Service message: approval of a suggested post has failed
+ :type suggested_post_approval_failed: :class:`telebot.types.SuggestedPost
+
+ :param suggested_post_declined: Optional. Service message: a suggested post was declined
+ :type suggested_post_declined: :class:`telebot.types.SuggestedPostDecl
+
+ :param suggested_post_paid: Optional. Service message: payment for a suggested post was received
+ :type suggested_post_paid: :class:`telebot.types.SuggestedPostPaid`
+
+ :param suggested_post_refunded: Optional. Service message: payment for a suggested post was refunded
+ :type suggested_post_refunded: :class:`telebot.types.SuggestedPostRefunded`
+
+ :param video_chat_scheduled: Optional. Service message: video chat scheduled
+ :type video_chat_scheduled: :class:`telebot.types.VideoChatScheduled`
+
+ :param video_chat_started: Optional. Service message: video chat started
+ :type video_chat_started: :class:`telebot.types.VideoChatStarted`
+
+ :param video_chat_ended: Optional. Service message: video chat ended
+ :type video_chat_ended: :class:`telebot.types.VideoChatEnded`
+
+ :param video_chat_participants_invited: Optional. Service message: new participants invited to a video chat
+ :type video_chat_participants_invited: :class:`telebot.types.VideoChatParticipantsInvited`
+
+ :param web_app_data: Optional. Service message: data sent by a Web App
+ :type web_app_data: :class:`telebot.types.WebAppData`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Message`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ message_id = obj['message_id']
+ from_user = User.de_json(obj.get('from'))
+ date = obj['date']
+ chat = Chat.de_json(obj['chat'])
+ content_type = None
+ opts = {}
+ if 'sender_chat' in obj:
+ opts['sender_chat'] = Chat.de_json(obj['sender_chat'])
+ if 'is_automatic_forward' in obj:
+ opts['is_automatic_forward'] = obj.get('is_automatic_forward')
+ if 'is_topic_message' in obj:
+ opts['is_topic_message'] = obj.get('is_topic_message')
+ if 'message_thread_id' in obj:
+ opts['message_thread_id'] = obj.get('message_thread_id')
+ if 'reply_to_message' in obj:
+ opts['reply_to_message'] = Message.de_json(obj['reply_to_message'])
+ if 'via_bot' in obj:
+ opts['via_bot'] = User.de_json(obj['via_bot'])
+ if 'edit_date' in obj:
+ opts['edit_date'] = obj.get('edit_date')
+ if 'has_protected_content' in obj:
+ opts['has_protected_content'] = obj.get('has_protected_content')
+ if 'media_group_id' in obj:
+ opts['media_group_id'] = obj.get('media_group_id')
+ if 'author_signature' in obj:
+ opts['author_signature'] = obj.get('author_signature')
+ if 'text' in obj:
+ opts['text'] = obj['text']
+ content_type = 'text'
+ if 'entities' in obj:
+ opts['entities'] = Message.parse_entities(obj['entities'])
+ if 'caption_entities' in obj:
+ opts['caption_entities'] = Message.parse_entities(obj['caption_entities'])
+ if 'audio' in obj:
+ opts['audio'] = Audio.de_json(obj['audio'])
+ content_type = 'audio'
+ if 'document' in obj:
+ opts['document'] = Document.de_json(obj['document'])
+ content_type = 'document'
+ if 'animation' in obj:
+ # Document content type accompanies "animation", so "animation" should be checked after "document" to override it
+ opts['animation'] = Animation.de_json(obj['animation'])
+ content_type = 'animation'
+ if 'game' in obj:
+ opts['game'] = Game.de_json(obj['game'])
+ content_type = 'game'
+ if 'photo' in obj:
+ opts['photo'] = Message.parse_photo(obj['photo'])
+ content_type = 'photo'
+ if 'sticker' in obj:
+ opts['sticker'] = Sticker.de_json(obj['sticker'])
+ content_type = 'sticker'
+ if 'video' in obj:
+ opts['video'] = Video.de_json(obj['video'])
+ content_type = 'video'
+ if 'video_note' in obj:
+ opts['video_note'] = VideoNote.de_json(obj['video_note'])
+ content_type = 'video_note'
+ if 'voice' in obj:
+ opts['voice'] = Audio.de_json(obj['voice'])
+ content_type = 'voice'
+ if 'caption' in obj:
+ opts['caption'] = obj['caption']
+ if 'contact' in obj:
+ opts['contact'] = Contact.de_json(obj['contact'])
+ content_type = 'contact'
+ if 'location' in obj:
+ opts['location'] = Location.de_json(obj['location'])
+ content_type = 'location'
+ if 'venue' in obj:
+ opts['venue'] = Venue.de_json(obj['venue'])
+ content_type = 'venue'
+ if 'dice' in obj:
+ opts['dice'] = Dice.de_json(obj['dice'])
+ content_type = 'dice'
+ if 'new_chat_members' in obj:
+ new_chat_members = []
+ for member in obj['new_chat_members']:
+ new_chat_members.append(User.de_json(member))
+ opts['new_chat_members'] = new_chat_members
+ content_type = 'new_chat_members'
+ if 'left_chat_member' in obj:
+ opts['left_chat_member'] = User.de_json(obj['left_chat_member'])
+ content_type = 'left_chat_member'
+ if 'new_chat_title' in obj:
+ opts['new_chat_title'] = obj['new_chat_title']
+ content_type = 'new_chat_title'
+ if 'new_chat_photo' in obj:
+ opts['new_chat_photo'] = Message.parse_photo(obj['new_chat_photo'])
+ content_type = 'new_chat_photo'
+ if 'delete_chat_photo' in obj:
+ opts['delete_chat_photo'] = obj['delete_chat_photo']
+ content_type = 'delete_chat_photo'
+ if 'group_chat_created' in obj:
+ opts['group_chat_created'] = obj['group_chat_created']
+ content_type = 'group_chat_created'
+ if 'supergroup_chat_created' in obj:
+ opts['supergroup_chat_created'] = obj['supergroup_chat_created']
+ content_type = 'supergroup_chat_created'
+ if 'channel_chat_created' in obj:
+ opts['channel_chat_created'] = obj['channel_chat_created']
+ content_type = 'channel_chat_created'
+ if 'migrate_to_chat_id' in obj:
+ opts['migrate_to_chat_id'] = obj['migrate_to_chat_id']
+ content_type = 'migrate_to_chat_id'
+ if 'migrate_from_chat_id' in obj:
+ opts['migrate_from_chat_id'] = obj['migrate_from_chat_id']
+ content_type = 'migrate_from_chat_id'
+ if 'pinned_message' in obj:
+ pinned_message = obj['pinned_message']
+ if pinned_message['date'] == 0:
+ # date. Always 0. The field can be used to differentiate regular and inaccessible messages.
+ opts['pinned_message'] = InaccessibleMessage.de_json(pinned_message)
+ else:
+ opts['pinned_message'] = Message.de_json(pinned_message)
+ content_type = 'pinned_message'
+ if 'invoice' in obj:
+ opts['invoice'] = Invoice.de_json(obj['invoice'])
+ content_type = 'invoice'
+ if 'successful_payment' in obj:
+ opts['successful_payment'] = SuccessfulPayment.de_json(obj['successful_payment'])
+ content_type = 'successful_payment'
+ if 'connected_website' in obj:
+ opts['connected_website'] = obj['connected_website']
+ content_type = 'connected_website'
+ if 'poll' in obj:
+ opts['poll'] = Poll.de_json(obj['poll'])
+ content_type = 'poll'
+ if 'passport_data' in obj:
+ opts['passport_data'] = obj['passport_data']
+ content_type = 'passport_data'
+ if 'proximity_alert_triggered' in obj:
+ opts['proximity_alert_triggered'] = ProximityAlertTriggered.de_json(obj[
+ 'proximity_alert_triggered'])
+ content_type = 'proximity_alert_triggered'
+ if 'video_chat_scheduled' in obj:
+ opts['video_chat_scheduled'] = VideoChatScheduled.de_json(obj['video_chat_scheduled'])
+ content_type = 'video_chat_scheduled'
+ if 'video_chat_started' in obj:
+ opts['video_chat_started'] = VideoChatStarted.de_json(obj['video_chat_started'])
+ content_type = 'video_chat_started'
+ if 'video_chat_ended' in obj:
+ opts['video_chat_ended'] = VideoChatEnded.de_json(obj['video_chat_ended'])
+ content_type = 'video_chat_ended'
+ if 'video_chat_participants_invited' in obj:
+ opts['video_chat_participants_invited'] = VideoChatParticipantsInvited.de_json(obj['video_chat_participants_invited'])
+ content_type = 'video_chat_participants_invited'
+ if 'web_app_data' in obj:
+ opts['web_app_data'] = WebAppData.de_json(obj['web_app_data'])
+ content_type = 'web_app_data'
+ if 'message_auto_delete_timer_changed' in obj:
+ opts['message_auto_delete_timer_changed'] = MessageAutoDeleteTimerChanged.de_json(obj['message_auto_delete_timer_changed'])
+ content_type = 'message_auto_delete_timer_changed'
+ if 'reply_markup' in obj:
+ opts['reply_markup'] = InlineKeyboardMarkup.de_json(obj['reply_markup'])
+ if 'chat_background_set' in obj:
+ opts['chat_background_set'] = ChatBackground.de_json(obj['chat_background_set'])
+ content_type = 'chat_background_set'
+ if 'forum_topic_created' in obj:
+ opts['forum_topic_created'] = ForumTopicCreated.de_json(obj['forum_topic_created'])
+ content_type = 'forum_topic_created'
+ if 'forum_topic_closed' in obj:
+ opts['forum_topic_closed'] = ForumTopicClosed.de_json(obj['forum_topic_closed'])
+ content_type = 'forum_topic_closed'
+ if 'forum_topic_reopened' in obj:
+ opts['forum_topic_reopened'] = ForumTopicReopened.de_json(obj['forum_topic_reopened'])
+ content_type = 'forum_topic_reopened'
+ if 'has_media_spoiler' in obj:
+ opts['has_media_spoiler'] = obj['has_media_spoiler']
+ if 'forum_topic_edited' in obj:
+ opts['forum_topic_edited'] = ForumTopicEdited.de_json(obj['forum_topic_edited'])
+ content_type = 'forum_topic_edited'
+ if 'general_forum_topic_hidden' in obj:
+ opts['general_forum_topic_hidden'] = GeneralForumTopicHidden.de_json(obj['general_forum_topic_hidden'])
+ content_type = 'general_forum_topic_hidden'
+ if 'general_forum_topic_unhidden' in obj:
+ opts['general_forum_topic_unhidden'] = GeneralForumTopicUnhidden.de_json(obj['general_forum_topic_unhidden'])
+ content_type = 'general_forum_topic_unhidden'
+ if 'write_access_allowed' in obj:
+ opts['write_access_allowed'] = WriteAccessAllowed.de_json(obj['write_access_allowed'])
+ content_type = 'write_access_allowed'
+ if 'users_shared' in obj:
+ opts['users_shared'] = UsersShared.de_json(obj['users_shared'])
+ content_type = 'users_shared' # COMPATIBILITY BROKEN!
+ if 'chat_shared' in obj:
+ opts['chat_shared'] = ChatShared.de_json(obj['chat_shared'])
+ content_type = 'chat_shared'
+ if 'story' in obj:
+ opts['story'] = Story.de_json(obj['story'])
+ content_type = 'story'
+ if 'external_reply' in obj:
+ opts['external_reply'] = ExternalReplyInfo.de_json(obj['external_reply'])
+ if 'quote' in obj:
+ opts['quote'] = TextQuote.de_json(obj['quote'])
+ if 'link_preview_options' in obj:
+ opts['link_preview_options'] = LinkPreviewOptions.de_json(obj['link_preview_options'])
+ if 'giveaway_created' in obj:
+ opts['giveaway_created'] = GiveawayCreated.de_json(obj['giveaway_created'])
+ content_type = 'giveaway_created'
+ if 'giveaway' in obj:
+ opts['giveaway'] = Giveaway.de_json(obj['giveaway'])
+ content_type = 'giveaway'
+ if 'giveaway_winners' in obj:
+ opts['giveaway_winners'] = GiveawayWinners.de_json(obj['giveaway_winners'])
+ content_type = 'giveaway_winners'
+ if 'giveaway_completed' in obj:
+ opts['giveaway_completed'] = GiveawayCompleted.de_json(obj['giveaway_completed'])
+ content_type = 'giveaway_completed'
+ if 'forward_origin' in obj:
+ opts['forward_origin'] = MessageOrigin.de_json(obj['forward_origin'])
+ if 'boost_added' in obj:
+ opts['boost_added'] = ChatBoostAdded.de_json(obj['boost_added'])
+ content_type = 'boost_added'
+ if 'sender_boost_count' in obj:
+ opts['sender_boost_count'] = obj['sender_boost_count']
+ if 'reply_to_story' in obj:
+ opts['reply_to_story'] = Story.de_json(obj['reply_to_story'])
+ if 'sender_business_bot' in obj:
+ opts['sender_business_bot'] = User.de_json(obj['sender_business_bot'])
+ if 'business_connection_id' in obj:
+ opts['business_connection_id'] = obj['business_connection_id']
+ if 'is_from_offline' in obj:
+ opts['is_from_offline'] = obj['is_from_offline']
+ if 'effect_id' in obj:
+ opts['effect_id'] = obj['effect_id']
+ if 'show_caption_above_media' in obj:
+ opts['show_caption_above_media'] = obj['show_caption_above_media']
+ if 'paid_media' in obj:
+ opts['paid_media'] = PaidMediaInfo.de_json(obj['paid_media'])
+ if 'refunded_payment' in obj:
+ opts['refunded_payment'] = RefundedPayment.de_json(obj['refunded_payment'])
+ if 'gift' in obj:
+ opts['gift'] = GiftInfo.de_json(obj['gift'])
+ content_type = 'gift'
+ if 'unique_gift' in obj:
+ opts['unique_gift'] = UniqueGiftInfo.de_json(obj['unique_gift'])
+ content_type = 'unique_gift'
+ if 'paid_message_price_changed' in obj:
+ opts['paid_message_price_changed'] = PaidMessagePriceChanged.de_json(obj['paid_message_price_changed'])
+ content_type = 'paid_message_price_changed'
+ if 'paid_star_count' in obj:
+ opts['paid_star_count'] = obj['paid_star_count']
+ if 'checklist' in obj:
+ opts['checklist'] = Checklist.de_json(obj['checklist'])
+ if 'checklist_tasks_done' in obj:
+ opts['checklist_tasks_done'] = ChecklistTasksDone.de_json(obj['checklist_tasks_done'])
+ content_type = 'checklist_tasks_done'
+ if 'checklist_tasks_added' in obj:
+ opts['checklist_tasks_added'] = ChecklistTasksAdded.de_json(obj['checklist_tasks_added'])
+ content_type = 'checklist_tasks_added'
+ if 'direct_message_price_changed' in obj:
+ opts['direct_message_price_changed'] = DirectMessagePriceChanged.de_json(obj['direct_message_price_changed'])
+ content_type = 'direct_message_price_changed'
+ if 'reply_to_checklist_task_id' in obj:
+ opts['reply_to_checklist_task_id'] = obj['reply_to_checklist_task_id']
+ if 'direct_messages_topic' in obj:
+ opts['direct_messages_topic'] = DirectMessagesTopic.de_json(obj['direct_messages_topic'])
+ if 'is_paid_post' in obj:
+ opts['is_paid_post'] = obj['is_paid_post']
+ if 'suggested_post_info' in obj:
+ opts['suggested_post_info'] = SuggestedPostInfo.de_json(obj['suggested_post_info'])
+ content_type = 'suggested_post_info'
+ if 'suggested_post_approved' in obj:
+ opts['suggested_post_approved'] = SuggestedPostApproved.de_json(obj['suggested_post_approved'])
+ content_type = 'suggested_post_approved'
+ if 'suggested_post_approval_failed' in obj:
+ opts['suggested_post_approval_failed'] = SuggestedPostApprovalFailed.de_json(obj['suggested_post_approval_failed'])
+ content_type = 'suggested_post_approval_failed'
+ if 'suggested_post_declined' in obj:
+ opts['suggested_post_declined'] = SuggestedPostDeclined.de_json(obj['suggested_post_declined'])
+ content_type = 'suggested_post_declined'
+ if 'suggested_post_paid' in obj:
+ opts['suggested_post_paid'] = SuggestedPostPaid.de_json(obj['suggested_post_paid'])
+ content_type = 'suggested_post_paid'
+ if 'suggested_post_refunded' in obj:
+ opts['suggested_post_refunded'] = SuggestedPostRefunded.de_json(obj['suggested_post_refunded'])
+ content_type = 'suggested_post_refunded'
+
+ return cls(message_id, from_user, date, chat, content_type, opts, json_string)
+
+ @classmethod
+ def parse_chat(cls, chat) -> Union[User, GroupChat]:
+ """
+ Parses chat.
+ """
+ if 'first_name' not in chat:
+ return GroupChat.de_json(chat)
+ else:
+ return User.de_json(chat)
+
+ @classmethod
+ def parse_photo(cls, photo_size_array) -> List[PhotoSize]:
+ """
+ Parses photo array.
+ """
+ ret = []
+ for ps in photo_size_array:
+ ret.append(PhotoSize.de_json(ps))
+ return ret
+
+ @classmethod
+ def parse_entities(cls, message_entity_array) -> List[MessageEntity]:
+ """
+ Parses message entity array.
+ """
+ ret = []
+ for me in message_entity_array:
+ ret.append(MessageEntity.de_json(me))
+ return ret
+
+ def __init__(self, message_id, from_user, date, chat, content_type, options, json_string):
+ self.content_type: str = content_type
+ self.id: int = message_id # Lets fix the telegram usability ####up with ID in Message :)
+ self.message_id: int = message_id
+ self.from_user: Optional[User] = from_user
+ self.date: int = date
+ self.chat: Chat = chat
+ self.sender_chat: Optional[Chat] = None
+ self.is_automatic_forward: Optional[bool] = None
+ self.reply_to_message: Optional[Message] = None
+ self.via_bot: Optional[User] = None
+ self.edit_date: Optional[int] = None
+ self.has_protected_content: Optional[bool] = None
+ self.media_group_id: Optional[str] = None
+ self.author_signature: Optional[str] = None
+ self.text: Optional[str] = None
+ self.entities: Optional[List[MessageEntity]] = None
+ self.caption_entities: Optional[List[MessageEntity]] = None
+ self.audio: Optional[Audio] = None
+ self.document: Optional[Document] = None
+ self.photo: Optional[List[PhotoSize]] = None
+ self.sticker: Optional[Sticker] = None
+ self.video: Optional[Video] = None
+ self.video_note: Optional[VideoNote] = None
+ self.voice: Optional[Voice] = None
+ self.caption: Optional[str] = None
+ self.contact: Optional[Contact] = None
+ self.location: Optional[Location] = None
+ self.venue: Optional[Venue] = None
+ self.animation: Optional[Animation] = None
+ self.dice: Optional[Dice] = None
+ self.new_chat_members: Optional[List[User]] = None
+ self.left_chat_member: Optional[User] = None
+ self.new_chat_title: Optional[str] = None
+ self.new_chat_photo: Optional[List[PhotoSize]] = None
+ self.delete_chat_photo: Optional[bool] = None
+ self.group_chat_created: Optional[bool] = None
+ self.supergroup_chat_created: Optional[bool] = None
+ self.channel_chat_created: Optional[bool] = None
+ self.migrate_to_chat_id: Optional[int] = None
+ self.migrate_from_chat_id: Optional[int] = None
+ self.pinned_message: Optional[Union[Message, InaccessibleMessage]] = None
+ self.invoice: Optional[Invoice] = None
+ self.successful_payment: Optional[SuccessfulPayment] = None
+ self.connected_website: Optional[str] = None
+ self.reply_markup: Optional[InlineKeyboardMarkup] = None
+ self.message_thread_id: Optional[int] = None
+ self.is_topic_message: Optional[bool] = None
+ self.chat_background_set: Optional[ChatBackground] = None
+ self.forum_topic_created: Optional[ForumTopicCreated] = None
+ self.forum_topic_closed: Optional[ForumTopicClosed] = None
+ self.forum_topic_reopened: Optional[ForumTopicReopened] = None
+ self.has_media_spoiler: Optional[bool] = None
+ self.forum_topic_edited: Optional[ForumTopicEdited] = None
+ self.general_forum_topic_hidden: Optional[GeneralForumTopicHidden] = None
+ self.general_forum_topic_unhidden: Optional[GeneralForumTopicUnhidden] = None
+ self.write_access_allowed: Optional[WriteAccessAllowed] = None
+ self.users_shared: Optional[UsersShared] = None
+ self.chat_shared: Optional[ChatShared] = None
+ self.story: Optional[Story] = None
+ self.external_reply: Optional[ExternalReplyInfo] = None
+ self.quote: Optional[TextQuote] = None
+ self.link_preview_options: Optional[LinkPreviewOptions] = None
+ self.giveaway_created: Optional[GiveawayCreated] = None
+ self.giveaway: Optional[Giveaway] = None
+ self.giveaway_winners: Optional[GiveawayWinners] = None
+ self.giveaway_completed: Optional[GiveawayCompleted] = None
+ self.forward_origin: Optional[MessageOrigin] = None
+ self.boost_added: Optional[ChatBoostAdded] = None
+ self.sender_boost_count: Optional[int] = None
+ self.reply_to_story: Optional[Story] = None
+ self.sender_business_bot: Optional[User] = None
+ self.business_connection_id: Optional[str] = None
+ self.is_from_offline: Optional[bool] = None
+ self.effect_id: Optional[str] = None
+ self.show_caption_above_media: Optional[bool] = None
+ self.paid_media : Optional[PaidMediaInfo] = None
+ self.refunded_payment : Optional[RefundedPayment] = None
+ self.proximity_alert_triggered: Optional[ProximityAlertTriggered] = None
+ self.video_chat_scheduled: Optional[VideoChatScheduled] = None
+ self.video_chat_started: Optional[VideoChatStarted] = None
+ self.video_chat_ended: Optional[VideoChatEnded] = None
+ self.video_chat_participants_invited: Optional[VideoChatParticipantsInvited] = None
+ self.web_app_data: Optional[WebAppData] = None
+ self.message_auto_delete_timer_changed: Optional[MessageAutoDeleteTimerChanged] = None
+ self.gift : Optional[GiftInfo] = None
+ self.unique_gift : Optional[UniqueGiftInfo] = None
+ self.paid_message_price_changed: Optional[PaidMessagePriceChanged] = None
+ self.paid_star_count: Optional[int] = None
+ self.checklist: Optional[Checklist] = None
+ self.checklist_tasks_done: Optional[ChecklistTasksDone] = None
+ self.checklist_tasks_added: Optional[List[ChecklistTasksAdded]] = None
+ self.direct_message_price_changed: Optional[DirectMessagePriceChanged] = None
+ self.reply_to_checklist_task_id: Optional[int] = None
+ self.direct_messages_topic: Optional[DirectMessagesTopic] = None
+ self.is_paid_post: Optional[bool] = None
+ self.suggested_post_info: Optional[SuggestedPostInfo] = None
+ self.suggested_post_approved: Optional[SuggestedPostApproved] = None
+ self.suggested_post_approval_failed: Optional[SuggestedPostApprovalFailed] = None
+ self.suggested_post_declined: Optional[SuggestedPostDeclined] = None
+ self.suggested_post_paid: Optional[SuggestedPostPaid] = None
+ self.suggested_post_refunded: Optional[SuggestedPostRefunded] = None
+
+ for key in options:
+ setattr(self, key, options[key])
+ self.json = json_string
+
+ @property
+ def html_text(self) -> Optional[str]:
+ """
+ Returns html-rendered text.
+ """
+ if self.text is None:
+ return None
+ return apply_html_entities(self.text, self.entities, getattr(self, "custom_subs", None))
+
+ @property
+ def html_caption(self) -> Optional[str]:
+ """
+ Returns html-rendered caption.
+ """
+ if self.caption is None:
+ return None
+ return apply_html_entities(self.caption, self.caption_entities, getattr(self, "custom_subs", None))
+
+ @property
+ def voice_chat_scheduled(self):
+ log_deprecation_warning('The parameter "voice_chat_scheduled" is deprecated, use "video_chat_scheduled" instead')
+ return self.video_chat_scheduled
+
+ @property
+ def voice_chat_started(self):
+ log_deprecation_warning('The parameter "voice_chat_started" is deprecated, use "video_chat_started" instead')
+ return self.video_chat_started
+
+ @property
+ def voice_chat_ended(self):
+ log_deprecation_warning('The parameter "voice_chat_ended" is deprecated, use "video_chat_ended" instead')
+ return self.video_chat_ended
+
+ @property
+ def voice_chat_participants_invited(self):
+ log_deprecation_warning('The parameter "voice_chat_participants_invited" is deprecated, use "video_chat_participants_invited" instead')
+ return self.video_chat_participants_invited
+
+ @property
+ def new_chat_member(self):
+ log_deprecation_warning('The parameter "new_chat_member" is deprecated, use "new_chat_members" instead')
+ return None
+
+ @property
+ def forward_from(self):
+ log_deprecation_warning('The parameter "forward_from" is deprecated, use "forward_origin" instead')
+ if self.forward_origin and isinstance(self.forward_origin, MessageOriginUser):
+ return self.forward_origin.sender_user
+ return None
+
+ @property
+ def forward_from_chat(self):
+ log_deprecation_warning('The parameter "forward_from_chat" is deprecated, use "forward_origin" instead')
+ if self.forward_origin and isinstance(self.forward_origin, MessageOriginChat):
+ return self.forward_origin.sender_chat
+ elif self.forward_origin and isinstance(self.forward_origin, MessageOriginChannel):
+ return self.forward_origin.chat
+ return None
+
+ @property
+ def forward_from_message_id(self):
+ log_deprecation_warning('The parameter "forward_from_message_id" is deprecated, use "forward_origin" instead')
+ if self.forward_origin and isinstance(self.forward_origin, MessageOriginChannel):
+ return self.forward_origin.message_id
+ return None
+
+ @property
+ def forward_signature(self):
+ log_deprecation_warning('The parameter "forward_signature" is deprecated, use "forward_origin" instead')
+ if self.forward_origin and isinstance(self.forward_origin, MessageOriginChat):
+ return self.forward_origin.author_signature
+ elif self.forward_origin and isinstance(self.forward_origin, MessageOriginChannel):
+ return self.forward_origin.author_signature
+ return None
+
+ @property
+ def forward_sender_name(self):
+ log_deprecation_warning('The parameter "forward_sender_name" is deprecated, use "forward_origin" instead')
+ if self.forward_origin and isinstance(self.forward_origin, MessageOriginHiddenUser):
+ return self.forward_origin.sender_user_name
+ return None
+
+ @property
+ def forward_date(self):
+ log_deprecation_warning('The parameter "forward_date" is deprecated, use "forward_origin" instead')
+ if self.forward_origin:
+ return self.forward_origin.date
+ return None
+
+ @property
+ def user_shared(self):
+ log_deprecation_warning('The parameter "user_shared" is deprecated, use "users_shared" instead')
+ return self.users_shared
+
+ @property
+ def any_text(self) -> Optional[str]:
+ return self.caption if (self.caption is not None) else self.text
+
+ @property
+ def any_entities(self) -> Optional[List[MessageEntity]]:
+ return self.caption_entities if (self.caption_entities is not None) else self.entities
+
+
+# noinspection PyShadowingBuiltins
+class MessageEntity(Dictionaryable, JsonSerializable, JsonDeserializable):
+ """
+ This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#messageentity
+
+ :param type: Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag or #hashtag@chatusername), “cashtag” ($USD or $USD@chatusername),
+ “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text),
+ “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation),
+ “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs),
+ “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers)
+ :type type: :obj:`str`
+
+ :param offset: Offset in UTF-16 code units to the start of the entity
+ :type offset: :obj:`int`
+
+ :param length: Length of the entity in UTF-16 code units
+ :type length: :obj:`int`
+
+ :param url: Optional. For “text_link” only, URL that will be opened after user taps on the text
+ :type url: :obj:`str`
+
+ :param user: Optional. For “text_mention” only, the mentioned user
+ :type user: :class:`telebot.types.User`
+
+ :param language: Optional. For “pre” only, the programming language of the entity text
+ :type language: :obj:`str`
+
+ :param custom_emoji_id: Optional. For “custom_emoji” only, unique identifier of the custom emoji.
+ Use get_custom_emoji_stickers to get full information about the sticker.
+ :type custom_emoji_id: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.MessageEntity`
+ """
+ @staticmethod
+ def to_list_of_dicts(entity_list) -> Union[List[Dict], None]:
+ """
+ Converts a list of MessageEntity objects to a list of dictionaries.
+ """
+ if entity_list is None or len(entity_list) == 0:
+ return None
+ elif isinstance(entity_list[0], MessageEntity):
+ return [MessageEntity.to_dict(e) for e in entity_list]
+ else:
+ return entity_list
+
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if 'user' in obj:
+ obj['user'] = User.de_json(obj['user'])
+ return cls(**obj)
+
+ def __init__(self, type, offset, length, url=None, user=None, language=None, custom_emoji_id=None, **kwargs):
+ self.type: str = type
+ self.offset: int = offset
+ self.length: int = length
+ self.url: str = url
+ self.user: User = user
+ self.language: str = language
+ self.custom_emoji_id: Optional[str] = custom_emoji_id
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ return {"type": self.type,
+ "offset": self.offset,
+ "length": self.length,
+ "url": self.url,
+ "user": self.user.to_dict() if self.user else None,
+ "language": self.language,
+ "custom_emoji_id": self.custom_emoji_id}
+
+
+class Dice(JsonSerializable, Dictionaryable, JsonDeserializable):
+ """
+ This object represents an animated emoji that displays a random value.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#dice
+
+ :param emoji: Emoji on which the dice throw animation is based
+ :type emoji: :obj:`str`
+
+ :param value: Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji
+ :type value: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Dice`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, value, emoji, **kwargs):
+ self.value: int = value
+ self.emoji: str = emoji
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ return {'value': self.value,
+ 'emoji': self.emoji}
+
+
+class PhotoSize(JsonDeserializable):
+ """
+ This object represents one size of a photo or a file / sticker thumbnail.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#photosize
+
+ :param file_id: Identifier for this file, which can be used to download or reuse the file
+ :type file_id: :obj:`str`
+
+ :param file_unique_id: Unique identifier for this file, which is supposed to be the same over time and for different
+ bots. Can't be used to download or reuse the file.
+ :type file_unique_id: :obj:`str`
+
+ :param width: Photo width
+ :type width: :obj:`int`
+
+ :param height: Photo height
+ :type height: :obj:`int`
+
+ :param file_size: Optional. File size in bytes
+ :type file_size: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.PhotoSize`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, file_id, file_unique_id, width, height, file_size=None, **kwargs):
+ self.file_id: str = file_id
+ self.file_unique_id: str = file_unique_id
+ self.width: int = width
+ self.height: int = height
+ self.file_size: Optional[int] = file_size
+
+
+class Audio(JsonDeserializable):
+ """
+ This object represents an audio file to be treated as music by the Telegram clients.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#audio
+
+ :param file_id: Identifier for this file, which can be used to download or reuse the file
+ :type file_id: :obj:`str`
+
+ :param file_unique_id: Unique identifier for this file, which is supposed to be the same over time and for different
+ bots. Can't be used to download or reuse the file.
+ :type file_unique_id: :obj:`str`
+
+ :param duration: Duration of the audio in seconds as defined by sender
+ :type duration: :obj:`int`
+
+ :param performer: Optional. Performer of the audio as defined by sender or by audio tags
+ :type performer: :obj:`str`
+
+ :param title: Optional. Title of the audio as defined by sender or by audio tags
+ :type title: :obj:`str`
+
+ :param file_name: Optional. Original filename as defined by sender
+ :type file_name: :obj:`str`
+
+ :param mime_type: Optional. MIME type of the file as defined by sender
+ :type mime_type: :obj:`str`
+
+ :param file_size: Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
+ difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
+ double-precision float type are safe for storing this value.
+ :type file_size: :obj:`int`
+
+ :param thumbnail: Optional. Thumbnail of the album cover to which the music file belongs
+ :type thumbnail: :class:`telebot.types.PhotoSize`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Audio`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if 'thumbnail' in obj and 'file_id' in obj['thumbnail']:
+ obj['thumbnail'] = PhotoSize.de_json(obj['thumbnail'])
+ else:
+ obj['thumbnail'] = None
+ return cls(**obj)
+
+ def __init__(self, file_id, file_unique_id, duration, performer=None, title=None, file_name=None, mime_type=None,
+ file_size=None, thumbnail=None, **kwargs):
+ self.file_id: str = file_id
+ self.file_unique_id: str = file_unique_id
+ self.duration: int = duration
+ self.performer: Optional[str] = performer
+ self.title: Optional[str] = title
+ self.file_name: Optional[str] = file_name
+ self.mime_type: Optional[str] = mime_type
+ self.file_size: Optional[int] = file_size
+ self.thumbnail: Optional[PhotoSize] = thumbnail
+
+ @property
+ def thumb(self) -> Optional[PhotoSize]:
+ log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+ return self.thumbnail
+
+
+class Voice(JsonDeserializable):
+ """
+ This object represents a voice note.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#voice
+
+ :param file_id: Identifier for this file, which can be used to download or reuse the file
+ :type file_id: :obj:`str`
+
+ :param file_unique_id: Unique identifier for this file, which is supposed to be the same over time and for different
+ bots. Can't be used to download or reuse the file.
+ :type file_unique_id: :obj:`str`
+
+ :param duration: Duration of the audio in seconds as defined by sender
+ :type duration: :obj:`int`
+
+ :param mime_type: Optional. MIME type of the file as defined by sender
+ :type mime_type: :obj:`str`
+
+ :param file_size: Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
+ difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
+ double-precision float type are safe for storing this value.
+ :type file_size: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Voice`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, file_id, file_unique_id, duration, mime_type=None, file_size=None, **kwargs):
+ self.file_id: str = file_id
+ self.file_unique_id: str = file_unique_id
+ self.duration: int = duration
+ self.mime_type: Optional[str] = mime_type
+ self.file_size: Optional[int] = file_size
+
+
+class Document(JsonDeserializable):
+ """
+ This object represents a general file (as opposed to photos, voice messages and audio files).
+
+ Telegram Documentation: https://core.telegram.org/bots/api#document
+
+ :param file_id: Identifier for this file, which can be used to download or reuse the file
+ :type file_id: :obj:`str`
+
+ :param file_unique_id: Unique identifier for this file, which is supposed to be the same over time and for different
+ bots. Can't be used to download or reuse the file.
+ :type file_unique_id: :obj:`str`
+
+ :param thumbnail: Optional. Document thumbnail as defined by sender
+ :type thumbnail: :class:`telebot.types.PhotoSize`
+
+ :param file_name: Optional. Original filename as defined by sender
+ :type file_name: :obj:`str`
+
+ :param mime_type: Optional. MIME type of the file as defined by sender
+ :type mime_type: :obj:`str`
+
+ :param file_size: Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
+ difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
+ double-precision float type are safe for storing this value.
+ :type file_size: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Document`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if 'thumbnail' in obj and 'file_id' in obj['thumbnail']:
+ obj['thumbnail'] = PhotoSize.de_json(obj['thumbnail'])
+ else:
+ obj['thumbnail'] = None
+ return cls(**obj)
+
+ def __init__(self, file_id, file_unique_id, thumbnail=None, file_name=None, mime_type=None, file_size=None, **kwargs):
+ self.file_id: str = file_id
+ self.file_unique_id: str = file_unique_id
+ self.thumbnail: Optional[PhotoSize] = thumbnail
+ self.file_name: Optional[str] = file_name
+ self.mime_type: Optional[str] = mime_type
+ self.file_size: Optional[int] = file_size
+
+ @property
+ def thumb(self) -> Optional[PhotoSize]:
+ log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+ return self.thumbnail
+
+
+class Video(JsonDeserializable):
+ """
+ This object represents a video file.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#video
+
+ :param file_id: Identifier for this file, which can be used to download or reuse the file
+ :type file_id: :obj:`str`
+
+ :param file_unique_id: Unique identifier for this file, which is supposed to be the same over time and for different
+ bots. Can't be used to download or reuse the file.
+ :type file_unique_id: :obj:`str`
+
+ :param width: Video width as defined by sender
+ :type width: :obj:`int`
+
+ :param height: Video height as defined by sender
+ :type height: :obj:`int`
+
+ :param duration: Duration of the video in seconds as defined by sender
+ :type duration: :obj:`int`
+
+ :param thumbnail: Optional. Video thumbnail
+ :type thumbnail: :class:`telebot.types.PhotoSize`
+
+ :param cover: Optional. Available sizes of the cover of the video in the message
+ :type cover: List[:class:`telebot.types.PhotoSize`]
+
+ :param start_timestamp: Optional. Timestamp in seconds from which the video will play in the message
+ :type start_timestamp: :obj:`int`
+
+ :param file_name: Optional. Original filename as defined by sender
+ :type file_name: :obj:`str`
+
+ :param mime_type: Optional. MIME type of the file as defined by sender
+ :type mime_type: :obj:`str`
+
+ :param file_size: Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
+ difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
+ double-precision float type are safe for storing this value.
+ :type file_size: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Video`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if 'thumbnail' in obj and 'file_id' in obj['thumbnail']:
+ obj['thumbnail'] = PhotoSize.de_json(obj['thumbnail'])
+ if 'cover' in obj:
+ obj['cover'] = [PhotoSize.de_json(c) for c in obj['cover']]
+ return cls(**obj)
+
+ def __init__(self, file_id, file_unique_id, width, height, duration, thumbnail=None, file_name=None, mime_type=None, file_size=None,
+ cover=None, start_timestamp=None, **kwargs):
+ self.file_id: str = file_id
+ self.file_unique_id: str = file_unique_id
+ self.width: int = width
+ self.height: int = height
+ self.duration: int = duration
+ self.thumbnail: PhotoSize = thumbnail
+ self.file_name: Optional[str] = file_name
+ self.mime_type: Optional[str] = mime_type
+ self.file_size: Optional[int] = file_size
+ self.cover: Optional[List[PhotoSize]] = cover
+ self.start_timestamp: Optional[int] = start_timestamp
+
+ @property
+ def thumb(self) -> Optional[PhotoSize]:
+ log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+ return self.thumbnail
+
+
+class VideoNote(JsonDeserializable):
+ """
+ This object represents a video message (available in Telegram apps as of v.4.0).
+
+ Telegram Documentation: https://core.telegram.org/bots/api#videonote
+
+ :param file_id: Identifier for this file, which can be used to download or reuse the file
+ :type file_id: :obj:`str`
+
+ :param file_unique_id: Unique identifier for this file, which is supposed to be the same over time and for different
+ bots. Can't be used to download or reuse the file.
+ :type file_unique_id: :obj:`str`
+
+ :param length: Video width and height (diameter of the video message) as defined by sender
+ :type length: :obj:`int`
+
+ :param duration: Duration of the video in seconds as defined by sender
+ :type duration: :obj:`int`
+
+ :param thumbnail: Optional. Video thumbnail
+ :type thumbnail: :class:`telebot.types.PhotoSize`
+
+ :param file_size: Optional. File size in bytes
+ :type file_size: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.VideoNote`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if 'thumbnail' in obj and 'file_id' in obj['thumbnail']:
+ obj['thumbnail'] = PhotoSize.de_json(obj['thumbnail'])
+ return cls(**obj)
+
+ def __init__(self, file_id, file_unique_id, length, duration, thumbnail=None, file_size=None, **kwargs):
+ self.file_id: str = file_id
+ self.file_unique_id: str = file_unique_id
+ self.length: int = length
+ self.duration: int = duration
+ self.thumbnail: Optional[PhotoSize] = thumbnail
+ self.file_size: Optional[int] = file_size
+
+ @property
+ def thumb(self) -> Optional[PhotoSize]:
+ log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+ return self.thumbnail
+
+
+class Contact(JsonDeserializable):
+ """
+ This object represents a phone contact.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#contact
+
+ :param phone_number: Contact's phone number
+ :type phone_number: :obj:`str`
+
+ :param first_name: Contact's first name
+ :type first_name: :obj:`str`
+
+ :param last_name: Optional. Contact's last name
+ :type last_name: :obj:`str`
+
+ :param user_id: Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits
+ and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52
+ significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
+ :type user_id: :obj:`int`
+
+ :param vcard: Optional. Additional data about the contact in the form of a vCard
+ :type vcard: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Contact`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, phone_number, first_name, last_name=None, user_id=None, vcard=None, **kwargs):
+ self.phone_number: str = phone_number
+ self.first_name: str = first_name
+ self.last_name: Optional[str] = last_name
+ self.user_id: Optional[int] = user_id
+ self.vcard: Optional[str] = vcard
+
+
+class Location(JsonDeserializable, JsonSerializable, Dictionaryable):
+ """
+ This object represents a point on the map.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#location
+
+ :param longitude: Longitude as defined by sender
+ :type longitude: :obj:`float`
+
+ :param latitude: Latitude as defined by sender
+ :type latitude: :obj:`float`
+
+ :param horizontal_accuracy: Optional. The radius of uncertainty for the location, measured in meters; 0-1500
+ :type horizontal_accuracy: :obj:`float` number
+
+ :param live_period: Optional. Time relative to the message sending date, during which the location can be updated;
+ in seconds. For active live locations only.
+ :type live_period: :obj:`int`
+
+ :param heading: Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.
+ :type heading: :obj:`int`
+
+ :param proximity_alert_radius: Optional. The maximum distance for proximity alerts about approaching another
+ chat member, in meters. For sent live locations only.
+ :type proximity_alert_radius: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Location`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, longitude, latitude, horizontal_accuracy=None,
+ live_period=None, heading=None, proximity_alert_radius=None, **kwargs):
+ self.longitude: float = longitude
+ self.latitude: float = latitude
+ self.horizontal_accuracy: Optional[float] = horizontal_accuracy
+ self.live_period: Optional[int] = live_period
+ self.heading: Optional[int] = heading
+ self.proximity_alert_radius: Optional[int] = proximity_alert_radius
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ return {
+ "longitude": self.longitude,
+ "latitude": self.latitude,
+ "horizontal_accuracy": self.horizontal_accuracy,
+ "live_period": self.live_period,
+ "heading": self.heading,
+ "proximity_alert_radius": self.proximity_alert_radius,
+ }
+
+
+class Venue(JsonDeserializable):
+ """
+ This object represents a venue.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#venue
+
+ :param location: Venue location. Can't be a live location
+ :type location: :class:`telebot.types.Location`
+
+ :param title: Name of the venue
+ :type title: :obj:`str`
+
+ :param address: Address of the venue
+ :type address: :obj:`str`
+
+ :param foursquare_id: Optional. Foursquare identifier of the venue
+ :type foursquare_id: :obj:`str`
+
+ :param foursquare_type: Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”,
+ “arts_entertainment/aquarium” or “food/icecream”.)
+ :type foursquare_type: :obj:`str`
+
+ :param google_place_id: Optional. Google Places identifier of the venue
+ :type google_place_id: :obj:`str`
+
+ :param google_place_type: Optional. Google Places type of the venue. (See supported types.)
+ :type google_place_type: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Venue`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ obj['location'] = Location.de_json(obj['location'])
+ return cls(**obj)
+
+ def __init__(self, location, title, address, foursquare_id=None, foursquare_type=None,
+ google_place_id=None, google_place_type=None, **kwargs):
+ self.location: Location = location
+ self.title: str = title
+ self.address: str = address
+ self.foursquare_id: Optional[str] = foursquare_id
+ self.foursquare_type: Optional[str] = foursquare_type
+ self.google_place_id: Optional[str] = google_place_id
+ self.google_place_type: Optional[str] = google_place_type
+
+
+class UserProfilePhotos(JsonDeserializable):
+ """
+ This object represent a user's profile pictures.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#userprofilephotos
+
+ :param total_count: Total number of profile pictures the target user has
+ :type total_count: :obj:`int`
+
+ :param photos: Requested profile pictures (in up to 4 sizes each)
+ :type photos: :obj:`list` of :obj:`list` of :class:`telebot.types.PhotoSize`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.UserProfilePhotos`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if 'photos' in obj:
+ photos = [[PhotoSize.de_json(y) for y in x] for x in obj['photos']]
+ obj['photos'] = photos
+ return cls(**obj)
+
+ def __init__(self, total_count, photos=None, **kwargs):
+ self.total_count: int = total_count
+ self.photos: List[PhotoSize] = photos
+
+
+class File(JsonDeserializable):
+ """
+ This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot/. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#file
+
+ :param file_id: Identifier for this file, which can be used to download or reuse the file
+ :type file_id: :obj:`str`
+
+ :param file_unique_id: Unique identifier for this file, which is supposed to be the same over time and for different
+ bots. Can't be used to download or reuse the file.
+ :type file_unique_id: :obj:`str`
+
+ :param file_size: Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
+ difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
+ double-precision float type are safe for storing this value.
+ :type file_size: :obj:`int`
+
+ :param file_path: Optional. File path. Use https://api.telegram.org/file/bot/ to get the
+ file.
+ :type file_path: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.File`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, file_id, file_unique_id, file_size=None, file_path=None, **kwargs):
+ self.file_id: str = file_id
+ self.file_unique_id: str = file_unique_id
+ self.file_size: Optional[int] = file_size
+ self.file_path: Optional[str] = file_path
+
+
+# noinspection PyUnresolvedReferences
+class ForceReply(JsonSerializable):
+ """
+ Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#forcereply
+
+ :param force_reply: Shows reply interface to the user, as if they manually selected the bot's message and tapped
+ 'Reply'
+ :type force_reply: :obj:`bool`
+
+ :param input_field_placeholder: Optional. The placeholder to be shown in the input field when the reply is active;
+ 1-64 characters
+ :type input_field_placeholder: :obj:`str`
+
+ :param selective: Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users
+ that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same
+ chat and forum topic, sender of the original message.
+ :type selective: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ForceReply`
+ """
+ def __init__(self, selective: Optional[bool]=None, input_field_placeholder: Optional[str]=None):
+ self.selective: Optional[bool] = selective
+ self.input_field_placeholder: Optional[str] = input_field_placeholder
+
+ def to_json(self):
+ json_dict = {'force_reply': True}
+ if self.selective is not None:
+ json_dict['selective'] = self.selective
+ if self.input_field_placeholder:
+ json_dict['input_field_placeholder'] = self.input_field_placeholder
+ return json.dumps(json_dict)
+
+
+# noinspection PyUnresolvedReferences
+class ReplyKeyboardRemove(JsonSerializable):
+ """
+ Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).
+
+ Telegram Documentation: https://core.telegram.org/bots/api#replykeyboardremove
+
+ :param remove_keyboard: Requests clients to remove the custom keyboard (user will not be able to summon this
+ keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in
+ ReplyKeyboardMarkup)
+ Note that this parameter is set to True by default by the library. You cannot modify it.
+ :type remove_keyboard: :obj:`bool`
+
+ :param selective: Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets:
+ 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has
+ reply_to_message_id), sender of the original message.Example: A user votes in a poll, bot returns confirmation
+ message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options
+ to users who haven't voted yet.
+ :type selective: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ReplyKeyboardRemove`
+ """
+ def __init__(self, selective: Optional[bool]=None):
+ self.selective: Optional[bool] = selective
+
+ def to_json(self):
+ json_dict = {'remove_keyboard': True}
+ if self.selective:
+ json_dict['selective'] = self.selective
+ return json.dumps(json_dict)
+
+
+class WebAppInfo(JsonDeserializable, Dictionaryable):
+ """
+ Describes a Web App.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#webappinfo
+
+ :param url: An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps
+ :type url: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.WebAppInfo`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ return cls(**obj)
+
+ def __init__(self, url, **kwargs):
+ self.url: str = url
+
+ def to_dict(self):
+ return {'url': self.url}
+
+
+# noinspection PyUnresolvedReferences
+class ReplyKeyboardMarkup(JsonSerializable):
+ """
+ This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
+
+ .. code-block:: python3
+ :caption: Example on creating ReplyKeyboardMarkup object
+
+ from telebot.types import ReplyKeyboardMarkup, KeyboardButton
+
+ markup = ReplyKeyboardMarkup(resize_keyboard=True)
+ markup.add(KeyboardButton('Text'))
+ # or:
+ markup.add('Text')
+
+ # display this markup:
+ bot.send_message(chat_id, 'Text', reply_markup=markup)
+
+ Telegram Documentation: https://core.telegram.org/bots/api#replykeyboardmarkup
+
+ :param keyboard: :obj:`list` of button rows, each represented by an :obj:`list` of
+ :class:`telebot.types.KeyboardButton` objects
+ :type keyboard: :obj:`list` of :obj:`list` of :class:`telebot.types.KeyboardButton`
+
+ :param resize_keyboard: Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make
+ the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is
+ always of the same height as the app's standard keyboard.
+ :type resize_keyboard: :obj:`bool`
+
+ :param one_time_keyboard: Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard
+ will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can
+ press a special button in the input field to see the custom keyboard again. Defaults to false.
+ :type one_time_keyboard: :obj:`bool`
+
+ :param input_field_placeholder: Optional. The placeholder to be shown in the input field when the keyboard is
+ active; 1-64 characters
+ :type input_field_placeholder: :obj:`str`
+
+ :param selective: Optional. Use this parameter if you want to show the keyboard to specific users only. Targets:
+ 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message
+ in the same chat and forum topic, sender of the original message. Example: A user requests to change the bot's
+ language, bot replies to the request with a keyboard to select the new language. Other users in the group don't
+ see the keyboard.
+ :type selective: :obj:`bool`
+
+ :param is_persistent: Optional. Use this parameter if you want to show the keyboard to specific users only.
+ Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a
+ reply (has reply_to_message_id), sender of the original message.
+
+ Example: A user requests to change the bot's language, bot replies to the request with a keyboard to
+ select the new language. Other users in the group don't see the keyboard.
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ReplyKeyboardMarkup`
+ """
+ max_row_keys = 12
+
+ def __init__(self, resize_keyboard: Optional[bool]=None, one_time_keyboard: Optional[bool]=None,
+ selective: Optional[bool]=None, row_width: int=3, input_field_placeholder: Optional[str]=None,
+ is_persistent: Optional[bool]=None):
+ if row_width > self.max_row_keys:
+ # Todo: Will be replaced with Exception in future releases
+ if not DISABLE_KEYLEN_ERROR:
+ logger.error('Telegram does not support reply keyboard row width over %d.' % self.max_row_keys)
+ row_width = self.max_row_keys
+
+ self.resize_keyboard: Optional[bool] = resize_keyboard
+ self.one_time_keyboard: Optional[bool] = one_time_keyboard
+ self.selective: Optional[bool] = selective
+ self.row_width: Optional[int] = row_width
+ self.input_field_placeholder: Optional[str] = input_field_placeholder
+ self.keyboard: List[List[KeyboardButton]] = []
+ self.is_persistent: Optional[bool] = is_persistent
+
+ def add(self, *args, row_width=None) -> 'ReplyKeyboardMarkup':
+ """
+ This function adds strings to the keyboard, while not exceeding row_width.
+ E.g. ReplyKeyboardMarkup#add("A", "B", "C") yields the json result {keyboard: [["A"], ["B"], ["C"]]}
+ when row_width is set to 1.
+ When row_width is set to 2, the following is the result of this function: {keyboard: [["A", "B"], ["C"]]}
+ See https://core.telegram.org/bots/api#replykeyboardmarkup
+
+ :param args: KeyboardButton to append to the keyboard
+ :type args: :obj:`str` or :class:`telebot.types.KeyboardButton`
+
+ :param row_width: width of row
+ :type row_width: :obj:`int`
+
+ :return: self, to allow function chaining.
+ :rtype: :class:`telebot.types.ReplyKeyboardMarkup`
+ """
+ if row_width is None:
+ row_width = self.row_width
+
+ if row_width > self.max_row_keys:
+ # Todo: Will be replaced with Exception in future releases
+ if not DISABLE_KEYLEN_ERROR:
+ logger.error('Telegram does not support reply keyboard row width over %d.' % self.max_row_keys)
+ row_width = self.max_row_keys
+
+ for row in service_utils.chunks(args, row_width):
+ button_array = []
+ for button in row:
+ if service_utils.is_string(button):
+ button_array.append({'text': button})
+ elif service_utils.is_bytes(button):
+ button_array.append({'text': button.decode('utf-8')})
+ else:
+ button_array.append(button.to_dict())
+ self.keyboard.append(button_array)
+
+ return self
+
+ def row(self, *args) -> 'ReplyKeyboardMarkup':
+ """
+ Adds a list of KeyboardButton to the keyboard. This function does not consider row_width.
+ ReplyKeyboardMarkup#row("A")#row("B", "C")#to_json() outputs '{keyboard: [["A"], ["B", "C"]]}'
+ See https://core.telegram.org/bots/api#replykeyboardmarkup
+
+ :param args: strings
+ :type args: :obj:`str`
+
+ :return: self, to allow function chaining.
+ :rtype: :class:`telebot.types.ReplyKeyboardMarkup`
+ """
+
+ return self.add(*args, row_width=self.max_row_keys)
+
+ def to_json(self):
+ json_dict = {'keyboard': self.keyboard}
+ if self.one_time_keyboard is not None:
+ json_dict['one_time_keyboard'] = self.one_time_keyboard
+ if self.resize_keyboard is not None:
+ json_dict['resize_keyboard'] = self.resize_keyboard
+ if self.selective is not None:
+ json_dict['selective'] = self.selective
+ if self.input_field_placeholder:
+ json_dict['input_field_placeholder'] = self.input_field_placeholder
+ if self.is_persistent is not None:
+ json_dict['is_persistent'] = self.is_persistent
+ return json.dumps(json_dict)
+
+
+# noinspection PyShadowingBuiltins
+class KeyboardButtonPollType(Dictionaryable):
+ """
+ This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#keyboardbuttonpolltype
+
+ :param type: Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.
+ :type type: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.KeyboardButtonPollType`
+ """
+ def __init__(self, type=None):
+ self.type: str = type
+
+ def to_dict(self):
+ return {'type': self.type}
+
+
+class KeyboardButtonRequestUsers(Dictionaryable):
+ """
+ This object defines the criteria used to request a suitable user.
+ The identifier of the selected user will be shared with the bot when the corresponding button is pressed.
+
+ Telegram documentation: https://core.telegram.org/bots/api#keyboardbuttonrequestusers
+
+ :param request_id: Signed 32-bit identifier of the request, which will be received back in the UsersShared object.
+ Must be unique within the message
+ :type request_id: :obj:`int`
+
+ :param user_is_bot: Optional. Pass True to request a bot, pass False to request a regular user.
+ If not specified, no additional restrictions are applied.
+ :type user_is_bot: :obj:`bool`
+
+ :param user_is_premium: Optional. Pass True to request a premium user, pass False to request a non-premium user.
+ If not specified, no additional restrictions are applied.
+ :type user_is_premium: :obj:`bool`
+
+ :param max_quantity: Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
+ :type max_quantity: :obj:`int`
+
+ :param request_name: Optional. Request name
+ :type request_name: :obj:`bool`
+
+ :param request_username: Optional. Request username
+ :type request_username: :obj:`bool`
+
+ :param request_photo: Optional. Request photo
+ :type request_photo: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.KeyboardButtonRequestUsers`
+ """
+ def __init__(
+ self, request_id: int, user_is_bot: Optional[bool]=None, user_is_premium: Optional[bool]=None,
+ max_quantity: Optional[int]=None, request_name: Optional[bool]=None, request_username: Optional[bool]=None,
+ request_photo: Optional[bool]=None) -> None:
+ self.request_id: int = request_id
+ self.user_is_bot: Optional[bool] = user_is_bot
+ self.user_is_premium: Optional[bool] = user_is_premium
+ self.max_quantity: Optional[int] = max_quantity
+ self.request_name: Optional[bool] = request_name
+ self.request_username: Optional[bool] = request_username
+ self.request_photo: Optional[bool] = request_photo
+
+ def to_dict(self) -> dict:
+ data = {'request_id': self.request_id}
+ if self.user_is_bot is not None:
+ data['user_is_bot'] = self.user_is_bot
+ if self.user_is_premium is not None:
+ data['user_is_premium'] = self.user_is_premium
+ if self.max_quantity is not None:
+ data['max_quantity'] = self.max_quantity
+ if self.request_name is not None:
+ data['request_name'] = self.request_name
+ if self.request_username is not None:
+ data['request_username'] = self.request_username
+ if self.request_photo is not None:
+ data['request_photo'] = self.request_photo
+ return data
+
+
+class KeyboardButtonRequestUser(KeyboardButtonRequestUsers):
+ """Deprecated. Use KeyboardButtonRequestUsers instead."""
+ def __init__(
+ self, request_id: int, user_is_bot: Optional[bool]=None, user_is_premium: Optional[bool]=None,
+ max_quantity: Optional[int]=None) -> None:
+ log_deprecation_warning('The class "KeyboardButtonRequestUser" is deprecated, use "KeyboardButtonRequestUsers" instead')
+ super().__init__(request_id, user_is_bot=user_is_bot, user_is_premium=user_is_premium, max_quantity=max_quantity)
+
+
+class KeyboardButtonRequestChat(Dictionaryable):
+ """
+ This object defines the criteria used to request a suitable chat. The identifier of the selected chat will
+ be shared with the bot when the corresponding button is pressed.
+
+ Telegram documentation: https://core.telegram.org/bots/api#keyboardbuttonrequestchat
+
+ :param request_id: Signed 32-bit identifier of the request, which will be received back in the ChatShared object.
+ Must be unique within the message
+ :type request_id: :obj:`int`
+
+ :param chat_is_channel: Pass True to request a channel chat, pass False to request a group or a supergroup chat.
+ :type chat_is_channel: :obj:`bool`
+
+ :param chat_is_forum: Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat.
+ If not specified, no additional restrictions are applied.
+ :type chat_is_forum: :obj:`bool`
+
+ :param chat_has_username: Optional. Pass True to request a supergroup or a channel with a username, pass False to request a
+ chat without a username. If not specified, no additional restrictions are applied.
+ :type chat_has_username: :obj:`bool`
+
+ :param chat_is_created: Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied.
+ :type chat_is_created: :obj:`bool`
+
+ :param user_administrator_rights: Optional. A JSON-serialized object listing the required administrator rights of the user in the chat.
+ The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.
+ :type user_administrator_rights: :class:`telebot.types.ChatAdministratorRights`
+
+ :param bot_administrator_rights: Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat.
+ The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.
+ :type bot_administrator_rights: :class:`telebot.types.ChatAdministratorRights`
+
+ :param bot_is_member: Optional. Pass True to request a chat where the bot is a member. Otherwise, no additional restrictions are applied.
+ :type bot_is_member: :obj:`bool`
+
+ :param request_title: Optional. Request title
+ :type request_title: :obj:`bool`
+
+ :param request_photo: Optional. Request photo
+ :type request_photo: :obj:`bool`
+
+ :param request_username: Optional. Request username
+ :type request_username: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.KeyboardButtonRequestChat`
+ """
+
+ def __init__(self, request_id: int, chat_is_channel: bool, chat_is_forum: Optional[bool]=None,
+ chat_has_username: Optional[bool]=None, chat_is_created: Optional[bool]=None,
+ user_administrator_rights: Optional[ChatAdministratorRights]=None,
+ bot_administrator_rights: Optional[ChatAdministratorRights]=None, bot_is_member: Optional[bool]=None,
+ request_title: Optional[bool]=None, request_photo: Optional[bool]=None, request_username: Optional[bool]=None):
+ self.request_id: int = request_id
+ self.chat_is_channel: bool = chat_is_channel
+ self.chat_is_forum: Optional[bool] = chat_is_forum
+ self.chat_has_username: Optional[bool] = chat_has_username
+ self.chat_is_created: Optional[bool] = chat_is_created
+ self.user_administrator_rights: Optional[ChatAdministratorRights] = user_administrator_rights
+ self.bot_administrator_rights: Optional[ChatAdministratorRights] = bot_administrator_rights
+ self.bot_is_member: Optional[bool] = bot_is_member
+ self.request_title: Optional[bool] = request_title
+ self.request_photo: Optional[bool] = request_photo
+ self.request_username: Optional[bool] = request_username
+
+
+ def to_dict(self) -> dict:
+ data = {'request_id': self.request_id, 'chat_is_channel': self.chat_is_channel}
+ if self.chat_is_forum is not None:
+ data['chat_is_forum'] = self.chat_is_forum
+ if self.chat_has_username is not None:
+ data['chat_has_username'] = self.chat_has_username
+ if self.chat_is_created is not None:
+ data['chat_is_created'] = self.chat_is_created
+ if self.user_administrator_rights is not None:
+ data['user_administrator_rights'] = self.user_administrator_rights.to_dict()
+ if self.bot_administrator_rights is not None:
+ data['bot_administrator_rights'] = self.bot_administrator_rights.to_dict()
+ if self.bot_is_member is not None:
+ data['bot_is_member'] = self.bot_is_member
+ if self.request_title is not None:
+ data['request_title'] = self.request_title
+ if self.request_photo is not None:
+ data['request_photo'] = self.request_photo
+ if self.request_username is not None:
+ data['request_username'] = self.request_username
+ return data
+
+
+
+class KeyboardButton(Dictionaryable, JsonSerializable):
+ """
+ This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#keyboardbutton
+
+ :param text: Text of the button. If none of the optional fields are used, it will be sent as a message when the button is
+ pressed
+ :type text: :obj:`str`
+
+ :param request_contact: Optional. If True, the user's phone number will be sent as a contact when the button is
+ pressed. Available in private chats only.
+ :type request_contact: :obj:`bool`
+
+ :param request_location: Optional. If True, the user's current location will be sent when the button is pressed.
+ Available in private chats only.
+ :type request_location: :obj:`bool`
+
+ :param request_poll: Optional. If specified, the user will be asked to create a poll and send it to the bot when the
+ button is pressed. Available in private chats only.
+ :type request_poll: :class:`telebot.types.KeyboardButtonPollType`
+
+ :param web_app: Optional. If specified, the described Web App will be launched when the button is pressed. The Web App
+ will be able to send a “web_app_data” service message. Available in private chats only.
+ :type web_app: :class:`telebot.types.WebAppInfo`
+
+ :param request_user: deprecated
+ :type request_user: :class:`telebot.types.KeyboardButtonRequestUser`
+
+ :param request_users: Optional. If specified, pressing the button will open a list of suitable users.
+ Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.
+ :type request_users: :class:`telebot.types.KeyboardButtonRequestUsers`
+
+ :param request_chat: Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will
+ send its identifier to the bot in a “chat_shared” service message. Available in private chats only.
+ :type request_chat: :class:`telebot.types.KeyboardButtonRequestChat`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.KeyboardButton`
+ """
+ def __init__(self, text: str, request_contact: Optional[bool]=None,
+ request_location: Optional[bool]=None, request_poll: Optional[KeyboardButtonPollType]=None,
+ web_app: Optional[WebAppInfo]=None, request_user: Optional[KeyboardButtonRequestUser]=None,
+ request_chat: Optional[KeyboardButtonRequestChat]=None, request_users: Optional[KeyboardButtonRequestUsers]=None):
+ self.text: str = text
+ self.request_contact: Optional[bool] = request_contact
+ self.request_location: Optional[bool] = request_location
+ self.request_poll: Optional[KeyboardButtonPollType] = request_poll
+ self.web_app: Optional[WebAppInfo] = web_app
+ self.request_chat: Optional[KeyboardButtonRequestChat] = request_chat
+ self.request_users: Optional[KeyboardButtonRequestUsers] = request_users
+ if request_user is not None:
+ log_deprecation_warning('The parameter "request_user" is deprecated, use "request_users" instead')
+ if self.request_users is None:
+ # noinspection PyTypeChecker
+ self.request_users = request_user
+
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ json_dict = {'text': self.text}
+ if self.request_contact is not None:
+ json_dict['request_contact'] = self.request_contact
+ if self.request_location is not None:
+ json_dict['request_location'] = self.request_location
+ if self.request_poll is not None:
+ json_dict['request_poll'] = self.request_poll.to_dict()
+ if self.web_app is not None:
+ json_dict['web_app'] = self.web_app.to_dict()
+ if self.request_users is not None:
+ json_dict['request_users'] = self.request_users.to_dict()
+ if self.request_chat is not None:
+ json_dict['request_chat'] = self.request_chat.to_dict()
+ return json_dict
+
+
+class InlineKeyboardMarkup(Dictionaryable, JsonSerializable, JsonDeserializable):
+ """
+ This object represents an inline keyboard that appears right next to the message it belongs to.
+
+ .. note::
+ It is recommended to use :meth:`telebot.util.quick_markup` instead.
+
+ .. code-block:: python3
+ :caption: Example of a custom keyboard with buttons.
+
+ from telebot.util import quick_markup
+
+ markup = quick_markup({
+ 'Twitter': {'url': 'https://twitter.com'},
+ 'Facebook': {'url': 'https://facebook.com'},
+ 'Back': {'callback_data': 'whatever'}
+ }, row_width=2)
+ # returns an InlineKeyboardMarkup with two buttons in a row, one leading to Twitter, the other to facebook
+ # and a back button below
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinekeyboardmarkup
+
+ :param keyboard: :obj:`list` of button rows, each represented by an :obj:`list` of
+ :class:`telebot.types.InlineKeyboardButton` objects
+ :type keyboard: :obj:`list` of :obj:`list` of :class:`telebot.types.InlineKeyboardButton`
+
+ :param row_width: number of :class:`telebot.types.InlineKeyboardButton` objects on each row
+ :type row_width: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineKeyboardMarkup`
+ """
+ max_row_keys = 8
+
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ keyboard = [[InlineKeyboardButton.de_json(button) for button in row] for row in obj['inline_keyboard']]
+ return cls(keyboard = keyboard)
+
+ def __init__(self, keyboard=None, row_width=3):
+ if row_width > self.max_row_keys:
+ # Todo: Will be replaced with Exception in future releases
+ logger.error('Telegram does not support inline keyboard row width over %d.' % self.max_row_keys)
+ row_width = self.max_row_keys
+
+ self.row_width: int = row_width
+ self.keyboard: List[List[InlineKeyboardButton]] = keyboard or []
+
+ def add(self, *args, row_width=None) -> 'InlineKeyboardMarkup':
+ """
+ This method adds buttons to the keyboard without exceeding row_width.
+
+ E.g. InlineKeyboardMarkup.add("A", "B", "C") yields the json result:
+ {keyboard: [["A"], ["B"], ["C"]]}
+ when row_width is set to 1.
+ When row_width is set to 2, the result:
+ {keyboard: [["A", "B"], ["C"]]}
+ See https://core.telegram.org/bots/api#inlinekeyboardmarkup
+
+ :param args: Array of InlineKeyboardButton to append to the keyboard
+ :type args: :obj:`list` of :class:`telebot.types.InlineKeyboardButton`
+
+ :param row_width: width of row
+ :type row_width: :obj:`int`
+
+ :return: self, to allow function chaining.
+ :rtype: :class:`telebot.types.InlineKeyboardMarkup`
+ """
+ if row_width is None:
+ row_width = self.row_width
+
+ if row_width > self.max_row_keys:
+ # Todo: Will be replaced with Exception in future releases
+ logger.error('Telegram does not support inline keyboard row width over %d.' % self.max_row_keys)
+ row_width = self.max_row_keys
+
+ for row in service_utils.chunks(args, row_width):
+ button_array = [button for button in row]
+ self.keyboard.append(button_array)
+
+ return self
+
+ def row(self, *args) -> 'InlineKeyboardMarkup':
+ """
+ Adds a list of InlineKeyboardButton to the keyboard.
+ This method does not consider row_width.
+
+ InlineKeyboardMarkup.row("A").row("B", "C").to_json() outputs:
+ '{keyboard: [["A"], ["B", "C"]]}'
+ See https://core.telegram.org/bots/api#inlinekeyboardmarkup
+
+ :param args: Array of InlineKeyboardButton to append to the keyboard
+ :type args: :obj:`list` of :class:`telebot.types.InlineKeyboardButton`
+
+ :return: self, to allow function chaining.
+ :rtype: :class:`telebot.types.InlineKeyboardMarkup`
+ """
+
+ return self.add(*args, row_width=self.max_row_keys)
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ json_dict = dict()
+ json_dict['inline_keyboard'] = [[button.to_dict() for button in row] for row in self.keyboard]
+ return json_dict
+
+
+class InlineKeyboardButton(Dictionaryable, JsonSerializable, JsonDeserializable):
+ """
+ This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinekeyboardbutton
+
+ :param text: Label text on the button
+ :type text: :obj:`str`
+
+ :param url: Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id= can be
+ used to mention a user by their ID without using a username, if this is allowed by their privacy settings.
+ :type url: :obj:`str`
+
+ :param callback_data: Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
+ :type callback_data: :obj:`str`
+
+ :param web_app: Optional. Description of the Web App that will be launched when the user presses the button. The Web
+ App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only
+ in private chats between a user and the bot.
+ :type web_app: :class:`telebot.types.WebAppInfo`
+
+ :param login_url: Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for
+ the Telegram Login Widget.
+ :type login_url: :class:`telebot.types.LoginUrl`
+
+ :param switch_inline_query: Optional. If set, pressing the button will prompt the user to select one of their chats,
+ open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which
+ case just the bot's username will be inserted.Note: This offers an easy way for users to start using your bot in inline
+ mode when they are currently in a private chat with it. Especially useful when combined with switch_pm… actions - in
+ this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.
+ :type switch_inline_query: :obj:`str`
+
+ :param switch_inline_query_current_chat: Optional. If set, pressing the button will insert the bot's username
+ and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username
+ will be inserted.This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting
+ something from multiple options.
+ :type switch_inline_query_current_chat: :obj:`str`
+
+ :param switch_inline_query_chosen_chat: Optional. If set, pressing the button will prompt the user to select one of their chats of the
+ specified type, open that chat and insert the bot's username and the specified inline query in the input field
+ :type switch_inline_query_chosen_chat: :class:`telebot.types.SwitchInlineQueryChosenChat`
+
+ :param callback_game: Optional. Description of the game that will be launched when the user presses the
+ button. NOTE: This type of button must always be the first button in the first row.
+ :type callback_game: :class:`telebot.types.CallbackGame`
+
+ :param pay: Optional. Specify True, to send a Pay button. NOTE: This type of button must always be the first button in
+ the first row and can only be used in invoice messages.
+ :type pay: :obj:`bool`
+
+ :param copy_text: Optional. Description of the button that copies the specified text to the clipboard.
+ :type copy_text: :class:`telebot.types.CopyTextButton`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineKeyboardButton`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if 'login_url' in obj:
+ obj['login_url'] = LoginUrl.de_json(obj.get('login_url'))
+ if 'web_app' in obj:
+ obj['web_app'] = WebAppInfo.de_json(obj.get('web_app'))
+ if 'switch_inline_query_chosen_chat' in obj:
+ obj['switch_inline_query_chosen_chat'] = SwitchInlineQueryChosenChat.de_json(obj.get('switch_inline_query_chosen_chat'))
+ if 'copy_text' in obj:
+ obj['copy_text'] = CopyTextButton.de_json(obj.get('copy_text'))
+
+ return cls(**obj)
+
+ def __init__(self, text: str, url: Optional[str]=None, callback_data: Optional[str]=None, web_app: Optional[WebAppInfo]=None,
+ switch_inline_query: Optional[str]=None, switch_inline_query_current_chat: Optional[str]=None,
+ switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat]=None, callback_game=None, pay: Optional[bool]=None,
+ login_url: Optional[LoginUrl]=None, copy_text: Optional[CopyTextButton]=None, **kwargs):
+ self.text: str = text
+ self.url: Optional[str] = url
+ self.callback_data: Optional[str] = callback_data
+ self.web_app: Optional[WebAppInfo] = web_app
+ self.switch_inline_query: Optional[str] = switch_inline_query
+ self.switch_inline_query_current_chat: Optional[str] = switch_inline_query_current_chat
+ self.switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = switch_inline_query_chosen_chat
+ self.callback_game = callback_game # Not Implemented
+ self.pay: Optional[bool] = pay
+ self.login_url: Optional[LoginUrl] = login_url
+ self.copy_text: Optional[CopyTextButton] = copy_text
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ json_dict = {'text': self.text}
+ if self.url:
+ json_dict['url'] = self.url
+ if self.callback_data:
+ json_dict['callback_data'] = self.callback_data
+ if self.web_app:
+ json_dict['web_app'] = self.web_app.to_dict()
+ if self.switch_inline_query is not None:
+ json_dict['switch_inline_query'] = self.switch_inline_query
+ if self.switch_inline_query_current_chat is not None:
+ json_dict['switch_inline_query_current_chat'] = self.switch_inline_query_current_chat
+ if self.callback_game is not None:
+ json_dict['callback_game'] = self.callback_game
+ if self.pay is not None:
+ json_dict['pay'] = self.pay
+ if self.login_url is not None:
+ json_dict['login_url'] = self.login_url.to_dict()
+ if self.switch_inline_query_chosen_chat is not None:
+ json_dict['switch_inline_query_chosen_chat'] = self.switch_inline_query_chosen_chat.to_dict()
+ if self.copy_text is not None:
+ json_dict['copy_text'] = self.copy_text.to_dict()
+ return json_dict
+
+
+class LoginUrl(Dictionaryable, JsonSerializable, JsonDeserializable):
+ """
+ This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
+
+ Telegram Documentation: https://core.telegram.org/bots/api#loginurl
+
+ :param url: An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed.
+ If the user refuses to provide authorization data, the original URL without information about the user will be
+ opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash
+ of the received data to verify the authentication and the integrity of the data as described in Checking
+ authorization.
+ :type url: :obj:`str`
+
+ :param forward_text: Optional. New text of the button in forwarded messages.
+ :type forward_text: :obj:`str`
+
+ :param bot_username: Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for
+ more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the
+ domain linked with the bot. See Linking your domain to the bot for more details.
+ :type bot_username: :obj:`str`
+
+ :param request_write_access: Optional. Pass True to request the permission for your bot to send messages to the
+ user.
+ :type request_write_access: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.LoginUrl`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, url: str, forward_text: Optional[str]=None, bot_username: Optional[str]=None, request_write_access: Optional[bool]=None,
+ **kwargs):
+ self.url: str = url
+ self.forward_text: Optional[str] = forward_text
+ self.bot_username: Optional[str] = bot_username
+ self.request_write_access: Optional[bool] = request_write_access
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ json_dict = {'url': self.url}
+ if self.forward_text:
+ json_dict['forward_text'] = self.forward_text
+ if self.bot_username:
+ json_dict['bot_username'] = self.bot_username
+ if self.request_write_access is not None:
+ json_dict['request_write_access'] = self.request_write_access
+ return json_dict
+
+
+# noinspection PyShadowingBuiltins
+class CallbackQuery(JsonDeserializable):
+ """
+ This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#callbackquery
+
+ :param id: Unique identifier for this query
+ :type id: :obj:`str`
+
+ :param from_user: Sender
+ :type from_user: :class:`telebot.types.User`
+
+ :param message: Optional. Message sent by the bot with the callback button that originated the query
+ :type message: :class:`telebot.types.Message` or :class:`telebot.types.InaccessibleMessage`
+
+ :param inline_message_id: Optional. Identifier of the message sent via the bot in inline mode, that originated the
+ query.
+ :type inline_message_id: :obj:`str`
+
+ :param chat_instance: Global identifier, uniquely corresponding to the chat to which the message with the callback
+ button was sent. Useful for high scores in games.
+ :type chat_instance: :obj:`str`
+
+ :param data: Optional. Data associated with the callback button. Be aware that the message originated the query can
+ contain no callback buttons with this data.
+ :type data: :obj:`str`
+
+ :param game_short_name: Optional. Short name of a Game to be returned, serves as the unique identifier for the game
+ :type game_short_name: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.CallbackQuery`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if not "data" in obj:
+ # "data" field is Optional in the API, but historically is mandatory in the class constructor
+ obj['data'] = None
+ obj['from_user'] = User.de_json(obj.pop('from'))
+ if 'message' in obj:
+ message = obj['message']
+ if message['date'] == 0:
+ # date. Always 0. The field can be used to differentiate regular and inaccessible messages.
+ obj['message'] = InaccessibleMessage.de_json(message)
+ else:
+ obj['message'] = Message.de_json(message)
+ obj['json_string'] = json_string
+ return cls(**obj)
+
+ def __init__(
+ self, id, from_user, data, chat_instance, json_string, message=None, inline_message_id=None,
+ game_short_name=None, **kwargs):
+ self.id: int = id
+ self.from_user: User = from_user
+ self.message: Union[Message, InaccessibleMessage] = message
+ self.inline_message_id: Optional[str] = inline_message_id
+ self.chat_instance: Optional[str] = chat_instance
+ self.data: Optional[str] = data
+ self.game_short_name: Optional[str] = game_short_name
+ self.json = json_string
+
+
+class ChatPhoto(JsonDeserializable):
+ """
+ This object represents a chat photo.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#chatphoto
+
+ :param small_file_id: File identifier of small (160x160) chat photo. This file_id can be used only for photo
+ download and only for as long as the photo is not changed.
+ :type small_file_id: :obj:`str`
+
+ :param small_file_unique_id: Unique file identifier of small (160x160) chat photo, which is supposed to be the same
+ over time and for different bots. Can't be used to download or reuse the file.
+ :type small_file_unique_id: :obj:`str`
+
+ :param big_file_id: File identifier of big (640x640) chat photo. This file_id can be used only for photo download and
+ only for as long as the photo is not changed.
+ :type big_file_id: :obj:`str`
+
+ :param big_file_unique_id: Unique file identifier of big (640x640) chat photo, which is supposed to be the same over
+ time and for different bots. Can't be used to download or reuse the file.
+ :type big_file_unique_id: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatPhoto`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, small_file_id, small_file_unique_id, big_file_id, big_file_unique_id, **kwargs):
+ self.small_file_id: str = small_file_id
+ self.small_file_unique_id: str = small_file_unique_id
+ self.big_file_id: str = big_file_id
+ self.big_file_unique_id: str = big_file_unique_id
+
+
+class ChatMember(JsonDeserializable, ABC):
+ """
+ This object contains information about one member of a chat.
+ Currently, the following 6 types of chat members are supported:
+
+ * :class:`telebot.types.ChatMemberOwner`
+ * :class:`telebot.types.ChatMemberAdministrator`
+ * :class:`telebot.types.ChatMemberMember`
+ * :class:`telebot.types.ChatMemberRestricted`
+ * :class:`telebot.types.ChatMemberLeft`
+ * :class:`telebot.types.ChatMemberBanned`
+
+ Telegram Documentation: https://core.telegram.org/bots/api#chatmember
+ """
+
+ def __init__(self, user, status, **kwargs):
+ self.user: User = user
+ self.status: str = status
+
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ obj['user'] = User.de_json(obj['user'])
+ status = obj['status']
+ # Ordered according to estimated appearance frequency.
+ if status == "member":
+ return ChatMemberMember(**obj)
+ elif status == "left":
+ return ChatMemberLeft(**obj)
+ elif status == "kicked":
+ return ChatMemberBanned(**obj)
+ elif status == "restricted":
+ return ChatMemberRestricted(**obj)
+ elif status == "administrator":
+ return ChatMemberAdministrator(**obj)
+ elif status == "creator":
+ return ChatMemberOwner(**obj)
+ else:
+ raise ValueError(f"Unknown chat member type: {status}.")
+
+
+# noinspection PyUnresolvedReferences
+class ChatMemberOwner(ChatMember):
+ """
+ Represents a chat member that owns the chat and has all administrator privileges.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#chatmemberowner
+
+ :param status: The member's status in the chat, always “creator”
+ :type status: :obj:`str`
+
+ :param user: Information about the user
+ :type user: :class:`telebot.types.User`
+
+ :param is_anonymous: True, if the user's presence in the chat is hidden
+ :type is_anonymous: :obj:`bool`
+
+ :param custom_title: Optional. Custom title for this user
+ :type custom_title: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatMemberOwner`
+ """
+ def __init__(self, user, status, is_anonymous, custom_title=None, **kwargs):
+ super().__init__(user, status, **kwargs)
+ self.is_anonymous: bool = is_anonymous
+ self.custom_title: Optional[str] = custom_title
+
+
+# noinspection PyUnresolvedReferences
+class ChatMemberAdministrator(ChatMember):
+ """
+ Represents a chat member that has some additional privileges.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#chatmemberadministrator
+
+ :param status: The member's status in the chat, always “administrator”
+ :type status: :obj:`str`
+
+ :param user: Information about the user
+ :type user: :class:`telebot.types.User`
+
+ :param can_be_edited: True, if the bot is allowed to edit administrator privileges of that user
+ :type can_be_edited: :obj:`bool`
+
+ :param is_anonymous: True, if the user's presence in the chat is hidden
+ :type is_anonymous: :obj:`bool`
+
+ :param can_manage_chat: True, if the administrator can access the chat event log, chat statistics, message
+ statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode.
+ Implied by any other administrator privilege
+ :type can_manage_chat: :obj:`bool`
+
+ :param can_delete_messages: True, if the administrator can delete messages of other users
+ :type can_delete_messages: :obj:`bool`
+
+ :param can_manage_video_chats: True, if the administrator can manage video chats
+ :type can_manage_video_chats: :obj:`bool`
+
+ :param can_restrict_members: True, if the administrator can restrict, ban or unban chat members
+ :type can_restrict_members: :obj:`bool`
+
+ :param can_promote_members: True, if the administrator can add new administrators with a subset of their own
+ privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that
+ were appointed by the user)
+ :type can_promote_members: :obj:`bool`
+
+ :param can_change_info: True, if the user is allowed to change the chat title, photo and other settings
+ :type can_change_info: :obj:`bool`
+
+ :param can_invite_users: True, if the user is allowed to invite new users to the chat
+ :type can_invite_users: :obj:`bool`
+
+ :param can_post_stories: True, if the administrator can post channel stories
+ :type can_post_stories: :obj:`bool`
+
+ :param can_edit_stories: True, if the administrator can edit stories
+ :type can_edit_stories: :obj:`bool`
+
+ :param can_delete_stories: True, if the administrator can delete stories of other users
+ :type can_delete_stories: :obj:`bool`
+
+ :param can_post_messages: Optional. True, if the administrator can post in the channel; channels only
+ :type can_post_messages: :obj:`bool`
+
+ :param can_edit_messages: Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
+ :type can_edit_messages: :obj:`bool`
+
+ :param can_pin_messages: Optional. True, if the user is allowed to pin messages; groups and supergroups only
+ :type can_pin_messages: :obj:`bool`
+
+ :param can_manage_topics: Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
+ :type can_manage_topics: :obj:`bool`
+
+ :param can_manage_direct_messages: Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only
+ :type can_manage_direct_messages: :obj:`bool`
+
+ :param custom_title: Optional. Custom title for this user
+ :type custom_title: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatMemberAdministrator`
+ """
+ def __init__(self, user, status, can_be_edited, is_anonymous, can_manage_chat, can_delete_messages,
+ can_manage_video_chats, can_restrict_members, can_promote_members, can_change_info, can_invite_users,
+ can_post_stories, can_edit_stories, can_delete_stories, can_post_messages=None, can_edit_messages=None,
+ can_pin_messages=None, can_manage_topics=None, custom_title=None, can_manage_direct_messages=None, **kwargs):
+ super().__init__(user, status, **kwargs)
+ self.can_be_edited: bool = can_be_edited
+ self.is_anonymous: bool = is_anonymous
+ self.can_manage_chat: bool = can_manage_chat
+ self.can_delete_messages: bool = can_delete_messages
+ self.can_manage_video_chats: bool = can_manage_video_chats
+ self.can_restrict_members: bool = can_restrict_members
+ self.can_promote_members: bool = can_promote_members
+ self.can_change_info: bool = can_change_info
+ self.can_invite_users: bool = can_invite_users
+ self.can_post_stories: bool = can_post_stories
+ self.can_edit_stories: bool = can_edit_stories
+ self.can_delete_stories: bool = can_delete_stories
+ self.can_post_messages: Optional[bool] = can_post_messages
+ self.can_edit_messages: Optional[bool] = can_edit_messages
+ self.can_pin_messages: Optional[bool] = can_pin_messages
+ self.can_manage_topics: Optional[bool] = can_manage_topics
+ self.custom_title: Optional[str] = custom_title
+ self.can_manage_direct_messages: Optional[bool] = can_manage_direct_messages
+
+ @property
+ def can_manage_voice_chats(self):
+ log_deprecation_warning('The parameter "can_manage_voice_chats" is deprecated. Use "can_manage_video_chats" instead.')
+ return self.can_manage_video_chats
+
+
+# noinspection PyUnresolvedReferences
+class ChatMemberMember(ChatMember):
+ """
+ Represents a chat member that has no additional privileges or restrictions.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#chatmembermember
+
+ :param status: The member's status in the chat, always “member”
+ :type status: :obj:`str`
+
+ :param user: Information about the user
+ :type user: :class:`telebot.types.User`
+
+ :param until_date: Optional. Date when the user's subscription will expire; Unix time. If 0, then the user is a member forever
+ :type until_date: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatMemberMember`
+ """
+ def __init__(self, user, status, until_date=None, **kwargs):
+ super().__init__(user, status, **kwargs)
+ self.until_date: Optional[int] = until_date
+
+
+# noinspection PyUnresolvedReferences
+class ChatMemberRestricted(ChatMember):
+ """
+ Represents a chat member that is under certain restrictions in the chat. Supergroups only.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#chatmemberrestricted
+
+ :param status: The member's status in the chat, always “restricted”
+ :type status: :obj:`str`
+
+ :param user: Information about the user
+ :type user: :class:`telebot.types.User`
+
+ :param is_member: True, if the user is a member of the chat at the moment of the request
+ :type is_member: :obj:`bool`
+
+ :param can_send_messages: True, if the user is allowed to send text messages, contacts, locations and venues
+ :type can_send_messages: :obj:`bool`
+
+ :param can_send_audios: True, if the user is allowed to send audios
+ :type can_send_audios: :obj:`bool`
+
+ :param can_send_documents: True, if the user is allowed to send documents
+ :type can_send_documents: :obj:`bool`
+
+ :param can_send_photos: True, if the user is allowed to send photos
+ :type can_send_photos: :obj:`bool`
+
+ :param can_send_videos: True, if the user is allowed to send videos
+ :type can_send_videos: :obj:`bool`
+
+ :param can_send_video_notes: True, if the user is allowed to send video notes
+ :type can_send_video_notes: :obj:`bool`
+
+ :param can_send_voice_notes: True, if the user is allowed to send voice notes
+ :type can_send_voice_notes: :obj:`bool`
+
+ :param can_send_polls: True, if the user is allowed to send polls
+ :type can_send_polls: :obj:`bool`
+
+ :param can_send_other_messages: True, if the user is allowed to send animations, games, stickers and use inline bots
+ :type can_send_other_messages: :obj:`bool`
+
+ :param can_add_web_page_previews: True, if the user is allowed to add web page previews to their messages
+ :type can_add_web_page_previews: :obj:`bool`
+
+ :param can_change_info: True, if the user is allowed to change the chat title, photo and other settings
+ :type can_change_info: :obj:`bool`
+
+ :param can_invite_users: True, if the user is allowed to invite new users to the chat
+ :type can_invite_users: :obj:`bool`
+
+ :param can_pin_messages: True, if the user is allowed to pin messages
+ :type can_pin_messages: :obj:`bool`
+
+ :param can_manage_topics: True, if the user is allowed to create forum topics
+ :type can_manage_topics: :obj:`bool`
+
+ :param until_date: Date when restrictions will be lifted for this user; unix time. If 0, then the user is restricted forever
+ :type until_date: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatMemberRestricted`
+ """
+ def __init__(self, user, status, is_member, can_send_messages, can_send_audios, can_send_documents,
+ can_send_photos, can_send_videos, can_send_video_notes, can_send_voice_notes, can_send_polls,
+ can_send_other_messages, can_add_web_page_previews,
+ can_change_info, can_invite_users, can_pin_messages, can_manage_topics,
+ until_date=None, **kwargs):
+ super().__init__(user, status, **kwargs)
+ self.is_member: bool = is_member
+ self.can_send_messages: bool = can_send_messages
+ self.can_send_audios: bool = can_send_audios
+ self.can_send_documents: bool = can_send_documents
+ self.can_send_photos: bool = can_send_photos
+ self.can_send_videos: bool = can_send_videos
+ self.can_send_video_notes: bool = can_send_video_notes
+ self.can_send_voice_notes: bool = can_send_voice_notes
+ self.can_send_polls: bool = can_send_polls
+ self.can_send_other_messages: bool = can_send_other_messages
+ self.can_add_web_page_previews: bool = can_add_web_page_previews
+ self.can_change_info: bool = can_change_info
+ self.can_invite_users: bool = can_invite_users
+ self.can_pin_messages: bool = can_pin_messages
+ self.can_manage_topics: bool = can_manage_topics
+ self.until_date: Optional[int] = until_date
+
+
+# noinspection PyUnresolvedReferences
+class ChatMemberLeft(ChatMember):
+ """
+ Represents a chat member that isn't currently a member of the chat, but may join it themselves.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#chatmemberleft
+
+ :param status: The member's status in the chat, always “left”
+ :type status: :obj:`str`
+
+ :param user: Information about the user
+ :type user: :class:`telebot.types.User`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatMemberLeft`
+ """
+ pass
+
+
+# noinspection PyUnresolvedReferences
+class ChatMemberBanned(ChatMember):
+ """
+ Represents a chat member that was banned in the chat and can't return to the chat or view chat messages.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#chatmemberbanned
+
+ :param status: The member's status in the chat, always “kicked”
+ :type status: :obj:`str`
+
+ :param user: Information about the user
+ :type user: :class:`telebot.types.User`
+
+ :param until_date: Date when restrictions will be lifted for this user; unix time. If 0, then the user is banned forever
+ :type until_date: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatMemberBanned`
+ """
+ def __init__(self, user, status, until_date=None, **kwargs):
+ super().__init__(user, status, **kwargs)
+ self.until_date: Optional[int] = until_date
+
+
+class ChatPermissions(JsonDeserializable, JsonSerializable, Dictionaryable):
+ """
+ Describes actions that a non-administrator user is allowed to take in a chat.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#chatpermissions
+
+ :param can_send_messages: Optional. True, if the user is allowed to send text messages, contacts, locations and venues
+ :type can_send_messages: :obj:`bool`
+
+ :param can_send_audios: Optional. True, if the user is allowed to send audios
+ :type can_send_audios: :obj:`bool`
+
+ :param can_send_documents: Optional. True, if the user is allowed to send documents
+ :type can_send_documents: :obj:`bool`
+
+ :param can_send_photos: Optional. True, if the user is allowed to send photos
+ :type can_send_photos: :obj:`bool`
+
+ :param can_send_videos: Optional. True, if the user is allowed to send videos
+ :type can_send_videos: :obj:`bool`
+
+ :param can_send_video_notes: Optional. True, if the user is allowed to send video notes
+ :type can_send_video_notes: :obj:`bool`
+
+ :param can_send_voice_notes: Optional. True, if the user is allowed to send voice notes
+ :type can_send_voice_notes: :obj:`bool`
+
+ :param can_send_polls: Optional. True, if the user is allowed to send polls, implies can_send_messages
+ :type can_send_polls: :obj:`bool`
+
+ :param can_send_other_messages: Optional. True, if the user is allowed to send animations, games, stickers and use
+ inline bots
+ :type can_send_other_messages: :obj:`bool`
+
+ :param can_add_web_page_previews: Optional. True, if the user is allowed to add web page previews to their
+ messages
+ :type can_add_web_page_previews: :obj:`bool`
+
+ :param can_change_info: Optional. True, if the user is allowed to change the chat title, photo and other settings.
+ Ignored in public supergroups
+ :type can_change_info: :obj:`bool`
+
+ :param can_invite_users: Optional. True, if the user is allowed to invite new users to the chat
+ :type can_invite_users: :obj:`bool`
+
+ :param can_pin_messages: Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
+ :type can_pin_messages: :obj:`bool`
+
+ :param can_manage_topics: Optional. True, if the user is allowed to create forum topics. If omitted defaults to the
+ value of can_pin_messages
+ :type can_manage_topics: :obj:`bool`
+
+ :param can_send_media_messages: deprecated.
+ :type can_send_media_messages: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChatPermissions`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj, de_json = True)
+
+ def __init__(self, can_send_messages=None, can_send_media_messages=None,can_send_audios=None,
+ can_send_documents=None, can_send_photos=None,
+ can_send_videos=None, can_send_video_notes=None,
+ can_send_voice_notes=None, can_send_polls=None, can_send_other_messages=None,
+ can_add_web_page_previews=None, can_change_info=None,
+ can_invite_users=None, can_pin_messages=None,
+ can_manage_topics=None, **kwargs):
+ self.can_send_messages: Optional[bool] = can_send_messages
+ self.can_send_polls: Optional[bool] = can_send_polls
+ self.can_send_other_messages: Optional[bool] = can_send_other_messages
+ self.can_add_web_page_previews: Optional[bool] = can_add_web_page_previews
+ self.can_change_info: Optional[bool] = can_change_info
+ self.can_invite_users: Optional[bool] = can_invite_users
+ self.can_pin_messages: Optional[bool] = can_pin_messages
+ self.can_manage_topics: Optional[bool] = can_manage_topics
+ self.can_send_audios: Optional[bool] = can_send_audios
+ self.can_send_documents: Optional[bool] = can_send_documents
+ self.can_send_photos: Optional[bool] = can_send_photos
+ self.can_send_videos: Optional[bool] = can_send_videos
+ self.can_send_video_notes: Optional[bool] = can_send_video_notes
+ self.can_send_voice_notes: Optional[bool] = can_send_voice_notes
+
+ if kwargs.get("de_json", False) and can_send_media_messages is not None:
+ # Telegram passes can_send_media_messages in Chat.permissions. Temporary created parameter "de_json" allows avoid
+ # deprection warning and individual parameters overriding.
+ log_deprecation_warning('The parameter "can_send_media_messages" is deprecated. Use individual parameters like "can_send_audios", "can_send_documents" etc.')
+ self.can_send_audios: Optional[bool] = can_send_media_messages
+ self.can_send_documents: Optional[bool] = can_send_media_messages
+ self.can_send_photos: Optional[bool] = can_send_media_messages
+ self.can_send_videos: Optional[bool] = can_send_media_messages
+ self.can_send_video_notes: Optional[bool] = can_send_media_messages
+ self.can_send_voice_notes: Optional[bool] = can_send_media_messages
+
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ json_dict = dict()
+ if self.can_send_messages is not None:
+ json_dict['can_send_messages'] = self.can_send_messages
+ if self.can_send_audios is not None:
+ json_dict['can_send_audios'] = self.can_send_audios
+
+ if self.can_send_documents is not None:
+ json_dict['can_send_documents'] = self.can_send_documents
+ if self.can_send_photos is not None:
+ json_dict['can_send_photos'] = self.can_send_photos
+ if self.can_send_videos is not None:
+ json_dict['can_send_videos'] = self.can_send_videos
+ if self.can_send_video_notes is not None:
+ json_dict['can_send_video_notes'] = self.can_send_video_notes
+ if self.can_send_voice_notes is not None:
+ json_dict['can_send_voice_notes'] = self.can_send_voice_notes
+ if self.can_send_polls is not None:
+ json_dict['can_send_polls'] = self.can_send_polls
+ if self.can_send_other_messages is not None:
+ json_dict['can_send_other_messages'] = self.can_send_other_messages
+ if self.can_add_web_page_previews is not None:
+ json_dict['can_add_web_page_previews'] = self.can_add_web_page_previews
+ if self.can_change_info is not None:
+ json_dict['can_change_info'] = self.can_change_info
+ if self.can_invite_users is not None:
+ json_dict['can_invite_users'] = self.can_invite_users
+ if self.can_pin_messages is not None:
+ json_dict['can_pin_messages'] = self.can_pin_messages
+ if self.can_manage_topics is not None:
+ json_dict['can_manage_topics'] = self.can_manage_topics
+
+ return json_dict
+
+
+class BotCommand(JsonSerializable, JsonDeserializable, Dictionaryable):
+ """
+ This object represents a bot command.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#botcommand
+
+ :param command: Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and
+ underscores.
+ :type command: :obj:`str`
+
+ :param description: Description of the command; 1-256 characters.
+ :type description: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.BotCommand`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, command, description, **kwargs):
+ self.command: str = command
+ self.description: str = description
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ return {'command': self.command, 'description': self.description}
+
+
+# BotCommandScopes
+
+# noinspection PyShadowingBuiltins
+class BotCommandScope(ABC, JsonSerializable):
+ """
+ This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:
+
+ * :class:`BotCommandScopeDefault`
+ * :class:`BotCommandScopeAllPrivateChats`
+ * :class:`BotCommandScopeAllGroupChats`
+ * :class:`BotCommandScopeAllChatAdministrators`
+ * :class:`BotCommandScopeChat`
+ * :class:`BotCommandScopeChatAdministrators`
+ * :class:`BotCommandScopeChatMember`
+
+ Determining list of commands
+ The following algorithm is used to determine the list of commands for a particular user viewing the bot menu. The first list of commands which is set is returned:
+
+ Commands in the chat with the bot:
+
+ * :class:`BotCommandScopeChat` + language_code
+ * :class:`BotCommandScopeChat`
+ * :class:`BotCommandScopeAllPrivateChats` + language_code
+ * :class:`BotCommandScopeAllPrivateChats`
+ * :class:`BotCommandScopeDefault` + language_code
+ * :class:`BotCommandScopeDefault`
+
+ Commands in group and supergroup chats:
+
+ * :class:`BotCommandScopeChatMember` + language_code
+ * :class:`BotCommandScopeChatMember`
+ * :class:`BotCommandScopeChatAdministrators` + language_code (administrators only)
+ * :class:`BotCommandScopeChatAdministrators` (administrators only)
+ * :class:`BotCommandScopeChat` + language_code
+ * :class:`BotCommandScopeChat`
+ * :class:`BotCommandScopeAllChatAdministrators` + language_code (administrators only)
+ * :class:`BotCommandScopeAllChatAdministrators` (administrators only)
+ * :class:`BotCommandScopeAllGroupChats` + language_code
+ * :class:`BotCommandScopeAllGroupChats`
+ * :class:`BotCommandScopeDefault` + language_code
+ * :class:`BotCommandScopeDefault`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.BotCommandScope`
+ """
+ def __init__(self, type='default', chat_id=None, user_id=None):
+ self.type: str = type
+ self.chat_id: Optional[Union[int, str]] = chat_id
+ self.user_id: Optional[Union[int, str]] = user_id
+
+ def to_json(self):
+ json_dict = {'type': self.type}
+ if self.chat_id:
+ json_dict['chat_id'] = self.chat_id
+ if self.user_id:
+ json_dict['user_id'] = self.user_id
+ return json.dumps(json_dict)
+
+
+# noinspection PyUnresolvedReferences
+class BotCommandScopeDefault(BotCommandScope):
+ """
+ Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#botcommandscopedefault
+
+ :param type: Scope type, must be default
+ :type type: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.BotCommandScopeDefault`
+ """
+ def __init__(self):
+ """
+ Represents the default scope of bot commands.
+ Default commands are used if no commands with a narrower scope are specified for the user.
+ """
+ super(BotCommandScopeDefault, self).__init__(type='default')
+
+
+# noinspection PyUnresolvedReferences
+class BotCommandScopeAllPrivateChats(BotCommandScope):
+ """
+ Represents the scope of bot commands, covering all private chats.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#botcommandscopeallprivatechats
+
+ :param type: Scope type, must be all_private_chats
+ :type type: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.BotCommandScopeAllPrivateChats`
+ """
+ def __init__(self):
+ """
+ Represents the scope of bot commands, covering all private chats.
+ """
+ super(BotCommandScopeAllPrivateChats, self).__init__(type='all_private_chats')
+
+
+# noinspection PyUnresolvedReferences
+class BotCommandScopeAllGroupChats(BotCommandScope):
+ """
+ Represents the scope of bot commands, covering all group and supergroup chats.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#botcommandscopeallgroupchats
+
+ :param type: Scope type, must be all_group_chats
+ :type type: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.BotCommandScopeAllGroupChats`
+ """
+ def __init__(self):
+ """
+ Represents the scope of bot commands, covering all group and supergroup chats.
+ """
+ super(BotCommandScopeAllGroupChats, self).__init__(type='all_group_chats')
+
+
+# noinspection PyUnresolvedReferences
+class BotCommandScopeAllChatAdministrators(BotCommandScope):
+ """
+ Represents the scope of bot commands, covering all group and supergroup chat administrators.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#botcommandscopeallchatadministrators
+
+ :param type: Scope type, must be all_chat_administrators
+ :type type: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.BotCommandScopeAllChatAdministrators`
+ """
+ def __init__(self):
+ """
+ Represents the scope of bot commands, covering all group and supergroup chat administrators.
+ """
+ super(BotCommandScopeAllChatAdministrators, self).__init__(type='all_chat_administrators')
+
+
+# noinspection PyUnresolvedReferences
+class BotCommandScopeChat(BotCommandScope):
+ """
+ Represents the scope of bot commands, covering a specific chat.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#botcommandscopechat
+
+ :param type: Scope type, must be chat
+ :type type: :obj:`str`
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format
+ @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.BotCommandScopeChat`
+ """
+ def __init__(self, chat_id: Optional[Union[str, int]]=None):
+ super(BotCommandScopeChat, self).__init__(type='chat', chat_id=chat_id)
+
+
+# noinspection PyUnresolvedReferences
+class BotCommandScopeChatAdministrators(BotCommandScope):
+ """
+ Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#botcommandscopechatadministrators
+
+ :param type: Scope type, must be chat_administrators
+ :type type: :obj:`str`
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format
+ @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.BotCommandScopeChatAdministrators`
+ """
+ def __init__(self, chat_id: Optional[Union[str, int]]=None):
+ super(BotCommandScopeChatAdministrators, self).__init__(type='chat_administrators', chat_id=chat_id)
+
+
+# noinspection PyUnresolvedReferences
+class BotCommandScopeChatMember(BotCommandScope):
+ """
+ Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#botcommandscopechatmember
+
+ :param type: Scope type, must be chat_member
+ :type type: :obj:`str`
+
+ :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format
+ @supergroupusername)
+ :type chat_id: :obj:`int` or :obj:`str`
+
+ :param user_id: Unique identifier of the target user
+ :type user_id: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.BotCommandScopeChatMember`
+ """
+ def __init__(self, chat_id: Optional[Union[str, int]]=None, user_id: Optional[Union[str, int]]=None):
+ super(BotCommandScopeChatMember, self).__init__(type='chat_member', chat_id=chat_id, user_id=user_id)
+
+
+# InlineQuery
+
+# noinspection PyShadowingBuiltins
+class InlineQuery(JsonDeserializable):
+ """
+ This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequery
+
+ :param id: Unique identifier for this query
+ :type id: :obj:`str`
+
+ :param from_user: Sender
+ :type from_user: :class:`telebot.types.User`
+
+ :param query: Text of the query (up to 256 characters)
+ :type query: :obj:`str`
+
+ :param offset: Offset of the results to be returned, can be controlled by the bot
+ :type offset: :obj:`str`
+
+ :param chat_type: Optional. Type of the chat from which the inline query was sent. Can be either “sender” for a private
+ chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always
+ known for requests sent from official clients and most third-party clients, unless the request was sent from a secret
+ chat
+ :type chat_type: :obj:`str`
+
+ :param location: Optional. Sender location, only for bots that request user location
+ :type location: :class:`telebot.types.Location`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQuery`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ obj['from_user'] = User.de_json(obj.pop('from'))
+ if 'location' in obj:
+ obj['location'] = Location.de_json(obj['location'])
+ return cls(**obj)
+
+ def __init__(self, id, from_user, query, offset, chat_type=None, location=None, **kwargs):
+ self.id: str = id
+ self.from_user: User = from_user
+ self.query: str = query
+ self.offset: str = offset
+ self.chat_type: Optional[str] = chat_type
+ self.location: Optional[Location] = location
+
+
+class InputTextMessageContent(Dictionaryable):
+ """
+ Represents the content of a text message to be sent as the result of an inline query.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inputtextmessagecontent
+
+ :param message_text: Text of the message to be sent, 1-4096 characters
+ :type message_text: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the message text. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param entities: Optional. List of special entities that appear in message text, which can be specified instead of
+ parse_mode
+ :type entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param disable_web_page_preview: deprecated
+ :type disable_web_page_preview: :obj:`bool`
+
+ :param link_preview_options: Optional. Link preview generation options for the message
+ :type link_preview_options: :class:`telebot.types.LinkPreviewOptions`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InputTextMessageContent`
+ """
+ def __init__(self, message_text: str, parse_mode: Optional[str] = None, entities: Optional[List[MessageEntity]] = None,
+ disable_web_page_preview: Optional[bool] = None, link_preview_options: Optional[LinkPreviewOptions] = None):
+ self.message_text: str = message_text
+ self.parse_mode: Optional[str] = parse_mode
+ self.entities: Optional[List[MessageEntity]] = entities
+ self.link_preview_options: Optional[LinkPreviewOptions] = link_preview_options
+ if disable_web_page_preview is not None:
+ log_deprecation_warning('The parameter "disable_web_page_preview" is deprecated. Use "link_preview_options" instead.')
+
+ if link_preview_options:
+ log_deprecation_warning('Both "link_preview_options" and "disable_web_page_preview" parameters are set: conflicting, "disable_web_page_preview" is deprecated')
+ else:
+ self.link_preview_options: Optional[LinkPreviewOptions] = LinkPreviewOptions(is_disabled=disable_web_page_preview)
+
+ def to_dict(self):
+ json_dict = {'message_text': self.message_text}
+ if self.parse_mode:
+ json_dict['parse_mode'] = self.parse_mode
+ if self.entities:
+ json_dict['entities'] = MessageEntity.to_list_of_dicts(self.entities)
+ if self.link_preview_options:
+ json_dict['link_preview_options'] = self.link_preview_options.to_dict()
+ return json_dict
+
+
+class InputLocationMessageContent(Dictionaryable):
+ """
+ Represents the content of a location message to be sent as the result of an inline query.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inputlocationmessagecontent
+
+ :param latitude: Latitude of the location in degrees
+ :type latitude: :obj:`float`
+
+ :param longitude: Longitude of the location in degrees
+ :type longitude: :obj:`float`
+
+ :param horizontal_accuracy: Optional. The radius of uncertainty for the location, measured in meters; 0-1500
+ :type horizontal_accuracy: :obj:`float` number
+
+ :param live_period: Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
+ :type live_period: :obj:`int`
+
+ :param heading: Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
+ :type heading: :obj:`int`
+
+ :param proximity_alert_radius: Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
+ :type proximity_alert_radius: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InputLocationMessageContent`
+ """
+ def __init__(self, latitude, longitude, horizontal_accuracy=None, live_period=None, heading=None, proximity_alert_radius=None):
+ self.latitude: float = latitude
+ self.longitude: float = longitude
+ self.horizontal_accuracy: Optional[float] = horizontal_accuracy
+ self.live_period: Optional[int] = live_period
+ self.heading: Optional[int] = heading
+ self.proximity_alert_radius: Optional[int] = proximity_alert_radius
+
+ def to_dict(self):
+ json_dict = {'latitude': self.latitude, 'longitude': self.longitude}
+ if self.horizontal_accuracy:
+ json_dict['horizontal_accuracy'] = self.horizontal_accuracy
+ if self.live_period:
+ json_dict['live_period'] = self.live_period
+ if self.heading:
+ json_dict['heading'] = self.heading
+ if self.proximity_alert_radius:
+ json_dict['proximity_alert_radius'] = self.proximity_alert_radius
+ return json_dict
+
+
+class InputVenueMessageContent(Dictionaryable):
+ """
+ Represents the content of a venue message to be sent as the result of an inline query.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inputvenuemessagecontent
+
+ :param latitude: Latitude of the venue in degrees
+ :type latitude: :obj:`float`
+
+ :param longitude: Longitude of the venue in degrees
+ :type longitude: :obj:`float`
+
+ :param title: Name of the venue
+ :type title: :obj:`str`
+
+ :param address: Address of the venue
+ :type address: :obj:`str`
+
+ :param foursquare_id: Optional. Foursquare identifier of the venue, if known
+ :type foursquare_id: :obj:`str`
+
+ :param foursquare_type: Optional. Foursquare type of the venue, if known. (For example,
+ “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
+ :type foursquare_type: :obj:`str`
+
+ :param google_place_id: Optional. Google Places identifier of the venue
+ :type google_place_id: :obj:`str`
+
+ :param google_place_type: Optional. Google Places type of the venue. (See supported types.)
+ :type google_place_type: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InputVenueMessageContent`
+ """
+ def __init__(self, latitude, longitude, title, address, foursquare_id=None, foursquare_type=None,
+ google_place_id=None, google_place_type=None):
+ self.latitude: float = latitude
+ self.longitude: float = longitude
+ self.title: str = title
+ self.address: str = address
+ self.foursquare_id: Optional[str] = foursquare_id
+ self.foursquare_type: Optional[str] = foursquare_type
+ self.google_place_id: Optional[str] = google_place_id
+ self.google_place_type: Optional[str] = google_place_type
+
+ def to_dict(self):
+ json_dict = {
+ 'latitude': self.latitude,
+ 'longitude': self.longitude,
+ 'title': self.title,
+ 'address' : self.address
+ }
+ if self.foursquare_id:
+ json_dict['foursquare_id'] = self.foursquare_id
+ if self.foursquare_type:
+ json_dict['foursquare_type'] = self.foursquare_type
+ if self.google_place_id:
+ json_dict['google_place_id'] = self.google_place_id
+ if self.google_place_type:
+ json_dict['google_place_type'] = self.google_place_type
+ return json_dict
+
+
+class InputContactMessageContent(Dictionaryable):
+ """
+ Represents the content of a contact message to be sent as the result of an inline query.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inputcontactmessagecontent
+
+ :param phone_number: Contact's phone number
+ :type phone_number: :obj:`str`
+
+ :param first_name: Contact's first name
+ :type first_name: :obj:`str`
+
+ :param last_name: Optional. Contact's last name
+ :type last_name: :obj:`str`
+
+ :param vcard: Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
+ :type vcard: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InputContactMessageContent`
+ """
+ def __init__(self, phone_number, first_name, last_name=None, vcard=None):
+ self.phone_number: str = phone_number
+ self.first_name: str = first_name
+ self.last_name: Optional[str] = last_name
+ self.vcard: Optional[str] = vcard
+
+ def to_dict(self):
+ json_dict = {'phone_number': self.phone_number, 'first_name': self.first_name}
+ if self.last_name:
+ json_dict['last_name'] = self.last_name
+ if self.vcard:
+ json_dict['vcard'] = self.vcard
+ return json_dict
+
+
+class InputInvoiceMessageContent(Dictionaryable):
+ """
+ Represents the content of an invoice message to be sent as the result of an inline query.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inputinvoicemessagecontent
+
+ :param title: Product name, 1-32 characters
+ :type title: :obj:`str`
+
+ :param description: Product description, 1-255 characters
+ :type description: :obj:`str`
+
+ :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your
+ internal processes.
+ :type payload: :obj:`str`
+
+ :param provider_token: Payment provider token, obtained via @BotFather; To create invoice in stars,
+ provide an empty token.
+ :type provider_token: :obj:`str` or :obj:`None`
+
+ :param currency: Three-letter ISO 4217 currency code, see more on currencies
+ :type currency: :obj:`str`
+
+ :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery
+ cost, delivery tax, bonus, etc.)
+ :type prices: :obj:`list` of :class:`telebot.types.LabeledPrice`
+
+ :param max_tip_amount: Optional. The maximum accepted amount for tips in the smallest units of the currency
+ (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp
+ parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the
+ majority of currencies). Defaults to 0
+ :type max_tip_amount: :obj:`int`
+
+ :param suggested_tip_amounts: Optional. A JSON-serialized array of suggested amounts of tip in the smallest units
+ of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip
+ amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
+ :type suggested_tip_amounts: :obj:`list` of :obj:`int`
+
+ :param provider_data: Optional. A JSON-serialized object for data about the invoice, which will be shared with the
+ payment provider. A detailed description of the required fields should be provided by the payment provider.
+ :type provider_data: :obj:`str`
+
+ :param photo_url: Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image
+ for a service.
+ :type photo_url: :obj:`str`
+
+ :param photo_size: Optional. Photo size in bytes
+ :type photo_size: :obj:`int`
+
+ :param photo_width: Optional. Photo width
+ :type photo_width: :obj:`int`
+
+ :param photo_height: Optional. Photo height
+ :type photo_height: :obj:`int`
+
+ :param need_name: Optional. Pass True, if you require the user's full name to complete the order
+ :type need_name: :obj:`bool`
+
+ :param need_phone_number: Optional. Pass True, if you require the user's phone number to complete the order
+ :type need_phone_number: :obj:`bool`
+
+ :param need_email: Optional. Pass True, if you require the user's email address to complete the order
+ :type need_email: :obj:`bool`
+
+ :param need_shipping_address: Optional. Pass True, if you require the user's shipping address to complete the
+ order
+ :type need_shipping_address: :obj:`bool`
+
+ :param send_phone_number_to_provider: Optional. Pass True, if the user's phone number should be sent to provider
+ :type send_phone_number_to_provider: :obj:`bool`
+
+ :param send_email_to_provider: Optional. Pass True, if the user's email address should be sent to provider
+ :type send_email_to_provider: :obj:`bool`
+
+ :param is_flexible: Optional. Pass True, if the final price depends on the shipping method
+ :type is_flexible: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InputInvoiceMessageContent`
+ """
+
+ def __init__(self, title: str, description: str, payload: str, provider_token: Optional[str], currency: str, prices: List[LabeledPrice],
+ max_tip_amount: Optional[int] = None, suggested_tip_amounts: Optional[List[int]] = None, provider_data: Optional[str] = None,
+ photo_url: Optional[str] = None, photo_size: Optional[int] = None, photo_width: Optional[int] = None, photo_height: Optional[int] = None,
+ need_name: Optional[bool] = None, need_phone_number: Optional[bool] = None, need_email: Optional[bool] = None, need_shipping_address: Optional[bool] = None,
+ send_phone_number_to_provider: Optional[bool] = None, send_email_to_provider: Optional[bool] = None, is_flexible: Optional[bool] = None):
+ self.title: str = title
+ self.description: str = description
+ self.payload: str = payload
+ self.provider_token: Optional[str] = provider_token
+ self.currency: str = currency
+ self.prices: List[LabeledPrice] = prices
+ self.max_tip_amount: Optional[int] = max_tip_amount
+ self.suggested_tip_amounts: Optional[List[int]] = suggested_tip_amounts
+ self.provider_data: Optional[str] = provider_data
+ self.photo_url: Optional[str] = photo_url
+ self.photo_size: Optional[int] = photo_size
+ self.photo_width: Optional[int] = photo_width
+ self.photo_height: Optional[int] = photo_height
+ self.need_name: Optional[bool] = need_name
+ self.need_phone_number: Optional[bool] = need_phone_number
+ self.need_email: Optional[bool] = need_email
+ self.need_shipping_address: Optional[bool] = need_shipping_address
+ self.send_phone_number_to_provider: Optional[bool] = send_phone_number_to_provider
+ self.send_email_to_provider: Optional[bool] = send_email_to_provider
+ self.is_flexible: Optional[bool] = is_flexible
+
+ def to_dict(self):
+ json_dict = {
+ 'title': self.title,
+ 'description': self.description,
+ 'payload': self.payload,
+ 'provider_token': self.provider_token,
+ 'currency': self.currency,
+ 'prices': [LabeledPrice.to_dict(lp) for lp in self.prices]
+ }
+ if self.max_tip_amount:
+ json_dict['max_tip_amount'] = self.max_tip_amount
+ if self.suggested_tip_amounts:
+ json_dict['suggested_tip_amounts'] = self.suggested_tip_amounts
+ if self.provider_data:
+ json_dict['provider_data'] = self.provider_data
+ if self.photo_url:
+ json_dict['photo_url'] = self.photo_url
+ if self.photo_size:
+ json_dict['photo_size'] = self.photo_size
+ if self.photo_width:
+ json_dict['photo_width'] = self.photo_width
+ if self.photo_height:
+ json_dict['photo_height'] = self.photo_height
+ if self.need_name is not None:
+ json_dict['need_name'] = self.need_name
+ if self.need_phone_number is not None:
+ json_dict['need_phone_number'] = self.need_phone_number
+ if self.need_email is not None:
+ json_dict['need_email'] = self.need_email
+ if self.need_shipping_address is not None:
+ json_dict['need_shipping_address'] = self.need_shipping_address
+ if self.send_phone_number_to_provider is not None:
+ json_dict['send_phone_number_to_provider'] = self.send_phone_number_to_provider
+ if self.send_email_to_provider is not None:
+ json_dict['send_email_to_provider'] = self.send_email_to_provider
+ if self.is_flexible is not None:
+ json_dict['is_flexible'] = self.is_flexible
+ return json_dict
+
+InputMessageContent = Union[InputTextMessageContent, InputLocationMessageContent, InputVenueMessageContent, InputContactMessageContent, InputInvoiceMessageContent]
+
+class ChosenInlineResult(JsonDeserializable):
+ """
+ Represents a result of an inline query that was chosen by the user and sent to their chat partner.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#choseninlineresult
+
+ :param result_id: The unique identifier for the result that was chosen
+ :type result_id: :obj:`str`
+
+ :param from: The user that chose the result
+ :type from: :class:`telebot.types.User`
+
+ :param location: Optional. Sender location, only for bots that require user location
+ :type location: :class:`telebot.types.Location`
+
+ :param inline_message_id: Optional. Identifier of the sent inline message. Available only if there is an inline
+ keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.
+ :type inline_message_id: :obj:`str`
+
+ :param query: The query that was used to obtain the result
+ :type query: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ChosenInlineResult`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ obj['from_user'] = User.de_json(obj.pop('from'))
+ if 'location' in obj:
+ obj['location'] = Location.de_json(obj['location'])
+ return cls(**obj)
+
+ def __init__(self, result_id, from_user, query, location=None, inline_message_id=None, **kwargs):
+ self.result_id: str = result_id
+ self.from_user: User = from_user
+ self.location: Optional[Location] = location
+ self.inline_message_id: Optional[str] = inline_message_id
+ self.query: str = query
+
+
+# noinspection PyShadowingBuiltins
+class InlineQueryResultBase(ABC, Dictionaryable, JsonSerializable):
+ """
+ This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:
+
+ * :class:`InlineQueryResultCachedAudio`
+ * :class:`InlineQueryResultCachedDocument`
+ * :class:`InlineQueryResultCachedGif`
+ * :class:`InlineQueryResultCachedMpeg4Gif`
+ * :class:`InlineQueryResultCachedPhoto`
+ * :class:`InlineQueryResultCachedSticker`
+ * :class:`InlineQueryResultCachedVideo`
+ * :class:`InlineQueryResultCachedVoice`
+ * :class:`InlineQueryResultArticle`
+ * :class:`InlineQueryResultAudio`
+ * :class:`InlineQueryResultContact`
+ * :class:`InlineQueryResultGame`
+ * :class:`InlineQueryResultDocument`
+ * :class:`InlineQueryResultGif`
+ * :class:`InlineQueryResultLocation`
+ * :class:`InlineQueryResultMpeg4Gif`
+ * :class:`InlineQueryResultPhoto`
+ * :class:`InlineQueryResultVenue`
+ * :class:`InlineQueryResultVideo`
+ * :class:`InlineQueryResultVoice`
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresult
+ """
+
+ def __init__(self, type: str, id: str, title: Optional[str] = None, caption: Optional[str] = None, input_message_content: Optional[InputMessageContent] = None,
+ reply_markup: Optional[InlineKeyboardMarkup] = None, caption_entities: Optional[List[MessageEntity]] = None, parse_mode: Optional[str] = None):
+ self.type: str = type
+ self.id: str = id
+ self.title: Optional[str] = title
+ self.caption: Optional[str] = caption
+ self.input_message_content: Optional[InputMessageContent] = input_message_content
+ self.reply_markup: Optional[InlineKeyboardMarkup] = reply_markup
+ self.caption_entities: Optional[List[MessageEntity]] = caption_entities
+ self.parse_mode: Optional[str] = parse_mode
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ json_dict = {
+ 'type': self.type,
+ 'id': self.id
+ }
+ if self.title:
+ json_dict['title'] = self.title
+ if self.caption:
+ json_dict['caption'] = self.caption
+ if self.input_message_content:
+ json_dict['input_message_content'] = self.input_message_content.to_dict()
+ if self.reply_markup:
+ json_dict['reply_markup'] = self.reply_markup.to_dict()
+ if self.caption_entities:
+ json_dict['caption_entities'] = MessageEntity.to_list_of_dicts(self.caption_entities)
+ if self.parse_mode:
+ json_dict['parse_mode'] = self.parse_mode
+ return json_dict
+
+
+class SentWebAppMessage(JsonDeserializable, Dictionaryable):
+ """
+ Describes an inline message sent by a Web App on behalf of a user.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#sentwebappmessage
+
+ :param inline_message_id: Optional. Identifier of the sent inline message. Available only if there is an inline
+ keyboard attached to the message.
+ :type inline_message_id: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.SentWebAppMessage`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ return cls(**obj)
+
+ def __init__(self, inline_message_id=None, **kwargs):
+ self.inline_message_id: Optional[str] = inline_message_id
+
+ def to_dict(self):
+ json_dict = {}
+ if self.inline_message_id:
+ json_dict['inline_message_id'] = self.inline_message_id
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultArticle(InlineQueryResultBase):
+ """
+ Represents a link to an article or web page.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultarticle
+
+ :param type: Type of the result, must be article
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 Bytes
+ :type id: :obj:`str`
+
+ :param title: Title of the result
+ :type title: :obj:`str`
+
+ :param input_message_content: Content of the message to be sent
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param url: Optional. URL of the result
+ :type url: :obj:`str`
+
+ :param hide_url: Optional. Pass True, if you don't want the URL to be shown in the message
+ :type hide_url: :obj:`bool`
+
+ :param description: Optional. Short description of the result
+ :type description: :obj:`str`
+
+ :param thumbnail_url: Optional. Url of the thumbnail for the result
+ :type thumbnail_url: :obj:`str`
+
+ :param thumbnail_width: Optional. Thumbnail width
+ :type thumbnail_width: :obj:`int`
+
+ :param thumbnail_height: Optional. Thumbnail height
+ :type thumbnail_height: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultArticle`
+ """
+
+ def __init__(self, id: str, title: str, input_message_content: InputMessageContent, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ url: Optional[str] = None, hide_url: Optional[bool] = None, description: Optional[str] = None,
+ thumbnail_url: Optional[str] = None, thumbnail_width: Optional[int] = None, thumbnail_height: Optional[int] = None):
+
+ super().__init__('article', id, title = title, input_message_content = input_message_content, reply_markup = reply_markup)
+ self.url: Optional[str] = url
+ self.hide_url: Optional[bool] = hide_url
+ self.description: Optional[str] = description
+ self.thumbnail_url: Optional[str] = thumbnail_url
+ self.thumbnail_width: Optional[int] = thumbnail_width
+ self.thumbnail_height: Optional[int] = thumbnail_height
+
+ if hide_url:
+ log_deprecation_warning('The parameter "hide_url" is deprecated. Pass an empty string as url instead.')
+ self.url = ''
+
+
+ @property
+ def thumb_url(self) -> str:
+ log_deprecation_warning('The parameter "thumb_url" is deprecated, use "thumbnail_url" instead')
+ return self.thumbnail_url
+
+ @property
+ def thumb_width(self) -> int:
+ log_deprecation_warning('The parameter "thumb_width" is deprecated, use "thumbnail_width" instead')
+ return self.thumbnail_width
+
+ @property
+ def thumb_height(self) -> int:
+ log_deprecation_warning('The parameter "thumb_height" is deprecated, use "thumbnail_height" instead')
+ return self.thumbnail_height
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ if self.url:
+ json_dict['url'] = self.url
+ if self.hide_url:
+ json_dict['hide_url'] = self.hide_url
+ if self.description:
+ json_dict['description'] = self.description
+ if self.thumbnail_url:
+ json_dict['thumbnail_url'] = self.thumbnail_url
+ if self.thumbnail_width:
+ json_dict['thumbnail_width'] = self.thumbnail_width
+ if self.thumbnail_height:
+ json_dict['thumbnail_height'] = self.thumbnail_height
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultPhoto(InlineQueryResultBase):
+ """
+ Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultphoto
+
+ :param type: Type of the result, must be photo
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param photo_url: A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB
+ :type photo_url: :obj:`str`
+
+ :param thumbnail_url: URL of the thumbnail for the photo
+ :type thumbnail_url: :obj:`str`
+
+ :param photo_width: Optional. Width of the photo
+ :type photo_width: :obj:`int`
+
+ :param photo_height: Optional. Height of the photo
+ :type photo_height: :obj:`int`
+
+ :param title: Optional. Title for the result
+ :type title: :obj:`str`
+
+ :param description: Optional. Short description of the result
+ :type description: :obj:`str`
+
+ :param caption: Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the photo caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the photo
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param show_caption_above_media: Optional. If true, a caption is shown over the photo or video
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultPhoto`
+ """
+ def __init__(self, id: str, photo_url: str, thumbnail_url: str, photo_width: Optional[int] = None, photo_height: Optional[int] = None,
+ title: Optional[str] = None, description: Optional[str] = None, caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None,
+ show_caption_above_media: Optional[bool] = None):
+ super().__init__('photo', id, title = title, caption = caption,
+ input_message_content = input_message_content, reply_markup = reply_markup,
+ parse_mode = parse_mode, caption_entities = caption_entities)
+ self.photo_url: str = photo_url
+ self.thumbnail_url: str = thumbnail_url
+ self.photo_width: Optional[int] = photo_width
+ self.photo_height: Optional[int] = photo_height
+ self.description: Optional[str] = description
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+
+
+ @property
+ def thumb_url(self) -> str:
+ log_deprecation_warning('The parameter "thumb_url" is deprecated, use "thumbnail_url" instead')
+ return self.thumbnail_url
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['photo_url'] = self.photo_url
+ json_dict['thumbnail_url'] = self.thumbnail_url
+ if self.photo_width:
+ json_dict['photo_width'] = self.photo_width
+ if self.photo_height:
+ json_dict['photo_height'] = self.photo_height
+ if self.description:
+ json_dict['description'] = self.description
+ if self.show_caption_above_media is not None:
+ json_dict['show_caption_above_media'] = self.show_caption_above_media
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultGif(InlineQueryResultBase):
+ """
+ Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultgif
+
+ :param type: Type of the result, must be gif
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param gif_url: A valid URL for the GIF file. File size must not exceed 1MB
+ :type gif_url: :obj:`str`
+
+ :param gif_width: Optional. Width of the GIF
+ :type gif_width: :obj:`int`
+
+ :param gif_height: Optional. Height of the GIF
+ :type gif_height: :obj:`int`
+
+ :param gif_duration: Optional. Duration of the GIF in seconds
+ :type gif_duration: :obj:`int`
+
+ :param thumbnail_url: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
+ :type thumbnail_url: :obj:`str`
+
+ :param thumbnail_mime_type: Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or
+ “video/mp4”. Defaults to “image/jpeg”
+ :type thumbnail_mime_type: :obj:`str`
+
+ :param title: Optional. Title for the result
+ :type title: :obj:`str`
+
+ :param caption: Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the GIF animation
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param show_caption_above_media: Optional. If true, a caption is shown over the photo or video
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultGif`
+ """
+ def __init__(self, id: str, gif_url: str, thumbnail_url: str, gif_width: Optional[int] = None, gif_height: Optional[int] = None,
+ title: Optional[str] = None, caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None,
+ gif_duration: Optional[int] = None, parse_mode: Optional[str] = None, thumbnail_mime_type: Optional[str] = None,
+ show_caption_above_media: Optional[bool] = None):
+
+ super().__init__('gif', id, title = title, caption = caption,
+ input_message_content = input_message_content, reply_markup = reply_markup,
+ parse_mode = parse_mode, caption_entities = caption_entities)
+ self.gif_url: str = gif_url
+ self.thumbnail_url: str = thumbnail_url
+ self.gif_width: Optional[int] = gif_width
+ self.gif_height: Optional[int] = gif_height
+ self.gif_duration: Optional[int] = gif_duration
+ self.thumbnail_mime_type: Optional[str] = thumbnail_mime_type
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+
+ @property
+ def thumb_url(self) -> str:
+ log_deprecation_warning('The parameter "thumb_url" is deprecated, use "thumbnail_url" instead')
+ return self.thumbnail_url
+
+ @property
+ def thumb_mime_type(self) -> str:
+ log_deprecation_warning('The parameter "thumb_mime_type" is deprecated, use "thumbnail_mime_type" instead')
+ return self.thumbnail_mime_type
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['gif_url'] = self.gif_url
+ if self.gif_width:
+ json_dict['gif_width'] = self.gif_width
+ if self.gif_height:
+ json_dict['gif_height'] = self.gif_height
+ json_dict['thumbnail_url'] = self.thumbnail_url
+ if self.gif_duration:
+ json_dict['gif_duration'] = self.gif_duration
+ if self.thumbnail_mime_type:
+ json_dict['thumbnail_mime_type'] = self.thumbnail_mime_type
+ if self.show_caption_above_media is not None:
+ json_dict['show_caption_above_media'] = self.show_caption_above_media
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultMpeg4Gif(InlineQueryResultBase):
+ """
+ Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif
+
+ :param type: Type of the result, must be mpeg4_gif
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param mpeg4_url: A valid URL for the MPEG4 file. File size must not exceed 1MB
+ :type mpeg4_url: :obj:`str`
+
+ :param mpeg4_width: Optional. Video width
+ :type mpeg4_width: :obj:`int`
+
+ :param mpeg4_height: Optional. Video height
+ :type mpeg4_height: :obj:`int`
+
+ :param mpeg4_duration: Optional. Video duration in seconds
+ :type mpeg4_duration: :obj:`int`
+
+ :param thumbnail_url: URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
+ :type thumbnail_url: :obj:`str`
+
+ :param thumbnail_mime_type: Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or
+ “video/mp4”. Defaults to “image/jpeg”
+ :type thumbnail_mime_type: :obj:`str`
+
+ :param title: Optional. Title for the result
+ :type title: :obj:`str`
+
+ :param caption: Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the video animation
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param show_caption_above_media: Optional. If true, a caption is shown over the photo or video
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultMpeg4Gif`
+ """
+ def __init__(self, id: str, mpeg4_url: str, thumbnail_url: str, mpeg4_width: Optional[int] = None, mpeg4_height: Optional[int] = None,
+ title: Optional[str] = None, caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None,
+ mpeg4_duration: Optional[int] = None, thumbnail_mime_type: Optional[str] = None, show_caption_above_media: Optional[bool] = None):
+
+ super().__init__('mpeg4_gif', id, title = title, caption = caption,
+ input_message_content = input_message_content, reply_markup = reply_markup,
+ parse_mode = parse_mode, caption_entities = caption_entities)
+ self.mpeg4_url: str = mpeg4_url
+ self.thumbnail_url: str = thumbnail_url
+ self.mpeg4_width: Optional[int] = mpeg4_width
+ self.mpeg4_height: Optional[int] = mpeg4_height
+ self.mpeg4_duration: Optional[int] = mpeg4_duration
+ self.thumbnail_mime_type: Optional[str] = thumbnail_mime_type
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+
+ @property
+ def thumb_url(self) -> str:
+ log_deprecation_warning('The parameter "thumb_url" is deprecated, use "thumbnail_url" instead')
+ return self.thumbnail_url
+
+ @property
+ def thumb_mime_type(self) -> str:
+ log_deprecation_warning('The parameter "thumb_mime_type" is deprecated, use "thumbnail_mime_type" instead')
+ return self.thumbnail_mime_type
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['mpeg4_url'] = self.mpeg4_url
+ if self.mpeg4_width:
+ json_dict['mpeg4_width'] = self.mpeg4_width
+ if self.mpeg4_height:
+ json_dict['mpeg4_height'] = self.mpeg4_height
+ json_dict['thumbnail_url'] = self.thumbnail_url
+ if self.mpeg4_duration:
+ json_dict['mpeg4_duration '] = self.mpeg4_duration
+ if self.thumbnail_mime_type:
+ json_dict['thumbnail_mime_type'] = self.thumbnail_mime_type
+ if self.show_caption_above_media is not None:
+ json_dict['show_caption_above_media'] = self.show_caption_above_media
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultVideo(InlineQueryResultBase):
+ """
+ Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultvideo
+
+ :param type: Type of the result, must be video
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param video_url: A valid URL for the embedded video player or video file
+ :type video_url: :obj:`str`
+
+ :param mime_type: MIME type of the content of the video URL, “text/html” or “video/mp4”
+ :type mime_type: :obj:`str`
+
+ :param thumbnail_url: URL of the thumbnail (JPEG only) for the video
+ :type thumbnail_url: :obj:`str`
+
+ :param title: Title for the result
+ :type title: :obj:`str`
+
+ :param caption: Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the video caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param video_width: Optional. Video width
+ :type video_width: :obj:`int`
+
+ :param video_height: Optional. Video height
+ :type video_height: :obj:`int`
+
+ :param video_duration: Optional. Video duration in seconds
+ :type video_duration: :obj:`int`
+
+ :param description: Optional. Short description of the result
+ :type description: :obj:`str`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the video. This field is
+ required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param show_caption_above_media: Optional. If true, a caption is shown over the video
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultVideo`
+ """
+ def __init__(self, id: str, video_url: str, mime_type: str, thumbnail_url: str, title: str,
+ caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, video_width: Optional[int] = None, video_height: Optional[int] = None,
+ video_duration: Optional[int] = None, description: Optional[str] = None, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ input_message_content: Optional[InputMessageContent] = None, show_caption_above_media: Optional[bool] = None):
+
+ super().__init__('video', id, title = title, caption = caption,
+ input_message_content = input_message_content, reply_markup = reply_markup,
+ parse_mode = parse_mode, caption_entities = caption_entities)
+ self.video_url: str = video_url
+ self.mime_type: str = mime_type
+ self.thumbnail_url: str = thumbnail_url
+ self.video_width: Optional[int] = video_width
+ self.video_height: Optional[int] = video_height
+ self.video_duration: Optional[int] = video_duration
+ self.description: Optional[str] = description
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+
+ @property
+ def thumb_url(self) -> str:
+ log_deprecation_warning('The parameter "thumb_url" is deprecated, use "thumbnail_url" instead')
+ return self.thumbnail_url
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['video_url'] = self.video_url
+ json_dict['mime_type'] = self.mime_type
+ json_dict['thumbnail_url'] = self.thumbnail_url
+ if self.video_height:
+ json_dict['video_height'] = self.video_height
+ if self.video_duration:
+ json_dict['video_duration'] = self.video_duration
+ if self.description:
+ json_dict['description'] = self.description
+ if self.show_caption_above_media is not None:
+ json_dict['show_caption_above_media'] = self.show_caption_above_media
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultAudio(InlineQueryResultBase):
+ """
+ Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultaudio
+
+ :param type: Type of the result, must be audio
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param audio_url: A valid URL for the audio file
+ :type audio_url: :obj:`str`
+
+ :param title: Title
+ :type title: :obj:`str`
+
+ :param caption: Optional. Caption, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the audio caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param performer: Optional. Performer
+ :type performer: :obj:`str`
+
+ :param audio_duration: Optional. Audio duration in seconds
+ :type audio_duration: :obj:`int`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the audio
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultAudio`
+ """
+ def __init__(self, id: str, audio_url: str, title: str, caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, performer: Optional[str] = None, audio_duration: Optional[int] = None,
+ reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None):
+
+ super().__init__('audio', id, title = title, caption = caption,
+ input_message_content = input_message_content, reply_markup = reply_markup,
+ parse_mode = parse_mode, caption_entities = caption_entities)
+ self.audio_url: str = audio_url
+ self.performer: Optional[str] = performer
+ self.audio_duration: Optional[int] = audio_duration
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['audio_url'] = self.audio_url
+ if self.performer:
+ json_dict['performer'] = self.performer
+ if self.audio_duration:
+ json_dict['audio_duration'] = self.audio_duration
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultVoice(InlineQueryResultBase):
+ """
+ Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultvoice
+
+ :param type: Type of the result, must be voice
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param voice_url: A valid URL for the voice recording
+ :type voice_url: :obj:`str`
+
+ :param title: Recording title
+ :type title: :obj:`str`
+
+ :param caption: Optional. Caption, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the voice message caption. See formatting options for
+ more details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param voice_duration: Optional. Recording duration in seconds
+ :type voice_duration: :obj:`int`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the voice recording
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultVoice`
+ """
+ def __init__(self, id: str, voice_url: str, title: str, caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, voice_duration: Optional[int] = None, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ input_message_content: Optional[InputMessageContent] = None):
+
+ super().__init__('voice', id, title = title, caption = caption,
+ input_message_content = input_message_content, reply_markup = reply_markup,
+ parse_mode = parse_mode, caption_entities = caption_entities)
+ self.voice_url: str = voice_url
+ self.voice_duration: Optional[int] = voice_duration
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['voice_url'] = self.voice_url
+ if self.voice_duration:
+ json_dict['voice_duration'] = self.voice_duration
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultDocument(InlineQueryResultBase):
+ """
+ Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultdocument
+
+ :param type: Type of the result, must be document
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param title: Title for the result
+ :type title: :obj:`str`
+
+ :param caption: Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the document caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param document_url: A valid URL for the file
+ :type document_url: :obj:`str`
+
+ :param mime_type: MIME type of the content of the file, either “application/pdf” or “application/zip”
+ :type mime_type: :obj:`str`
+
+ :param description: Optional. Short description of the result
+ :type description: :obj:`str`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the file
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param thumbnail_url: Optional. URL of the thumbnail (JPEG only) for the file
+ :type thumbnail_url: :obj:`str`
+
+ :param thumbnail_width: Optional. Thumbnail width
+ :type thumbnail_width: :obj:`int`
+
+ :param thumbnail_height: Optional. Thumbnail height
+ :type thumbnail_height: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultDocument`
+ """
+ def __init__(self, id: str, title: str, document_url: str, mime_type: str, caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, description: Optional[str] = None, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ input_message_content: Optional[InputMessageContent] = None, thumbnail_url: Optional[str] = None, thumbnail_width: Optional[int] = None,
+ thumbnail_height: Optional[int] = None):
+
+ super().__init__('document', id, title = title, caption = caption,
+ input_message_content = input_message_content, reply_markup = reply_markup,
+ parse_mode = parse_mode, caption_entities = caption_entities)
+ self.document_url: str = document_url
+ self.mime_type: str = mime_type
+ self.description: Optional[str] = description
+ self.thumbnail_url: Optional[str] = thumbnail_url
+ self.thumbnail_width: Optional[int] = thumbnail_width
+ self.thumbnail_height: Optional[int] = thumbnail_height
+
+
+ @property
+ def thumb_url(self) -> str:
+ log_deprecation_warning('The parameter "thumb_url" is deprecated, use "thumbnail_url" instead')
+ return self.thumbnail_url
+
+ @property
+ def thumb_width(self) -> int:
+ log_deprecation_warning('The parameter "thumb_width" is deprecated, use "thumbnail_width" instead')
+ return self.thumbnail_width
+
+ @property
+ def thumb_height(self) -> int:
+ log_deprecation_warning('The parameter "thumb_height" is deprecated, use "thumbnail_height" instead')
+ return self.thumbnail_height
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['document_url'] = self.document_url
+ json_dict['mime_type'] = self.mime_type
+ if self.description:
+ json_dict['description'] = self.description
+ if self.thumbnail_url:
+ json_dict['thumbnail_url'] = self.thumbnail_url
+ if self.thumbnail_width:
+ json_dict['thumbnail_width'] = self.thumbnail_width
+ if self.thumbnail_height:
+ json_dict['thumbnail_height'] = self.thumbnail_height
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultLocation(InlineQueryResultBase):
+ """
+ Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultlocation
+
+ :param type: Type of the result, must be location
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 Bytes
+ :type id: :obj:`str`
+
+ :param latitude: Location latitude in degrees
+ :type latitude: :obj:`float` number
+
+ :param longitude: Location longitude in degrees
+ :type longitude: :obj:`float` number
+
+ :param title: Location title
+ :type title: :obj:`str`
+
+ :param horizontal_accuracy: Optional. The radius of uncertainty for the location, measured in meters; 0-1500
+ :type horizontal_accuracy: :obj:`float` number
+
+ :param live_period: Optional. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.
+ :type live_period: :obj:`int`
+
+ :param heading: Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
+ :type heading: :obj:`int`
+
+ :param proximity_alert_radius: Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
+ :type proximity_alert_radius: :obj:`int`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the location
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param thumbnail_url: Optional. Url of the thumbnail for the result
+ :type thumbnail_url: :obj:`str`
+
+ :param thumbnail_width: Optional. Thumbnail width
+ :type thumbnail_width: :obj:`int`
+
+ :param thumbnail_height: Optional. Thumbnail height
+ :type thumbnail_height: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultLocation`
+ """
+ def __init__(self, id: str, title: str, latitude: float, longitude: float, horizontal_accuracy: float, live_period: Optional[int] = None,
+ reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None,
+ thumbnail_url: Optional[str] = None, thumbnail_width: Optional[int] = None, thumbnail_height: Optional[int] = None,
+ heading: Optional[int] = None, proximity_alert_radius: Optional[int] = None):
+
+ super().__init__('location', id, title = title,
+ input_message_content = input_message_content, reply_markup = reply_markup)
+ self.latitude: float = latitude
+ self.longitude: float = longitude
+ self.horizontal_accuracy: float = horizontal_accuracy
+ self.live_period: Optional[int] = live_period
+ self.heading: Optional[int] = heading
+ self.proximity_alert_radius: Optional[int] = proximity_alert_radius
+ self.thumbnail_url: Optional[str] = thumbnail_url
+ self.thumbnail_width: Optional[int] = thumbnail_width
+ self.thumbnail_height: Optional[int] = thumbnail_height
+
+ @property
+ def thumb_url(self) -> str:
+ log_deprecation_warning('The parameter "thumb_url" is deprecated, use "thumbnail_url" instead')
+ return self.thumbnail_url
+
+ @property
+ def thumb_width(self) -> int:
+ log_deprecation_warning('The parameter "thumb_width" is deprecated, use "thumbnail_width" instead')
+ return self.thumbnail_width
+
+ @property
+ def thumb_height(self) -> int:
+ log_deprecation_warning('The parameter "thumb_height" is deprecated, use "thumbnail_height" instead')
+ return self.thumbnail_height
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['latitude'] = self.latitude
+ json_dict['longitude'] = self.longitude
+ if self.horizontal_accuracy:
+ json_dict['horizontal_accuracy'] = self.horizontal_accuracy
+ if self.live_period:
+ json_dict['live_period'] = self.live_period
+ if self.heading:
+ json_dict['heading'] = self.heading
+ if self.proximity_alert_radius:
+ json_dict['proximity_alert_radius'] = self.proximity_alert_radius
+ if self.thumbnail_url:
+ json_dict['thumbnail_url'] = self.thumbnail_url
+ if self.thumbnail_width:
+ json_dict['thumbnail_width'] = self.thumbnail_width
+ if self.thumbnail_height:
+ json_dict['thumbnail_height'] = self.thumbnail_height
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultVenue(InlineQueryResultBase):
+ """
+ Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultvenue
+
+ :param type: Type of the result, must be venue
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 Bytes
+ :type id: :obj:`str`
+
+ :param latitude: Latitude of the venue location in degrees
+ :type latitude: :obj:`float`
+
+ :param longitude: Longitude of the venue location in degrees
+ :type longitude: :obj:`float`
+
+ :param title: Title of the venue
+ :type title: :obj:`str`
+
+ :param address: Address of the venue
+ :type address: :obj:`str`
+
+ :param foursquare_id: Optional. Foursquare identifier of the venue if known
+ :type foursquare_id: :obj:`str`
+
+ :param foursquare_type: Optional. Foursquare type of the venue, if known. (For example,
+ “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
+ :type foursquare_type: :obj:`str`
+
+ :param google_place_id: Optional. Google Places identifier of the venue
+ :type google_place_id: :obj:`str`
+
+ :param google_place_type: Optional. Google Places type of the venue. (See supported types.)
+ :type google_place_type: :obj:`str`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the venue
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param thumbnail_url: Optional. Url of the thumbnail for the result
+ :type thumbnail_url: :obj:`str`
+
+ :param thumbnail_width: Optional. Thumbnail width
+ :type thumbnail_width: :obj:`int`
+
+ :param thumbnail_height: Optional. Thumbnail height
+ :type thumbnail_height: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultVenue`
+ """
+ def __init__(self, id: str, title: str, latitude: float, longitude: float, address: str, foursquare_id: Optional[str] = None,
+ foursquare_type: Optional[str] = None, google_place_id: Optional[str] = None, google_place_type: Optional[str] = None,
+ reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None,
+ thumbnail_url: Optional[str] = None, thumbnail_width: Optional[int] = None, thumbnail_height: Optional[int] = None):
+
+ super().__init__('venue', id, title = title,
+ input_message_content = input_message_content, reply_markup = reply_markup)
+ self.latitude: float = latitude
+ self.longitude: float = longitude
+ self.address: str = address
+ self.foursquare_id: Optional[str] = foursquare_id
+ self.foursquare_type: Optional[str] = foursquare_type
+ self.google_place_id: Optional[str] = google_place_id
+ self.google_place_type: Optional[str] = google_place_type
+ self.thumbnail_url: Optional[str] = thumbnail_url
+ self.thumbnail_width: Optional[int] = thumbnail_width
+ self.thumbnail_height: Optional[int] = thumbnail_height
+
+ @property
+ def thumb_url(self) -> str:
+ log_deprecation_warning('The parameter "thumb_url" is deprecated, use "thumbnail_url" instead')
+ return self.thumbnail_url
+
+ @property
+ def thumb_width(self) -> int:
+ log_deprecation_warning('The parameter "thumb_width" is deprecated, use "thumbnail_width" instead')
+ return self.thumbnail_width
+
+ @property
+ def thumb_height(self) -> int:
+ log_deprecation_warning('The parameter "thumb_height" is deprecated, use "thumbnail_height" instead')
+ return self.thumbnail_height
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['latitude'] = self.latitude
+ json_dict['longitude'] = self.longitude
+ json_dict['address'] = self.address
+ if self.foursquare_id:
+ json_dict['foursquare_id'] = self.foursquare_id
+ if self.foursquare_type:
+ json_dict['foursquare_type'] = self.foursquare_type
+ if self.google_place_id:
+ json_dict['google_place_id'] = self.google_place_id
+ if self.google_place_type:
+ json_dict['google_place_type'] = self.google_place_type
+ if self.thumbnail_url:
+ json_dict['thumbnail_url'] = self.thumbnail_url
+ if self.thumbnail_width:
+ json_dict['thumbnail_width'] = self.thumbnail_width
+ if self.thumbnail_height:
+ json_dict['thumbnail_height'] = self.thumbnail_height
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultContact(InlineQueryResultBase):
+ """
+ Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultcontact
+
+ :param type: Type of the result, must be contact
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 Bytes
+ :type id: :obj:`str`
+
+ :param phone_number: Contact's phone number
+ :type phone_number: :obj:`str`
+
+ :param first_name: Contact's first name
+ :type first_name: :obj:`str`
+
+ :param last_name: Optional. Contact's last name
+ :type last_name: :obj:`str`
+
+ :param vcard: Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
+ :type vcard: :obj:`str`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the contact
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param thumbnail_url: Optional. Url of the thumbnail for the result
+ :type thumbnail_url: :obj:`str`
+
+ :param thumbnail_width: Optional. Thumbnail width
+ :type thumbnail_width: :obj:`int`
+
+ :param thumbnail_height: Optional. Thumbnail height
+ :type thumbnail_height: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultContact`
+ """
+
+ def __init__(self, id: str, phone_number: str, first_name: str, last_name: Optional[str] = None, vcard: Optional[str] = None,
+ reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None,
+ thumbnail_url: Optional[str] = None, thumbnail_width: Optional[int] = None, thumbnail_height: Optional[int] = None):
+ super().__init__('contact', id,
+ input_message_content = input_message_content, reply_markup = reply_markup)
+ self.phone_number: str = phone_number
+ self.first_name: str = first_name
+ self.last_name: Optional[str] = last_name
+ self.vcard: Optional[str] = vcard
+ self.thumbnail_url: Optional[str] = thumbnail_url
+ self.thumbnail_width: Optional[int] = thumbnail_width
+ self.thumbnail_height: Optional[int] = thumbnail_height
+
+
+ @property
+ def thumb_url(self) -> str:
+ log_deprecation_warning('The parameter "thumb_url" is deprecated, use "thumbnail_url" instead')
+ return self.thumbnail_url
+
+ @property
+ def thumb_width(self) -> int:
+ log_deprecation_warning('The parameter "thumb_width" is deprecated, use "thumbnail_width" instead')
+ return self.thumbnail_width
+
+ @property
+ def thumb_height(self) -> int:
+ log_deprecation_warning('The parameter "thumb_height" is deprecated, use "thumbnail_height" instead')
+ return self.thumbnail_height
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['phone_number'] = self.phone_number
+ json_dict['first_name'] = self.first_name
+ if self.last_name:
+ json_dict['last_name'] = self.last_name
+ if self.vcard:
+ json_dict['vcard'] = self.vcard
+ if self.thumbnail_url:
+ json_dict['thumbnail_url'] = self.thumbnail_url
+ if self.thumbnail_width:
+ json_dict['thumbnail_width'] = self.thumbnail_width
+ if self.thumbnail_height:
+ json_dict['thumbnail_height'] = self.thumbnail_height
+ return json_dict
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultGame(InlineQueryResultBase):
+ """
+ Represents a Game.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultgame
+
+ :param type: Type of the result, must be game
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param game_short_name: Short name of the game
+ :type game_short_name: :obj:`str`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultGame`
+ """
+ def __init__(self, id: str, game_short_name: str, reply_markup: Optional[InlineKeyboardMarkup] = None):
+ super().__init__('game', id, reply_markup = reply_markup)
+ self.game_short_name: str = game_short_name
+
+ def to_dict(self):
+ json_dict = super().to_dict()
+ json_dict['game_short_name'] = self.game_short_name
+ return json_dict
+
+
+class InlineQueryResultCachedBase(ABC, JsonSerializable):
+ """
+ Base class of all InlineQueryResultCached* classes.
+ """
+ def __init__(self):
+ self.type: str = ""
+ self.id: str = ""
+ self.title: Optional[str] = None
+ self.description: Optional[str] = None
+ self.caption: Optional[str] = None
+ self.reply_markup: Optional[InlineKeyboardMarkup] = None
+ self.input_message_content: Optional[InputMessageContent] = None
+ self.parse_mode: Optional[str] = None
+ self.caption_entities: Optional[List[MessageEntity]] = None
+ # noinspection PyTypeChecker
+ self.payload_dic: Dict[str] = {}
+ self.show_caption_above_media: Optional[bool] = None
+
+ def to_json(self):
+ json_dict = self.payload_dic
+ json_dict['type'] = self.type
+ json_dict['id'] = self.id
+ if self.title:
+ json_dict['title'] = self.title
+ if self.description:
+ json_dict['description'] = self.description
+ if self.caption:
+ json_dict['caption'] = self.caption
+ if self.reply_markup:
+ json_dict['reply_markup'] = self.reply_markup.to_dict()
+ if self.input_message_content:
+ json_dict['input_message_content'] = self.input_message_content.to_dict()
+ if self.parse_mode:
+ json_dict['parse_mode'] = self.parse_mode
+ if self.caption_entities:
+ json_dict['caption_entities'] = MessageEntity.to_list_of_dicts(self.caption_entities)
+ if self.show_caption_above_media is not None:
+ json_dict['show_caption_above_media'] = self.show_caption_above_media
+ return json.dumps(json_dict)
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultCachedPhoto(InlineQueryResultCachedBase):
+ """
+ Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultcachedphoto
+
+ :param type: Type of the result, must be photo
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param photo_file_id: A valid file identifier of the photo
+ :type photo_file_id: :obj:`str`
+
+ :param title: Optional. Title for the result
+ :type title: :obj:`str`
+
+ :param description: Optional. Short description of the result
+ :type description: :obj:`str`
+
+ :param caption: Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the photo caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the photo
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param show_caption_above_media: Optional. Pass True, if a caption is not required for the media
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultCachedPhoto`
+ """
+ def __init__(self, id: str, photo_file_id: str, title: Optional[str] = None, description: Optional[str] = None,
+ caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ input_message_content: Optional[InputMessageContent] = None, show_caption_above_media: Optional[bool] = None):
+
+ InlineQueryResultCachedBase.__init__(self)
+ self.type: str = 'photo'
+ self.id: str = id
+ self.photo_file_id: str = photo_file_id
+ self.title: Optional[str] = title
+ self.description: Optional[str] = description
+ self.caption: Optional[str] = caption
+ self.caption_entities: Optional[List[MessageEntity]] = caption_entities
+ self.reply_markup: Optional[InlineKeyboardMarkup] = reply_markup
+ self.input_message_content: Optional[InputMessageContent] = input_message_content
+ self.parse_mode: Optional[str] = parse_mode
+ self.payload_dic['photo_file_id'] = photo_file_id
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultCachedGif(InlineQueryResultCachedBase):
+ """
+ Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultcachedgif
+
+ :param type: Type of the result, must be gif
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param gif_file_id: A valid file identifier for the GIF file
+ :type gif_file_id: :obj:`str`
+
+ :param title: Optional. Title for the result
+ :type title: :obj:`str`
+
+ :param caption: Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the GIF animation
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param show_caption_above_media: Optional. Pass True, if a caption is not required for the media
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultCachedGif`
+ """
+ def __init__(self, id: str, gif_file_id: str, title: Optional[str] = None, description: Optional[str] = None,
+ caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ input_message_content: Optional[InputMessageContent] = None, show_caption_above_media: Optional[bool] = None):
+
+ InlineQueryResultCachedBase.__init__(self)
+ self.type: str = 'gif'
+ self.id: str = id
+ self.gif_file_id: str = gif_file_id
+ self.title: Optional[str] = title
+ self.description: Optional[str] = description
+ self.caption: Optional[str] = caption
+ self.caption_entities: Optional[List[MessageEntity]] = caption_entities
+ self.reply_markup: Optional[InlineKeyboardMarkup] = reply_markup
+ self.input_message_content: Optional[InputMessageContent] = input_message_content
+ self.parse_mode: Optional[str] = parse_mode
+ self.payload_dic['gif_file_id'] = gif_file_id
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultCachedMpeg4Gif(InlineQueryResultCachedBase):
+ """
+ Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif
+
+ :param type: Type of the result, must be mpeg4_gif
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param mpeg4_file_id: A valid file identifier for the MPEG4 file
+ :type mpeg4_file_id: :obj:`str`
+
+ :param title: Optional. Title for the result
+ :type title: :obj:`str`
+
+ :param caption: Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the caption. See formatting options for more details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the video animation
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param show_caption_above_media: Optional. Pass True, if caption should be shown above the media
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultCachedMpeg4Gif`
+ """
+ def __init__(self, id: str, mpeg4_file_id: str, title: Optional[str] = None, description: Optional[str] = None,
+ caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ input_message_content: Optional[InputMessageContent] = None, show_caption_above_media: Optional[bool] = None):
+
+ InlineQueryResultCachedBase.__init__(self)
+ self.type: str = 'mpeg4_gif'
+ self.id: str = id
+ self.mpeg4_file_id: str = mpeg4_file_id
+ self.title: Optional[str] = title
+ self.description: Optional[str] = description
+ self.caption: Optional[str] = caption
+ self.caption_entities: Optional[List[MessageEntity]] = caption_entities
+ self.reply_markup: Optional[InlineKeyboardMarkup] = reply_markup
+ self.input_message_content: Optional[InputMessageContent] = input_message_content
+ self.parse_mode: Optional[str] = parse_mode
+ self.payload_dic['mpeg4_file_id'] = mpeg4_file_id
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultCachedSticker(InlineQueryResultCachedBase):
+ """
+ Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultcachedsticker
+
+ :param type: Type of the result, must be sticker
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param sticker_file_id: A valid file identifier of the sticker
+ :type sticker_file_id: :obj:`str`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the sticker
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultCachedSticker`
+ """
+ def __init__(self, id: str, sticker_file_id: str, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ input_message_content: Optional[InputMessageContent] = None):
+ InlineQueryResultCachedBase.__init__(self)
+ self.type: str = 'sticker'
+ self.id: str = id
+ self.sticker_file_id: str = sticker_file_id
+ self.reply_markup: Optional[InlineKeyboardMarkup] = reply_markup
+ self.input_message_content: Optional[InputMessageContent] = input_message_content
+ self.payload_dic['sticker_file_id'] = sticker_file_id
+
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultCachedDocument(InlineQueryResultCachedBase):
+ """
+ Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultcacheddocument
+
+ :param type: Type of the result, must be document
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param title: Title for the result
+ :type title: :obj:`str`
+
+ :param document_file_id: A valid file identifier for the file
+ :type document_file_id: :obj:`str`
+
+ :param description: Optional. Short description of the result
+ :type description: :obj:`str`
+
+ :param caption: Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the document caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the file
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultCachedDocument`
+ """
+
+ def __init__(self, id: str, document_file_id: str, title: str, description: Optional[str] = None,
+ caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ input_message_content: Optional[InputMessageContent] = None):
+
+ InlineQueryResultCachedBase.__init__(self)
+ self.type: str = 'document'
+ self.id: str = id
+ self.title: str = title
+ self.document_file_id: str = document_file_id
+ self.description: Optional[str] = description
+ self.caption: Optional[str] = caption
+ self.caption_entities: Optional[List[MessageEntity]] = caption_entities
+ self.reply_markup: Optional[InlineKeyboardMarkup] = reply_markup
+ self.input_message_content: Optional[InputMessageContent] = input_message_content
+ self.parse_mode: Optional[str] = parse_mode
+ self.payload_dic['document_file_id'] = document_file_id
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultCachedVideo(InlineQueryResultCachedBase):
+ """
+ Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultcachedvideo
+
+ :param type: Type of the result, must be video
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param video_file_id: A valid file identifier for the video file
+ :type video_file_id: :obj:`str`
+
+ :param title: Title for the result
+ :type title: :obj:`str`
+
+ :param description: Optional. Short description of the result
+ :type description: :obj:`str`
+
+ :param caption: Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the video caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the video
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :param show_caption_above_media: Optional. Pass True, if a caption is not required for the media
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultCachedVideo`
+ """
+
+ def __init__(self, id: str, video_file_id: str, title: str, description: Optional[str] = None,
+ caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ input_message_content: Optional[InputMessageContent] = None, show_caption_above_media: Optional[bool] = None):
+
+ InlineQueryResultCachedBase.__init__(self)
+ self.type: str = 'video'
+ self.id: str = id
+ self.video_file_id: str = video_file_id
+ self.title: str = title
+ self.description: Optional[str] = description
+ self.caption: Optional[str] = caption
+ self.caption_entities: Optional[List[MessageEntity]] = caption_entities
+ self.reply_markup: Optional[InlineKeyboardMarkup] = reply_markup
+ self.input_message_content: Optional[InputMessageContent] = input_message_content
+ self.parse_mode: Optional[str] = parse_mode
+ self.payload_dic['video_file_id'] = video_file_id
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultCachedVoice(InlineQueryResultCachedBase):
+ """
+ Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultcachedvoice
+
+ :param type: Type of the result, must be voice
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param voice_file_id: A valid file identifier for the voice message
+ :type voice_file_id: :obj:`str`
+
+ :param title: Voice message title
+ :type title: :obj:`str`
+
+ :param caption: Optional. Caption, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the voice message caption. See formatting options for
+ more details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the voice message
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultCachedVoice`
+ """
+
+ def __init__(self, id: str, voice_file_id: str, title: str, caption: Optional[str] = None,
+ caption_entities: Optional[List[MessageEntity]] = None, parse_mode: Optional[str] = None,
+ reply_markup: Optional[InlineKeyboardMarkup] = None, input_message_content: Optional[InputMessageContent] = None):
+ InlineQueryResultCachedBase.__init__(self)
+ self.type: str = 'voice'
+ self.id: str = id
+ self.voice_file_id: str = voice_file_id
+ self.title: str = title
+ self.caption: Optional[str] = caption
+ self.caption_entities: Optional[List[MessageEntity]] = caption_entities
+ self.reply_markup: Optional[InlineKeyboardMarkup] = reply_markup
+ self.input_message_content: Optional[InputMessageContent] = input_message_content
+ self.parse_mode: Optional[str] = parse_mode
+ self.payload_dic['voice_file_id'] = voice_file_id
+
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class InlineQueryResultCachedAudio(InlineQueryResultCachedBase):
+ """
+ Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inlinequeryresultcachedaudio
+
+ :param type: Type of the result, must be audio
+ :type type: :obj:`str`
+
+ :param id: Unique identifier for this result, 1-64 bytes
+ :type id: :obj:`str`
+
+ :param audio_file_id: A valid file identifier for the audio file
+ :type audio_file_id: :obj:`str`
+
+ :param caption: Optional. Caption, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the audio caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param reply_markup: Optional. Inline keyboard attached to the message
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup`
+
+ :param input_message_content: Optional. Content of the message to be sent instead of the audio
+ :type input_message_content: :class:`telebot.types.InputMessageContent`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InlineQueryResultCachedAudio`
+ """
+
+ def __init__(self, id: str, audio_file_id: str, caption: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ parse_mode: Optional[str] = None, reply_markup: Optional[InlineKeyboardMarkup] = None,
+ input_message_content: Optional[InputMessageContent] = None):
+ InlineQueryResultCachedBase.__init__(self)
+ self.type: str = 'audio'
+ self.id: str = id
+ self.audio_file_id: str = audio_file_id
+ self.caption: Optional[str] = caption
+ self.caption_entities: Optional[List[MessageEntity]] = caption_entities
+ self.reply_markup: Optional[InlineKeyboardMarkup] = reply_markup
+ self.input_message_content: Optional[InputMessageContent] = input_message_content
+ self.parse_mode: Optional[str] = parse_mode
+ self.payload_dic['audio_file_id'] = audio_file_id
+
+
+# Games
+
+class Game(JsonDeserializable):
+ """
+ This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#game
+
+ :param title: Title of the game
+ :type title: :obj:`str`
+
+ :param description: Description of the game
+ :type description: :obj:`str`
+
+ :param photo: Photo that will be displayed in the game message in chats.
+ :type photo: :obj:`list` of :class:`telebot.types.PhotoSize`
+
+ :param text: Optional. Brief description of the game or high scores included in the game message. Can be
+ automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited
+ using editMessageText. 0-4096 characters.
+ :type text: :obj:`str`
+
+ :param text_entities: Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
+ :type text_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param animation: Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
+ :type animation: :class:`telebot.types.Animation`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Game`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ obj['photo'] = Game.parse_photo(obj['photo'])
+ if 'text_entities' in obj:
+ obj['text_entities'] = Game.parse_entities(obj['text_entities'])
+ if 'animation' in obj:
+ obj['animation'] = Animation.de_json(obj['animation'])
+ return cls(**obj)
+
+ @classmethod
+ def parse_photo(cls, photo_size_array) -> List[PhotoSize]:
+ """
+ Parse the photo array into a list of PhotoSize objects
+ """
+ ret = []
+ for ps in photo_size_array:
+ ret.append(PhotoSize.de_json(ps))
+ return ret
+
+ @classmethod
+ def parse_entities(cls, message_entity_array) -> List[MessageEntity]:
+ """
+ Parse the message entity array into a list of MessageEntity objects
+ """
+ ret = []
+ for me in message_entity_array:
+ ret.append(MessageEntity.de_json(me))
+ return ret
+
+ def __init__(self, title, description, photo, text=None, text_entities=None, animation=None, **kwargs):
+ self.title: str = title
+ self.description: str = description
+ self.photo: List[PhotoSize] = photo
+ self.text: str = text
+ self.text_entities: List[MessageEntity] = text_entities
+ self.animation: Animation = animation
+
+
+class Animation(JsonDeserializable):
+ """
+ This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
+
+ Telegram Documentation: https://core.telegram.org/bots/api#animation
+
+ :param file_id: Identifier for this file, which can be used to download or reuse the file
+ :type file_id: :obj:`str`
+
+ :param file_unique_id: Unique identifier for this file, which is supposed to be the same over time and for different
+ bots. Can't be used to download or reuse the file.
+ :type file_unique_id: :obj:`str`
+
+ :param width: Video width as defined by sender
+ :type width: :obj:`int`
+
+ :param height: Video height as defined by sender
+ :type height: :obj:`int`
+
+ :param duration: Duration of the video in seconds as defined by sender
+ :type duration: :obj:`int`
+
+ :param thumbnail: Optional. Animation thumbnail as defined by sender
+ :type thumbnail: :class:`telebot.types.PhotoSize`
+
+ :param file_name: Optional. Original animation filename as defined by sender
+ :type file_name: :obj:`str`
+
+ :param mime_type: Optional. MIME type of the file as defined by sender
+ :type mime_type: :obj:`str`
+
+ :param file_size: Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have
+ difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
+ double-precision float type are safe for storing this value.
+ :type file_size: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Animation`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if 'thumbnail' in obj and 'file_id' in obj['thumbnail']:
+ obj["thumbnail"] = PhotoSize.de_json(obj['thumbnail'])
+ else:
+ obj['thumbnail'] = None
+ return cls(**obj)
+
+ def __init__(self, file_id, file_unique_id, width=None, height=None, duration=None,
+ thumbnail=None, file_name=None, mime_type=None, file_size=None, **kwargs):
+ self.file_id: str = file_id
+ self.file_unique_id: str = file_unique_id
+ self.width: Optional[int] = width
+ self.height: Optional[int] = height
+ self.duration: Optional[int] = duration
+ self.thumbnail: Optional[PhotoSize] = thumbnail
+ self.file_name: Optional[str] = file_name
+ self.mime_type: Optional[str] = mime_type
+ self.file_size: Optional[int] = file_size
+
+ @property
+ def thumb(self) -> Optional[PhotoSize]:
+ log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+ return self.thumbnail
+
+
+class GameHighScore(JsonDeserializable):
+ """
+ This object represents one row of the high scores table for a game.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#gamehighscore
+
+ :param position: Position in high score table for the game
+ :type position: :obj:`int`
+
+ :param user: User
+ :type user: :class:`telebot.types.User`
+
+ :param score: Score
+ :type score: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.GameHighScore`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ obj['user'] = User.de_json(obj['user'])
+ return cls(**obj)
+
+ def __init__(self, position: int, user: User, score: int, **kwargs):
+ self.position: int = position
+ self.user: User = user
+ self.score: int = score
+
+
+# Payments
+
+class LabeledPrice(JsonSerializable, Dictionaryable):
+ """
+ This object represents a portion of the price for goods or services.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#labeledprice
+
+ :param label: Portion label
+ :type label: :obj:`str`
+
+ :param amount: Price of the product in the smallest units of the currency (integer, not float/double). For example,
+ for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past
+ the decimal point for each currency (2 for the majority of currencies).
+ :type amount: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.LabeledPrice`
+ """
+ def __init__(self, label, amount):
+ self.label: str = label
+ self.amount: int = amount
+
+ def to_dict(self):
+ return {
+ 'label': self.label, 'amount': self.amount
+ }
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+
+class Invoice(JsonDeserializable):
+ """
+ This object contains basic information about an invoice.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#invoice
+
+ :param title: Product name
+ :type title: :obj:`str`
+
+ :param description: Product description
+ :type description: :obj:`str`
+
+ :param start_parameter: Unique bot deep-linking parameter that can be used to generate this invoice
+ :type start_parameter: :obj:`str`
+
+ :param currency: Three-letter ISO 4217 currency code
+ :type currency: :obj:`str`
+
+ :param total_amount: Total price in the smallest units of the currency (integer, not float/double). For example,
+ for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past
+ the decimal point for each currency (2 for the majority of currencies).
+ :type total_amount: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Invoice`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, title, description, start_parameter, currency, total_amount, **kwargs):
+ self.title: str = title
+ self.description: str = description
+ self.start_parameter: str = start_parameter
+ self.currency: str = currency
+ self.total_amount: int = total_amount
+
+
+class ShippingAddress(JsonDeserializable):
+ """
+ This object represents a shipping address.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#shippingaddress
+
+ :param country_code: Two-letter ISO 3166-1 alpha-2 country code
+ :type country_code: :obj:`str`
+
+ :param state: State, if applicable
+ :type state: :obj:`str`
+
+ :param city: City
+ :type city: :obj:`str`
+
+ :param street_line1: First line for the address
+ :type street_line1: :obj:`str`
+
+ :param street_line2: Second line for the address
+ :type street_line2: :obj:`str`
+
+ :param post_code: Address post code
+ :type post_code: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ShippingAddress`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, country_code, state, city, street_line1, street_line2, post_code, **kwargs):
+ self.country_code: str = country_code
+ self.state: str = state
+ self.city: str = city
+ self.street_line1: str = street_line1
+ self.street_line2: str = street_line2
+ self.post_code: str = post_code
+
+
+class OrderInfo(JsonDeserializable):
+ """
+ This object represents information about an order.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#orderinfo
+
+ :param name: Optional. User name
+ :type name: :obj:`str`
+
+ :param phone_number: Optional. User's phone number
+ :type phone_number: :obj:`str`
+
+ :param email: Optional. User email
+ :type email: :obj:`str`
+
+ :param shipping_address: Optional. User shipping address
+ :type shipping_address: :class:`telebot.types.ShippingAddress`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.OrderInfo`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ obj['shipping_address'] = ShippingAddress.de_json(obj.get('shipping_address'))
+ return cls(**obj)
+
+ def __init__(self, name=None, phone_number=None, email=None, shipping_address=None, **kwargs):
+ self.name: str = name
+ self.phone_number: str = phone_number
+ self.email: Optional[str] = email
+ self.shipping_address: Optional[ShippingAddress] = shipping_address
+
+
+# noinspection PyUnresolvedReferences,PyShadowingBuiltins
+class ShippingOption(JsonSerializable):
+ """
+ This object represents one shipping option.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#shippingoption
+
+ :param id: Shipping option identifier
+ :type id: :obj:`str`
+
+ :param title: Option title
+ :type title: :obj:`str`
+
+ :param prices: List of price portions
+ :type prices: :obj:`list` of :class:`telebot.types.LabeledPrice`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ShippingOption`
+ """
+ def __init__(self, id, title):
+ self.id: str = id
+ self.title: str = title
+ self.prices: List[LabeledPrice] = []
+
+ def add_price(self, *args) -> 'ShippingOption':
+ """
+ Add LabeledPrice to ShippingOption
+
+ :param args: LabeledPrices
+ :type args: :obj:`LabeledPrice`
+
+ :return: None
+ """
+ for price in args:
+ self.prices.append(price)
+ return self
+
+ def to_json(self):
+ price_list = []
+ for p in self.prices:
+ price_list.append(p.to_dict())
+ json_dict = json.dumps({'id': self.id, 'title': self.title, 'prices': price_list})
+ return json_dict
+
+
+class SuccessfulPayment(JsonDeserializable):
+ """
+ This object contains basic information about a successful payment.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#successfulpayment
+
+ :param currency: Three-letter ISO 4217 currency code
+ :type currency: :obj:`str`
+
+ :param total_amount: Total price in the smallest units of the currency (integer, not float/double). For example,
+ for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past
+ the decimal point for each currency (2 for the majority of currencies).
+ :type total_amount: :obj:`int`
+
+ :param invoice_payload: Bot specified invoice payload
+ :type invoice_payload: :obj:`str`
+
+ :param subscription_expiration_date: Optional. Expiration date of the subscription, in Unix time; for recurring payments only
+ :type subscription_expiration_date: :obj:`int`
+
+ :param is_recurring: Optional. True, if the payment is a recurring payment, false otherwise
+ :type is_recurring: :obj:`bool`
+
+ :param is_first_recurring: Optional. True, if the payment is the first payment for a subscription
+ :type is_first_recurring: :obj:`bool`
+
+ :param shipping_option_id: Optional. Identifier of the shipping option chosen by the user
+ :type shipping_option_id: :obj:`str`
+
+ :param order_info: Optional. Order information provided by the user
+ :type order_info: :class:`telebot.types.OrderInfo`
+
+ :param telegram_payment_charge_id: Telegram payment identifier
+ :type telegram_payment_charge_id: :obj:`str`
+
+ :param provider_payment_charge_id: Provider payment identifier
+ :type provider_payment_charge_id: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.SuccessfulPayment`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ obj['order_info'] = OrderInfo.de_json(obj.get('order_info'))
+ return cls(**obj)
+
+ def __init__(self, currency, total_amount, invoice_payload, shipping_option_id=None, order_info=None,
+ telegram_payment_charge_id=None, provider_payment_charge_id=None,
+ subscription_expiration_date=None, is_recurring=None, is_first_recurring=None, **kwargs):
+ self.currency: str = currency
+ self.total_amount: int = total_amount
+ self.invoice_payload: str = invoice_payload
+ self.shipping_option_id: str = shipping_option_id
+ self.order_info: OrderInfo = order_info
+ self.telegram_payment_charge_id: str = telegram_payment_charge_id
+ self.provider_payment_charge_id: str = provider_payment_charge_id
+ self.subscription_expiration_date: Optional[int] = subscription_expiration_date
+ self.is_recurring: Optional[bool] = is_recurring
+ self.is_first_recurring: Optional[bool] = is_first_recurring
+
+
+# noinspection PyShadowingBuiltins
+class ShippingQuery(JsonDeserializable):
+ """
+ This object contains information about an incoming shipping query.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#shippingquery
+
+ :param id: Unique query identifier
+ :type id: :obj:`str`
+
+ :param from: User who sent the query
+ :type from: :class:`telebot.types.User`
+
+ :param invoice_payload: Bot specified invoice payload
+ :type invoice_payload: :obj:`str`
+
+ :param shipping_address: User specified shipping address
+ :type shipping_address: :class:`telebot.types.ShippingAddress`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.ShippingQuery`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ obj['from_user'] = User.de_json(obj.pop('from'))
+ obj['shipping_address'] = ShippingAddress.de_json(obj['shipping_address'])
+ return cls(**obj)
+
+ def __init__(self, id, from_user, invoice_payload, shipping_address, **kwargs):
+ self.id: str = id
+ self.from_user: User = from_user
+ self.invoice_payload: str = invoice_payload
+ self.shipping_address: ShippingAddress = shipping_address
+
+
+# noinspection PyShadowingBuiltins
+class PreCheckoutQuery(JsonDeserializable):
+ """
+ This object contains information about an incoming pre-checkout query.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#precheckoutquery
+
+ :param id: Unique query identifier
+ :type id: :obj:`str`
+
+ :param from: User who sent the query
+ :type from: :class:`telebot.types.User`
+
+ :param currency: Three-letter ISO 4217 currency code
+ :type currency: :obj:`str`
+
+ :param total_amount: Total price in the smallest units of the currency (integer, not float/double). For example,
+ for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past
+ the decimal point for each currency (2 for the majority of currencies).
+ :type total_amount: :obj:`int`
+
+ :param invoice_payload: Bot specified invoice payload
+ :type invoice_payload: :obj:`str`
+
+ :param shipping_option_id: Optional. Identifier of the shipping option chosen by the user
+ :type shipping_option_id: :obj:`str`
+
+ :param order_info: Optional. Order information provided by the user
+ :type order_info: :class:`telebot.types.OrderInfo`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.PreCheckoutQuery`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ obj['from_user'] = User.de_json(obj.pop('from'))
+ obj['order_info'] = OrderInfo.de_json(obj.get('order_info'))
+ return cls(**obj)
+
+ def __init__(self, id, from_user, currency, total_amount, invoice_payload, shipping_option_id=None, order_info=None, **kwargs):
+ self.id: str = id
+ self.from_user: User = from_user
+ self.currency: str = currency
+ self.total_amount: int = total_amount
+ self.invoice_payload: str = invoice_payload
+ self.shipping_option_id: Optional[str] = shipping_option_id
+ self.order_info: Optional[OrderInfo] = order_info
+
+
+# Stickers
+
+class StickerSet(JsonDeserializable):
+ """
+ This object represents a sticker set.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#stickerset
+
+ :param name: Sticker set name
+ :type name: :obj:`str`
+
+ :param title: Sticker set title
+ :type title: :obj:`str`
+
+ :param sticker_type: Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”
+ :type sticker_type: :obj:`str`
+
+ :param stickers: List of all set stickers
+ :type stickers: :obj:`list` of :class:`telebot.types.Sticker`
+
+ :param thumbnail: Optional. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format
+ :type thumbnail: :class:`telebot.types.PhotoSize`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.StickerSet`
+ """
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ stickers = []
+ for s in obj['stickers']:
+ stickers.append(Sticker.de_json(s))
+ obj['stickers'] = stickers
+ if 'thumbnail' in obj and 'file_id' in obj['thumbnail']:
+ obj['thumbnail'] = PhotoSize.de_json(obj['thumbnail'])
+ else:
+ obj['thumbnail'] = None
+ return cls(**obj)
+
+ def __init__(self, name, title, sticker_type, stickers, thumbnail=None, **kwargs):
+ self.name: str = name
+ self.title: str = title
+ self.sticker_type: str = sticker_type
+ self.stickers: List[Sticker] = stickers
+ self.thumbnail: Optional[PhotoSize] = thumbnail
+
+ @property
+ def thumb(self) -> Optional[PhotoSize]:
+ log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+ return self.thumbnail
+
+ @property
+ def contains_masks(self) -> bool:
+ log_deprecation_warning('The parameter "contains_masks" is deprecated, use "sticker_type instead"')
+ return self.sticker_type == 'mask'
+
+ @property
+ def is_animated(self) -> bool:
+ log_deprecation_warning('The parameter "is_animated" is deprecated since Bot API 7.2. Stickers can now be mixed')
+ return False
+
+ @property
+ def is_video(self) -> bool:
+ log_deprecation_warning('The parameter "is_video" is deprecated since Bot API 7.2. Stickers can now be mixed')
+ return False
+
+
+# noinspection PyShadowingBuiltins
+class Sticker(JsonDeserializable):
+ """
+ This object represents a sticker.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#sticker
+
+ :param file_id: Identifier for this file, which can be used to download or reuse the file
+ :type file_id: :obj:`str`
+
+ :param file_unique_id: Unique identifier for this file, which is supposed to be the same over time and for different
+ bots. Can't be used to download or reuse the file.
+ :type file_unique_id: :obj:`str`
+
+ :param type: Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is
+ independent from its format, which is determined by the fields is_animated and is_video.
+ :type type: :obj:`str`
+
+ :param width: Sticker width
+ :type width: :obj:`int`
+
+ :param height: Sticker height
+ :type height: :obj:`int`
+
+ :param is_animated: True, if the sticker is animated
+ :type is_animated: :obj:`bool`
+
+ :param is_video: True, if the sticker is a video sticker
+ :type is_video: :obj:`bool`
+
+ :param thumbnail: Optional. Sticker thumbnail in the .WEBP or .JPG format
+ :type thumbnail: :class:`telebot.types.PhotoSize`
+
+ :param emoji: Optional. Emoji associated with the sticker
+ :type emoji: :obj:`str`
+
+ :param set_name: Optional. Name of the sticker set to which the sticker belongs
+ :type set_name: :obj:`str`
+
+ :param premium_animation: Optional. Premium animation for the sticker, if the sticker is premium
+ :type premium_animation: :class:`telebot.types.File`
+
+ :param mask_position: Optional. For mask stickers, the position where the mask should be placed
+ :type mask_position: :class:`telebot.types.MaskPosition`
+
+ :param custom_emoji_id: Optional. For custom emoji stickers, unique identifier of the custom emoji
+ :type custom_emoji_id: :obj:`str`
+
+ :param needs_repainting: Optional. True, if the sticker must be repainted to a text color in messages,
+ the color of the Telegram Premium badge in emoji status, white color on chat photos, or another
+ appropriate color in other places
+ :type needs_repainting: :obj:`bool`
+
+ :param file_size: Optional. File size in bytes
+ :type file_size: :obj:`int`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.Sticker`
+ """
+
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string)
+ if 'thumbnail' in obj and 'file_id' in obj['thumbnail']:
+ obj['thumbnail'] = PhotoSize.de_json(obj['thumbnail'])
+ else:
+ obj['thumbnail'] = None
+ if 'mask_position' in obj:
+ obj['mask_position'] = MaskPosition.de_json(obj['mask_position'])
+ if 'premium_animation' in obj:
+ obj['premium_animation'] = File.de_json(obj['premium_animation'])
+ return cls(**obj)
+
+ def __init__(self, file_id, file_unique_id, type, width, height, is_animated,
+ is_video, thumbnail=None, emoji=None, set_name=None, mask_position=None, file_size=None,
+ premium_animation=None, custom_emoji_id=None, needs_repainting=None, **kwargs):
+ self.file_id: str = file_id
+ self.file_unique_id: str = file_unique_id
+ self.type: str = type
+ self.width: int = width
+ self.height: int = height
+ self.is_animated: bool = is_animated
+ self.is_video: bool = is_video
+ self.thumbnail: Optional[PhotoSize] = thumbnail
+ self.emoji: Optional[str] = emoji
+ self.set_name: Optional[str] = set_name
+ self.mask_position: Optional[MaskPosition] = mask_position
+ self.file_size: Optional[int] = file_size
+ self.premium_animation: Optional[File] = premium_animation
+ self.custom_emoji_id: Optional[str] = custom_emoji_id
+ self.needs_repainting: Optional[bool] = needs_repainting
+
+ @property
+ def thumb(self) -> Optional[PhotoSize]:
+ log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+ return self.thumbnail
+
+
+class MaskPosition(Dictionaryable, JsonDeserializable, JsonSerializable):
+ """
+ This object describes the position on faces where a mask should be placed by default.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#maskposition
+
+ :param point: The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or
+ “chin”.
+ :type point: :obj:`str`
+
+ :param x_shift: Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example,
+ choosing -1.0 will place mask just to the left of the default mask position.
+ :type x_shift: :obj:`float` number
+
+ :param y_shift: Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For
+ example, 1.0 will place the mask just below the default mask position.
+ :type y_shift: :obj:`float` number
+
+ :param scale: Mask scaling coefficient. For example, 2.0 means double size.
+ :type scale: :obj:`float` number
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.MaskPosition`
+ """
+
+ @classmethod
+ def de_json(cls, json_string):
+ if json_string is None: return None
+ obj = cls.check_json(json_string, dict_copy=False)
+ return cls(**obj)
+
+ def __init__(self, point, x_shift, y_shift, scale, **kwargs):
+ self.point: str = point
+ self.x_shift: float = x_shift
+ self.y_shift: float = y_shift
+ self.scale: float = scale
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ return {'point': self.point, 'x_shift': self.x_shift, 'y_shift': self.y_shift, 'scale': self.scale}
+
+
+# InputMedia
+
+# noinspection PyShadowingBuiltins
+class InputMedia(Dictionaryable, JsonSerializable):
+ """
+ This object represents the content of a media message to be sent. It should be one of
+
+ * :class:`InputMediaAnimation`
+ * :class:`InputMediaDocument`
+ * :class:`InputMediaAudio`
+ * :class:`InputMediaPhoto`
+ * :class:`InputMediaVideo`
+ """
+ def __init__(self, type, media, caption=None, parse_mode=None, caption_entities=None, thumbnail=None):
+ self.type: str = type
+ self.media: str = media
+ self.caption: Optional[str] = caption
+ self.parse_mode: Optional[str] = parse_mode
+ self.caption_entities: Optional[List[MessageEntity]] = caption_entities
+ self.thumbnail: Optional[Union[str, InputFile]] = thumbnail
+
+ if thumbnail is None:
+ self._thumbnail_name = ''
+ self._thumbnail_dic = None
+ elif service_utils.is_string(self.thumbnail):
+ self._thumbnail_name = ''
+ self._thumbnail_dic = self.thumbnail
+ else:
+ self._thumbnail_name = service_utils.generate_random_token()
+ self._thumbnail_dic = 'attach://{0}'.format(self._thumbnail_name)
+
+ if service_utils.is_string(self.media):
+ self._media_name = ''
+ self._media_dic = self.media
+ else:
+ self._media_name = service_utils.generate_random_token()
+ self._media_dic = 'attach://{0}'.format(self._media_name)
+
+ if self.__class__ is InputMedia:
+ # Make InputMedia as ABC some time...
+ log_deprecation_warning('The InputMedia class should not be instantiated directly. Use particular InputMediaXXX class instead')
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
+
+ def to_dict(self):
+ json_dict = {'type': self.type, 'media': self._media_dic}
+ if self._thumbnail_dic:
+ json_dict['thumbnail'] = self._thumbnail_dic
+ if self.caption:
+ json_dict['caption'] = self.caption
+ if self.parse_mode:
+ json_dict['parse_mode'] = self.parse_mode
+ if self.caption_entities:
+ json_dict['caption_entities'] = MessageEntity.to_list_of_dicts(self.caption_entities)
+ return json_dict
+
+ def convert_input_media(self):
+ """
+ :meta private:
+ """
+ if service_utils.is_string(self.media):
+ return self.to_json(), None
+
+ media_dict = {self._media_name: self.media}
+ if self._thumbnail_name:
+ media_dict[self._thumbnail_name] = self.thumbnail
+
+ return self.to_json(), media_dict
+
+
+class InputMediaPhoto(InputMedia):
+ """
+ Represents a photo to be sent.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inputmediaphoto
+
+ :param media: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an
+ HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using
+ multipart/form-data under name. More information on Sending Files »
+ :type media: :obj:`str`
+
+ :param caption: Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the photo caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param has_spoiler: Optional. True, if the uploaded photo is a spoiler
+ :type has_spoiler: :obj:`bool`
+
+ :param show_caption_above_media: Optional. True, if the caption should be shown above the photo
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InputMediaPhoto`
+ """
+ def __init__(self, media: Union[str, InputFile], caption: Optional[str] = None,
+ parse_mode: Optional[str] = None, caption_entities: Optional[List[MessageEntity]] = None,
+ has_spoiler: Optional[bool] = None, show_caption_above_media: Optional[bool] = None):
+ if service_utils.is_pil_image(media):
+ media = service_utils.pil_image_to_file(media)
+
+ super(InputMediaPhoto, self).__init__(
+ type="photo", media=media, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities)
+
+ self.has_spoiler: Optional[bool] = has_spoiler
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+
+ def to_dict(self):
+ ret = super(InputMediaPhoto, self).to_dict()
+ if self.has_spoiler is not None:
+ ret['has_spoiler'] = self.has_spoiler
+ if self.show_caption_above_media is not None:
+ ret['show_caption_above_media'] = self.show_caption_above_media
+ return ret
+
+
+class InputMediaVideo(InputMedia):
+ """
+ Represents a video to be sent.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inputmediavideo
+
+ :param media: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an
+ HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using
+ multipart/form-data under name. More information on Sending Files »
+ :type media: :obj:`str`
+
+ :param thumbnail: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported
+ server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should
+ not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be
+ only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using
+ multipart/form-data under . More information on Sending Files »
+ :type thumbnail: InputFile or :obj:`str`
+
+ :param cover: Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended),
+ pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under
+ name. More information on Sending Files »
+ :type cover: :obj:`str` or :class:`telebot.types.InputFile`
+
+ :param start_timestamp: Start timestamp for the video in the message
+ :type start_timestamp: :obj:`int`
+
+ :param caption: Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the video caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param width: Optional. Video width
+ :type width: :obj:`int`
+
+ :param height: Optional. Video height
+ :type height: :obj:`int`
+
+ :param duration: Optional. Video duration in seconds
+ :type duration: :obj:`int`
+
+ :param supports_streaming: Optional. Pass True, if the uploaded video is suitable for streaming
+ :type supports_streaming: :obj:`bool`
+
+ :param has_spoiler: Optional. True, if the uploaded video is a spoiler
+ :type has_spoiler: :obj:`bool`
+
+ :param show_caption_above_media: Optional. True, if the caption should be shown above the video
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InputMediaVideo`
+ """
+ def __init__(self, media: Union[str, InputFile], thumbnail: Optional[Union[str, InputFile]] = None,
+ caption: Optional[str] = None, parse_mode: Optional[str] = None,
+ caption_entities: Optional[List[MessageEntity]] = None, width: Optional[int] = None,
+ height: Optional[int] = None, duration: Optional[int] = None,
+ supports_streaming: Optional[bool] = None, has_spoiler: Optional[bool] = None,
+ show_caption_above_media: Optional[bool] = None, cover: Optional[Union[str, InputFile]] = None,
+ start_timestamp: Optional[int] = None):
+ super(InputMediaVideo, self).__init__(
+ type="video", media=media, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, thumbnail=thumbnail)
+ self.width: Optional[int] = width
+ self.height: Optional[int] = height
+ self.duration: Optional[int] = duration
+ self.supports_streaming: Optional[bool] = supports_streaming
+ self.has_spoiler: Optional[bool] = has_spoiler
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+ self.cover: Optional[str] = cover
+ self.start_timestamp: Optional[int] = start_timestamp
+
+ @property
+ def thumb(self) -> Optional[Union[str, Any]]:
+ log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+ return self.thumbnail
+
+ def to_dict(self):
+ ret = super(InputMediaVideo, self).to_dict()
+ if self.width:
+ ret['width'] = self.width
+ if self.height:
+ ret['height'] = self.height
+ if self.duration:
+ ret['duration'] = self.duration
+ if self.supports_streaming is not None:
+ ret['supports_streaming'] = self.supports_streaming
+ if self.has_spoiler is not None:
+ ret['has_spoiler'] = self.has_spoiler
+ if self.show_caption_above_media is not None:
+ ret['show_caption_above_media'] = self.show_caption_above_media
+ if self.cover:
+ ret['cover'] = self.cover
+ if self.start_timestamp:
+ ret['start_timestamp'] = self.start_timestamp
+ return ret
+
+
+class InputMediaAnimation(InputMedia):
+ """
+ Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inputmediaanimation
+
+ :param media: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an
+ HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using
+ multipart/form-data under name. More information on Sending Files »
+ :type media: :obj:`str`
+
+ :param thumbnail: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported
+ server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should
+ not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be
+ only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using
+ multipart/form-data under . More information on Sending Files »
+ :type thumbnail: InputFile or :obj:`str`
+
+ :param caption: Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the animation caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param width: Optional. Animation width
+ :type width: :obj:`int`
+
+ :param height: Optional. Animation height
+ :type height: :obj:`int`
+
+ :param duration: Optional. Animation duration in seconds
+ :type duration: :obj:`int`
+
+ :param has_spoiler: Optional. True, if the uploaded animation is a spoiler
+ :type has_spoiler: :obj:`bool`
+
+ :param show_caption_above_media: Optional. True, if the caption should be shown above the animation
+ :type show_caption_above_media: :obj:`bool`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InputMediaAnimation`
+ """
+
+ def __init__(self, media: Union[str, InputFile], thumbnail: Optional[Union[str, InputFile]] = None,
+ caption: Optional[str] = None, parse_mode: Optional[str] = None,
+ caption_entities: Optional[List[MessageEntity]] = None, width: Optional[int] = None,
+ height: Optional[int] = None, duration: Optional[int] = None,
+ has_spoiler: Optional[bool] = None, show_caption_above_media: Optional[bool] = None):
+ super(InputMediaAnimation, self).__init__(
+ type="animation", media=media, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, thumbnail=thumbnail)
+ self.width: Optional[int] = width
+ self.height: Optional[int] = height
+ self.duration: Optional[int] = duration
+ self.has_spoiler: Optional[bool] = has_spoiler
+ self.show_caption_above_media: Optional[bool] = show_caption_above_media
+
+
+ @property
+ def thumb(self) -> Optional[Union[str, Any]]:
+ log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+ return self.thumbnail
+
+ def to_dict(self):
+ ret = super(InputMediaAnimation, self).to_dict()
+ if self.width:
+ ret['width'] = self.width
+ if self.height:
+ ret['height'] = self.height
+ if self.duration:
+ ret['duration'] = self.duration
+ if self.has_spoiler is not None:
+ ret['has_spoiler'] = self.has_spoiler
+ if self.show_caption_above_media is not None:
+ ret['show_caption_above_media'] = self.show_caption_above_media
+ return ret
+
+
+class InputMediaAudio(InputMedia):
+ """
+ Represents an audio file to be treated as music to be sent.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inputmediaaudio
+
+ :param media: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an
+ HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using
+ multipart/form-data under name. More information on Sending Files »
+ :type media: :obj:`str`
+
+ :param thumbnail: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported
+ server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should
+ not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be
+ only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using
+ multipart/form-data under . More information on Sending Files »
+ :type thumbnail: InputFile or :obj:`str`
+
+ :param caption: Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing
+ :type caption: :obj:`str`
+
+ :param parse_mode: Optional. Mode for parsing entities in the audio caption. See formatting options for more
+ details.
+ :type parse_mode: :obj:`str`
+
+ :param caption_entities: Optional. List of special entities that appear in the caption, which can be specified
+ instead of parse_mode
+ :type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
+
+ :param duration: Optional. Duration of the audio in seconds
+ :type duration: :obj:`int`
+
+ :param performer: Optional. Performer of the audio
+ :type performer: :obj:`str`
+
+ :param title: Optional. Title of the audio
+ :type title: :obj:`str`
+
+ :return: Instance of the class
+ :rtype: :class:`telebot.types.InputMediaAudio`
+ """
+ def __init__(self, media: Union[str, InputFile], thumbnail: Optional[Union[str, InputFile]] = None,
+ caption: Optional[str] = None, parse_mode: Optional[str] = None,
+ caption_entities: Optional[List[MessageEntity]] = None, duration: Optional[int] = None,
+ performer: Optional[str] = None, title: Optional[str] = None):
+ super(InputMediaAudio, self).__init__(
+ type="audio", media=media, caption=caption, parse_mode=parse_mode, caption_entities=caption_entities, thumbnail=thumbnail)
+ self.duration: Optional[int] = duration
+ self.performer: Optional[str] = performer
+ self.title: Optional[str] = title
+
+ @property
+ def thumb(self) -> Optional[Union[str, Any]]:
+ log_deprecation_warning('The parameter "thumb" is deprecated, use "thumbnail" instead')
+ return self.thumbnail
+
+ def to_dict(self):
+ ret = super(InputMediaAudio, self).to_dict()
+ if self.duration:
+ ret['duration'] = self.duration
+ if self.performer:
+ ret['performer'] = self.performer
+ if self.title:
+ ret['title'] = self.title
+ return ret
+
+
+class InputMediaDocument(InputMedia):
+ """
+ Represents a general file to be sent.
+
+ Telegram Documentation: https://core.telegram.org/bots/api#inputmediadocument
+
+ :param media: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an
+ HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using
+ multipart/form-data under