gotd/message: fix generators and update entity utilities

This commit is contained in:
Tulir Asokan
2026-03-03 15:16:44 +02:00
parent e5914196c5
commit 67adededff
5 changed files with 40 additions and 4 deletions
+10
View File
@@ -211,3 +211,13 @@ func Blockquote(s string, collapsed bool) StyledTextOption {
return nil
})
}
// FormattedDate formats text as FormattedDate entity.
//
// See https://core.telegram.org/constructor/messageEntityFormattedDate.
func FormattedDate(s string, relative bool, shortTime bool, longTime bool, shortDate bool, longDate bool, dayOfWeek bool, date int) StyledTextOption {
return styledTextOption(s, func(b *textBuilder) error {
b.FormattedDate(s, relative, shortTime, longTime, shortDate, longDate, dayOfWeek, date)
return nil
})
}