func (file BaseFile) params() (map[string]string, error) {
	params := make(map[string]string)
	if file.ChannelUsername != "" {
		params["chat_id"] = file.ChannelUsername
	} else {
		params["chat_id"] = strconv.FormatInt(file.ChatID, 10)
	}
	if file.ReplyToMessageID != 0 {
		params["reply_to_message_id"] = strconv.Itoa(file.ReplyToMessageID)
	}
	if file.ReplyMarkup != nil {
		data, err := json.Marshal(file.ReplyMarkup)
		if err != nil {
			return params, err
		}
		params["reply_markup"] = string(data)
	}
	if file.MimeType != "" {
		params["mime_type"] = file.MimeType
	}
	if file.FileSize > 0 {
		params["file_size"] = strconv.Itoa(file.FileSize)
	}
	params["disable_notification"] = strconv.FormatBool(file.DisableNotification)
	return params, nil
}
params returns a map[string]string representation of BaseFile.
package tgbotapi
import (
	"encoding/json"
	"io"
	"net/url"
	"strconv"
)
const (
	APIEndpoint = "https://api.telegram.org/bot%s/%s"
	FileEndpoint = "https://api.telegram.org/file/bot%s/%s"
)
const (
	ChatTyping         = "typing"
	ChatUploadPhoto    = "upload_photo"
	ChatRecordVideo    = "record_video"
	ChatUploadVideo    = "upload_video"
	ChatRecordAudio    = "record_audio"
	ChatUploadAudio    = "upload_audio"
	ChatUploadDocument = "upload_document"
	ChatFindLocation   = "find_location"
)
const (
	ErrAPIForbidden = "forbidden"
)
const (
	ModeMarkdown = "Markdown"
	ModeHTML     = "HTML"
)
const (
	ErrBadFileType = "bad file type"
	ErrBadURL      = "bad or empty url"
)
type Chattable interface {
	values() (url.Values, error)
	method() string
}
type Fileable interface {
	Chattable
	params() (map[string]string, error)
	name() string
	getFile() interface{}
	useExistingFile() bool
}
type BaseChat struct {
	ChatID              int64  
	ChannelUsername     string
	ReplyToMessageID    int
	ReplyMarkup         interface{}
	DisableNotification bool
}
func (chat *BaseChat) values() (url.Values, error) {
	v := url.Values{}
	if chat.ChannelUsername != "" {
		v.Add("chat_id", chat.ChannelUsername)
	} else {
		v.Add("chat_id", strconv.FormatInt(chat.ChatID, 10))
	}
	if chat.ReplyToMessageID != 0 {
		v.Add("reply_to_message_id", strconv.Itoa(chat.ReplyToMessageID))
	}
	if chat.ReplyMarkup != nil {
		data, err := json.Marshal(chat.ReplyMarkup)
		if err != nil {
			return v, err
		}
		v.Add("reply_markup", string(data))
	}
	v.Add("disable_notification", strconv.FormatBool(chat.DisableNotification))
	return v, nil
}
type BaseFile struct {
	BaseChat
	File        interface{}
	FileID      string
	UseExisting bool
	MimeType    string
	FileSize    int
}