Create interface for file data.

This commit is contained in:
Syfaro 2021-08-20 15:31:52 -04:00
parent 000cb2eb0e
commit 816532053b
7 changed files with 268 additions and 209 deletions

View file

@ -1685,7 +1685,7 @@ type BaseInputMedia struct {
// pass an HTTP URL for Telegram to get a file from the Internet,
// or pass “attach://<file_attach_name>” to upload a new one
// using multipart/form-data under <file_attach_name> name.
Media interface{} `json:"media"`
Media RequestFileData `json:"media"`
// thumb intentionally missing as it is not currently compatible
// Caption of the video to be sent, 0-1024 characters after entities parsing.
@ -1717,7 +1717,7 @@ type InputMediaVideo struct {
// the file is supported server-side.
//
// optional
Thumb interface{} `json:"thumb,omitempty"`
Thumb RequestFileData `json:"thumb,omitempty"`
// Width video width
//
// optional
@ -1743,7 +1743,7 @@ type InputMediaAnimation struct {
// the file is supported server-side.
//
// optional
Thumb interface{} `json:"thumb,omitempty"`
Thumb RequestFileData `json:"thumb,omitempty"`
// Width video width
//
// optional
@ -1765,7 +1765,7 @@ type InputMediaAudio struct {
// the file is supported server-side.
//
// optional
Thumb interface{} `json:"thumb,omitempty"`
Thumb RequestFileData `json:"thumb,omitempty"`
// Duration of the audio in seconds
//
// optional
@ -1787,7 +1787,7 @@ type InputMediaDocument struct {
// the file is supported server-side.
//
// optional
Thumb interface{} `json:"thumb,omitempty"`
Thumb RequestFileData `json:"thumb,omitempty"`
// DisableContentTypeDetection disables automatic server-side content type
// detection for files uploaded using multipart/form-data. Always true, if
// the document is sent as part of an album