(new): keyboard helpers
Golang lint / lint (push) Successful in 7m2s
Golang lint / lint (pull_request) Successful in 7m7s

(tests): payload encoding
(doc): changelog
This commit is contained in:
2026-05-04 11:35:02 +03:00
parent 7205b21fa2
commit daa1b862ed
5 changed files with 83 additions and 11 deletions
+5
View File
@@ -594,6 +594,11 @@ func (ctx *MsgContext) NewInlineKeyboard(maxRow int) *InlineKeyboard {
return NewInlineKeyboard(ctx.payloadType, maxRow)
}
// NewInlineKeyboardButton creates a button builder using the context payload encoding.
func (ctx *MsgContext) NewInlineKeyboardButton(text string) InlineKeyboardButtonBuilder {
return NewInlineKeyboardButton(text).SetPayloadType(ctx.payloadType)
}
func bindPositional(args []string, dst any) error {
v := reflect.ValueOf(dst)
if v.Kind() != reflect.Pointer || v.IsNil() {