InputPaidMedia.livePhoto constructor
- @Assert.new('type == InputPaidMediaType.livePhoto', 'type must be InputPaidMediaType.livePhoto')
- @Default.new(InputPaidMediaType.livePhoto) @JsonKey.new(name: 'type') InputPaidMediaType type,
- @InputFileConverter() @JsonKey.new(name: 'media') required InputFile media,
- @InputFileConverter() @JsonKey.new(name: 'photo') required InputFile photo,
The paid media to send is a live photo.
Implementation
@Assert(
'type == InputPaidMediaType.livePhoto',
'type must be InputPaidMediaType.livePhoto',
)
const factory InputPaidMedia.livePhoto({
/// Type of the media, must be live_photo
@Default(InputPaidMediaType.livePhoto)
@JsonKey(name: 'type')
final InputPaidMediaType type,
/// Video of the live photo to send. Pass a file_id to send a file that
/// exists on the Telegram servers (recommended) or pass
/// `attach://<file_attach_name>` to upload a new one using
/// multipart/form-data under `<file_attach_name>` name. Sending live photos
/// by a URL is currently unsupported.
@InputFileConverter()
@JsonKey(name: 'media')
required final InputFile media,
/// The static photo to send. Pass a file_id to send a file that exists on
/// the Telegram servers (recommended) or pass `attach://<file_attach_name>`
/// to upload a new one using multipart/form-data under `<file_attach_name>`
/// name. Sending live photos by a URL is currently unsupported.
@InputFileConverter()
@JsonKey(name: 'photo')
required final InputFile photo,
}) = InputPaidMediaLivePhoto;