Message.pin()¶
- async Message.pin()[source]¶
Shortcut for method
pin_chat_messagewill automatically fill method attributes:chat_id
message_id
- Parameters:
disable_notification (
bool) – Pass True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels.both_sides (
bool, optional) – Pass True to pin the message for both sides (you and recipient). Applicable to private chats only. Defaults to True for bots, which can only pin for both sides, and to False for users.
- Returns:
Message– On success, the service message is returned.- Raises:
RPCError – In case of a Telegram RPC error.