From 0bfefdf15deb305bb46ac76d4ad4c05b64ace3ea Mon Sep 17 00:00:00 2001 From: SwissCorePy <51398037+SwissCorePy@users.noreply.github.com> Date: Wed, 23 Jun 2021 19:57:44 +0200 Subject: [PATCH] changed allowed_updates in util to update_types i think its more clear name --- telebot/__init__.py | 4 ++-- telebot/util.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index 967f986..86f65c6 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -541,7 +541,7 @@ class TeleBot: Use logger levels from logging as a value. None/NOTSET = no error logging :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.allowed_updates for a complete list of available update 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. @@ -579,7 +579,7 @@ class TeleBot: :param long_polling_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.allowed_updates for a complete list of available update 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. diff --git a/telebot/util.py b/telebot/util.py index 8af740c..3dd71db 100644 --- a/telebot/util.py +++ b/telebot/util.py @@ -38,9 +38,10 @@ content_type_service = [ 'voice_chat_participants_invited', 'message_auto_delete_timer_changed' ] -allowed_updates = ["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" +update_types = [ + "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" ] class WorkerThread(threading.Thread):