mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2021-05-13 03:08:02 +03:00
@@ -1239,7 +1239,7 @@ class TeleBot:
|
|||||||
"""
|
"""
|
||||||
return apihelper.pin_chat_message(self.token, chat_id, message_id, disable_notification)
|
return apihelper.pin_chat_message(self.token, chat_id, message_id, disable_notification)
|
||||||
|
|
||||||
def unpin_chat_message(self, chat_id, message_id):
|
def unpin_chat_message(self, chat_id, message_id=None):
|
||||||
"""
|
"""
|
||||||
Use this method to unpin specific pinned message in a supergroup chat.
|
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.
|
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
||||||
|
|||||||
@@ -830,7 +830,7 @@ def pin_chat_message(token, chat_id, message_id, disable_notification=None):
|
|||||||
return _make_request(token, method_url, params=payload, method='post')
|
return _make_request(token, method_url, params=payload, method='post')
|
||||||
|
|
||||||
|
|
||||||
def unpin_chat_message(token, chat_id, message_id):
|
def unpin_chat_message(token, chat_id, message_id=None):
|
||||||
method_url = 'unpinChatMessage'
|
method_url = 'unpinChatMessage'
|
||||||
payload = {'chat_id': chat_id, 'message_id': message_id}
|
payload = {'chat_id': chat_id, 'message_id': message_id}
|
||||||
return _make_request(token, method_url, params=payload, method='post')
|
return _make_request(token, method_url, params=payload, method='post')
|
||||||
|
|||||||
Reference in New Issue
Block a user