FILE / ScuroNeko/Laniakea

tgapi/passport_methods.go

Исходный файл и его история в репозитории.
FILE e92a0d37f3c41e5753dbce5fc143cb4091006f2c
Files
Laniakea/tgapi/passport_methods.go
T
ScuroNeko 83bcab6415 Rename tgapi request structs
Add MaybeInaccessibleMessage tests and godoc
Update wiki and Bot API docs for the new naming
2026-04-06 16:06:57 +03:00

27 lines
1.1 KiB
Go

package tgapi
import "context"
// SetPassportDataErrors holds parameters for the setPassportDataErrors method.
// See https://core.telegram.org/bots/api#setpassportdataerrors
type SetPassportDataErrors struct {
UserID int64 `json:"user_id"`
Errors []PassportElementError `json:"errors"`
}
// SetPassportDataErrors informs a user about Telegram Passport data errors.
// Returns true on success.
// See https://core.telegram.org/bots/api#setpassportdataerrors
func (api *API) SetPassportDataErrors(params SetPassportDataErrors) (bool, error) {
req := NewRequest[bool]("setPassportDataErrors", params)
return req.Do(api)
}
// SetPassportDataErrorsWithContext is the context-aware variant of SetPassportDataErrors.
// It executes the same request but uses ctx for cancellation and deadlines.
// See https://core.telegram.org/bots/api#setpassportdataerrors
func (api *API) SetPassportDataErrorsWithContext(ctx context.Context, params SetPassportDataErrors) (bool, error) {
req := NewRequest[bool]("setPassportDataErrors", params)
return req.DoWithContext(ctx, api)
}