pinChatMessage¶
Returns: bool
- class litegram.methods.pin_chat_message.PinChatMessage(*, chat_id: ChatIdUnion, message_id: int, business_connection_id: str | None = None, disable_notification: bool | None = None, **extra_data: Any)[source]¶
Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the ‘can_pin_messages’ right or the ‘can_edit_messages’ right to pin messages in groups and channels respectively. Returns
Trueon success.Source: https://core.telegram.org/bots/api#pinchatmessage
- chat_id: ChatIdUnion¶
Unique identifier for the target chat or username of the target channel (in the format
@channelusername)
Usage¶
As bot method¶
result: bool = await bot.pin_chat_message(...)
Method as object¶
Imports:
from litegram.methods.pin_chat_message import PinChatMessagealias:
from litegram.methods import PinChatMessage
With specific bot¶
result: bool = await bot(PinChatMessage(...))
As reply into Webhook in handler¶
return PinChatMessage(...)