Reputation: 87
How can I get a picture when the telegram user changes his main photo? Can I get this without cron?
Upvotes: 2
Views: 3866
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
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