Closed Muaath5 closed 4 years ago
Passport-related logic is implemented in a separate package: https://github.com/TelegramBots/Telegram.Bot.Extensions.Passport
This method is included there.
But why this method is an extension method?
I suggest to add it to TelegramBotClient
with no any extensions.
You can't extend a class that way from an external package - an extension method is the only way.
We are also removing almost all methods from TelegramBotClient
and using extension methods instead in a future release. That is because we want to keep the ITelegramBotClient
interface minimal and avoid breaking it with every version.
From a caller's perspective, TelegramBotClient
use stays the same
I would like to request/propose a feature
I suggest add
SetPassportDataErrors
method toTelegramBotClient
Why? Because It's Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change).
Returns True on success.
Telegram API documentation for this method