• Set a new profile photo or video for the current user.

    You can also pass a file ID or an InputPhoto to re-use existing photo.

    Parameters

    • client: ITelegramClient
    • params: {
          media: TypeInputPhoto | InputFileLike;
          previewSec?: number;
          type: "photo" | "video";
      }
      • media: TypeInputPhoto | InputFileLike

        Input media file

      • OptionalpreviewSec?: number

        When type = video, timestamp in seconds which will be shown as a static preview.

      • type: "photo" | "video"

        Media type (photo or video)

    Returns Promise<Photo>