feat: added functions to access documents properties.

This commit is contained in:
Andrey Parhomenko 2024-02-22 16:31:23 +05:00
parent 6940150f31
commit 5186fec028

View file

@ -74,6 +74,14 @@ func (u *Update) DocumentName() string {
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 {
return u.Message != nil && u.Message.Photo != nil &&
len(u.Message.Photo) != 0