Message.pin()

Message.pin()

Bound method pin of Message.

Use as a shortcut for:

client.pin_chat_message(
    chat_id=message.chat.id,
    message_id=message_id
)

Example

message.pin()
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.

Returns

True on success.

Raises

RPCError – In case of a Telegram RPC error.