Callbacks

This commit is contained in:
2023-06-07 21:22:50 +03:00
parent f4346d8859
commit 01d04199fd
3 changed files with 34 additions and 2 deletions

View File

@ -230,6 +230,13 @@ func (u *Update) Text() string {
return ""
}
func (u *Update) Callback() string {
if u.IsCallback() {
return u.CallbackQuery.Data
}
return ""
}
func (u *Update) Entities() []*echotron.MessageEntity {
if u.IsText() {
return u.Message.Entities