mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix description
This commit is contained in:
parent
a9b878107c
commit
4179e502c3
@ -2928,8 +2928,7 @@ class TeleBot:
|
|||||||
Telegram documentation: https://core.telegram.org/bots/api#restrictchatmember
|
Telegram documentation: https://core.telegram.org/bots/api#restrictchatmember
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Please pass `telebot.types.ChatPermissions` object to `permissions` parameter instead of
|
Individual parameters are deprecated and will be removed, use 'permissions' instead.
|
||||||
passing all boolean parameters. Those boolean parameters won't be supported soon, so please take it into consideration.
|
|
||||||
|
|
||||||
:param chat_id: Unique identifier for the target group or username of the target supergroup
|
:param chat_id: Unique identifier for the target group or username of the target supergroup
|
||||||
or channel (in the format @channelusername)
|
or channel (in the format @channelusername)
|
||||||
@ -2997,8 +2996,7 @@ class TeleBot:
|
|||||||
can_pin_messages=can_pin_messages
|
can_pin_messages=can_pin_messages
|
||||||
)
|
)
|
||||||
logger.warning(
|
logger.warning(
|
||||||
'Please pass `telebot.types.ChatPermissions` object to `permissions` parameter instead of '
|
"Individual parameters are deprecated and will be removed, use 'permissions' instead."
|
||||||
'passing all boolean parameters. Those boolean parameters won\'t be supported soon, so please take it into consideration.'
|
|
||||||
)
|
)
|
||||||
return apihelper.restrict_chat_member(
|
return apihelper.restrict_chat_member(
|
||||||
self.token, chat_id, user_id, permissions, until_date, use_independent_chat_permissions)
|
self.token, chat_id, user_id, permissions, until_date, use_independent_chat_permissions)
|
||||||
|
@ -3786,8 +3786,7 @@ class AsyncTeleBot:
|
|||||||
Telegram documentation: https://core.telegram.org/bots/api#restrictchatmember
|
Telegram documentation: https://core.telegram.org/bots/api#restrictchatmember
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Please pass `telebot.types.ChatPermissions` object to `permissions` parameter instead of
|
Individual parameters are deprecated and will be removed, use 'permissions' instead
|
||||||
passing all boolean parameters. Those boolean parameters won't be supported soon, so please take it into consideration.
|
|
||||||
|
|
||||||
:param chat_id: Unique identifier for the target group or username of the target supergroup
|
:param chat_id: Unique identifier for the target group or username of the target supergroup
|
||||||
or channel (in the format @channelusername)
|
or channel (in the format @channelusername)
|
||||||
@ -3854,8 +3853,7 @@ class AsyncTeleBot:
|
|||||||
can_pin_messages=can_pin_messages
|
can_pin_messages=can_pin_messages
|
||||||
)
|
)
|
||||||
logger.warning(
|
logger.warning(
|
||||||
'Please pass `telebot.types.ChatPermissions` object to `permissions` parameter instead of '
|
"Individual parameters are deprecated and will be removed, use 'permissions' instead."
|
||||||
'passing all boolean parameters. Those boolean parameters won\'t be supported soon, so please take it into consideration.'
|
|
||||||
)
|
)
|
||||||
return await asyncio_helper.restrict_chat_member(
|
return await asyncio_helper.restrict_chat_member(
|
||||||
self.token, chat_id, user_id, permissions, until_date, use_independent_chat_permissions)
|
self.token, chat_id, user_id, permissions, until_date, use_independent_chat_permissions)
|
||||||
|
@ -3163,6 +3163,7 @@ class ChatPermissions(JsonDeserializable, JsonSerializable, Dictionaryable):
|
|||||||
self.can_send_voice_notes: bool = can_send_voice_notes
|
self.can_send_voice_notes: bool = can_send_voice_notes
|
||||||
|
|
||||||
if can_send_media_messages is not None:
|
if can_send_media_messages is not None:
|
||||||
|
logger.warning("can_send_media_messages is deprecated. Use individual parameters like can_send_audios, can_send_documents, etc.")
|
||||||
self.can_send_audios = can_send_media_messages
|
self.can_send_audios = can_send_media_messages
|
||||||
self.can_send_documents = can_send_media_messages
|
self.can_send_documents = can_send_media_messages
|
||||||
self.can_send_photos = can_send_media_messages
|
self.can_send_photos = can_send_media_messages
|
||||||
|
Loading…
Reference in New Issue
Block a user