Documentation - v0.27.0
    Preparing search index...
    • Pin a message in a group, supergroup, channel or PM.

      For supergroups/channels, you must have appropriate permissions, either as an admin, or as default permissions

      Parameters

      • client: ITelegramClient
      • params: InputMessageId & {
            bothSides?: boolean;
            notify?: boolean;
            shouldDispatch?: true;
        }
        • OptionalbothSides?: boolean

          Whether to pin for both sides (only for private chats)

        • Optionalnotify?: boolean

          Whether to send a notification (only for legacy groups and supergroups)

        • OptionalshouldDispatch?: true

          Whether to dispatch the returned service message (if any) to the client's update handler.

      Returns Promise<Message | null>

      Service message about pinned message, if one was generated.