Skip to content

Commit

Permalink
options: add protect
Browse files Browse the repository at this point in the history
  • Loading branch information
setval committed Feb 5, 2022
1 parent c277d8d commit 496146d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const (
// AllowWithoutReply = SendOptions.AllowWithoutReply
AllowWithoutReply

// Protected = SendOptions.Protected
Protected

// ForceReply = ReplyMarkup.ForceReply
ForceReply

Expand Down
2 changes: 2 additions & 0 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ func extractOptions(how []interface{}) *SendOptions {
opts.ReplyMarkup = &ReplyMarkup{}
}
opts.ReplyMarkup.RemoveKeyboard = true
case Protected:
opts.Protected = true
default:
panic("telebot: unsupported flag-option")
}
Expand Down

0 comments on commit 496146d

Please sign in to comment.