PhotoOptions and VideoOptions
This commit is contained in:
parent
c6ce1913dc
commit
b7f1e3e9ed
|
@ -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 {
|
||||
|
|
31
options.go
31
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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue