sendable: add sending without reply field

pull/405/head
Nikita 3 years ago
parent 44945b1703
commit f136c77a4a

@ -53,6 +53,9 @@ type SendOptions struct {
// DisableContentDetection abilities to disable server-side file content type detection.
DisableContentDetection bool
// AllowWithoutReply allows sending messages not a as reply if the replied-to message has already been deleted.
AllowWithoutReply bool
}
func (og *SendOptions) copy() *SendOptions {

@ -199,6 +199,10 @@ func (b *Bot) embedSendOptions(params map[string]string, opt *SendOptions) {
params["disable_content_type_detection"] = "true"
}
if opt.AllowWithoutReply {
params["allow_sending_without_reply"] = "true"
}
if opt.ReplyMarkup != nil {
processButtons(opt.ReplyMarkup.InlineKeyboard)
replyMarkup, _ := json.Marshal(opt.ReplyMarkup)

Loading…
Cancel
Save