From 5186fec028af8113df509909b8a5733a645453b9 Mon Sep 17 00:00:00 2001 From: surdeus Date: Thu, 22 Feb 2024 16:31:23 +0500 Subject: [PATCH] feat: added functions to access documents properties. --- update.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/update.go b/update.go index 329563e..7932745 100644 --- a/update.go +++ b/update.go @@ -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