Erkin  Pardayev
Erkin Pardayev

Reputation: 87

How do I know with telegram bot if a user has changed telegram profile photo?

How can I get a picture when the telegram user changes his main photo? Can I get this without cron?

Upvotes: 2

Views: 3866

Answers (2)

Naser.Sadeghi
Naser.Sadeghi

Reputation: 1302

You can use getUserProfilePhotos feature and save the last profile picture in a database. Then by checking the last profile picture in specific time periods (for example every 30 seconds) you can check whether the picture is changed or not. And if it was changed you can notify yourself.

Upvotes: 1

Sean Wei
Sean Wei

Reputation: 7975

I assume that you know getUserProfilePhotos method.
You can't get notified when users changed their profile photo, so you need to track it, like using cronjob.

Upvotes: 1

Related Questions