I’m trying to pull the data, whether the user has a premium tg, but it does not work.
Сan you know the solution to this problem and help me?
I’m trying to pull the data, whether the user has a premium tg, but it does not work.
Сan you know the solution to this problem and help me?
2
Answers
The Telegram Bot Api provides you with an
User
object, representing a Telegram user.This object contains the following field:
This has been added in Bot API 6.1, released on June 20, 2022
So you’ll just need to use Telegraf to get the User object, and check if the
is_premium
key is set.Example, the
User
should be available asfrom
onctx
: