feat: added functions to access documents properties.
This commit is contained in:
parent
6940150f31
commit
5186fec028
1 changed files with 8 additions and 0 deletions
|
@ -74,6 +74,14 @@ func (u *Update) DocumentName() string {
|
||||||
return u.Message.Document.FileName
|
return u.Message.Document.FileName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (u *Update) DocumentSize() int {
|
||||||
|
return u.Message.Document.FileSize
|
||||||
|
}
|
||||||
|
|
||||||
|
func (u *Update) DocumentMimeType() string {
|
||||||
|
return u.Message.Document.MimeType
|
||||||
|
}
|
||||||
|
|
||||||
func (u *Update) HasPhotos() bool {
|
func (u *Update) HasPhotos() bool {
|
||||||
return u.Message != nil && u.Message.Photo != nil &&
|
return u.Message != nil && u.Message.Photo != nil &&
|
||||||
len(u.Message.Photo) != 0
|
len(u.Message.Photo) != 0
|
||||||
|
|
Loading…
Reference in a new issue