diff --git a/filters.go b/filters.go index 70b7eab..b061447 100644 --- a/filters.go +++ b/filters.go @@ -1,8 +1,11 @@ package nechotron -import "strings" +import ( + "strings" +) type FilterFn func(u *Update) bool +type FilteredValue interface{} func TextStartsWith(text string) FilterFn { return func(u *Update) bool { diff --git a/options.go b/options.go index 0c0bd7f..288837e 100644 --- a/options.go +++ b/options.go @@ -84,3 +84,34 @@ func (o *OptionsBuilder) MessageOptions() *echotron.MessageOptions { AllowSendingWithoutReply: o.allowSendingWithoutReply, } } + +func (o *OptionsBuilder) PhotoOptions() *echotron.PhotoOptions { + return &echotron.PhotoOptions{ + ReplyMarkup: o.replyMarkup, + ParseMode: o.parseMode, + Caption: o.caption, + CaptionEntities: o.entities, + MessageThreadID: int(o.messageThreadID), + ReplyToMessageID: o.replyToMessageID, + HasSpoiler: o.hasSpoiler, + DisableNotification: o.disableNotification, + ProtectContent: o.protectContent, + AllowSendingWithoutReply: o.allowSendingWithoutReply, + } +} + +func (o *OptionsBuilder) VideoOptions() *echotron.VideoOptions { + return &echotron.VideoOptions{ + ReplyMarkup: o.replyMarkup, + ParseMode: o.parseMode, + Caption: o.caption, + CaptionEntities: o.entities, + SupportsStreaming: true, + MessageThreadID: int(o.messageThreadID), + ReplyToMessageID: o.replyToMessageID, + HasSpoiler: o.hasSpoiler, + DisableNotification: o.disableNotification, + ProtectContent: o.protectContent, + AllowSendingWithoutReply: o.allowSendingWithoutReply, + } +}