file: change FileSize type to int64

pull/558/head
Demian 2 years ago
parent d9b2c62833
commit b16c14c615

@ -9,7 +9,7 @@ import (
type File struct { type File struct {
FileID string `json:"file_id"` FileID string `json:"file_id"`
UniqueID string `json:"file_unique_id"` UniqueID string `json:"file_unique_id"`
FileSize int `json:"file_size"` FileSize int64 `json:"file_size"`
// FilePath is used for files on Telegram server. // FilePath is used for files on Telegram server.
FilePath string `json:"file_path"` FilePath string `json:"file_path"`

@ -87,7 +87,7 @@ func (d *Document) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error
b.embedSendOptions(params, opt) b.embedSendOptions(params, opt)
if d.FileSize != 0 { if d.FileSize != 0 {
params["file_size"] = strconv.Itoa(d.FileSize) params["file_size"] = strconv.FormatInt(d.FileSize, 10)
} }
if d.DisableTypeDetection { if d.DisableTypeDetection {
params["disable_content_type_detection"] = "true" params["disable_content_type_detection"] = "true"

Loading…
Cancel
Save