Remove deprecated methods.
parent
67abf47ae8
commit
99262cf76c
13
configs.go
13
configs.go
|
@ -3,7 +3,6 @@ package tgbotapi
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
@ -91,7 +90,6 @@ func (chat *BaseChat) values() (url.Values, error) {
|
||||||
// BaseFile is a base type for all file config types.
|
// BaseFile is a base type for all file config types.
|
||||||
type BaseFile struct {
|
type BaseFile struct {
|
||||||
BaseChat
|
BaseChat
|
||||||
FilePath string
|
|
||||||
File interface{}
|
File interface{}
|
||||||
FileID string
|
FileID string
|
||||||
UseExisting bool
|
UseExisting bool
|
||||||
|
@ -135,16 +133,7 @@ func (file BaseFile) params() (map[string]string, error) {
|
||||||
|
|
||||||
// getFile returns the file.
|
// getFile returns the file.
|
||||||
func (file BaseFile) getFile() interface{} {
|
func (file BaseFile) getFile() interface{} {
|
||||||
var result interface{}
|
return file.File
|
||||||
if file.FilePath == "" {
|
|
||||||
result = file.File
|
|
||||||
} else {
|
|
||||||
log.Println("FilePath is deprecated.")
|
|
||||||
log.Println("Please use BaseFile.File instead.")
|
|
||||||
result = file.FilePath
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// useExistingFile returns if the BaseFile has already been uploaded.
|
// useExistingFile returns if the BaseFile has already been uploaded.
|
||||||
|
|
Loading…
Reference in New Issue