title: Is there a way to get profile picture updates using python Telegram-Bot?
body: <p>So I'm using <a href="https://python-telegram-bot.readthedocs.io/en/stable/index.html" rel="nofollow noreferrer">python-telegram-bot</a> for telegram integration into another application. My goal is to have the profile pictures of a user on telegram within my application. (Users and group chats)</p>
  <p>Getting a user's or group's avatar is easy, so is downloading and using it in my app. However, what if the user changes their profile picture? I couldn't find any update message or handler in the documentations that allows for a bot to retrieve a picture change, not even for groups.</p>
  <p>My first thought was to first retrieve all pictures and store the <a href="https://python-telegram-bot.readthedocs.io/en/stable/telegram.photosize.html#telegram.PhotoSize.file_id" rel="nofollow noreferrer">file_id</a> in a database, then periodically check that user's/group's pictures and go back through their pictures until <code>file_id</code> matches the last saved <code>file_id</code> in the database.</p>
  <p>This combined with a <a href="https://python-telegram-bot.readthedocs.io/en/stable/telegram.ext.jobqueue.html" rel="nofollow noreferrer">JobQueue</a> is the best thing I can come up with, so I'll self-answer using that, but I think it's still not a perfect solution so if anyone has a better idea I'd appreciate an answer.</p>
  <p>I'm specifically looking for a better solution for groups, since I don't think there is a way to retrieve any but the most recent picture for groups, and my application should retrieve <em>all</em> of them. Another flaw my self-answer has is that if a user changes the profile picture twice within those six hours, I will only get the most recent one. This can be fixed for users with the <code>offset</code> attribute in the bot call, but the <a href="https://python-telegram-bot.readthedocs.io/en/stable/telegram.bot.html?highlight=getchat#telegram.Bot.get_chat" rel="nofollow noreferrer">method</a> to get profile pictures of a group does not seem to have that.</p>
  <h1>tl;dr:</h1>
  <p>How can I retrieve <strong>updates</strong> whenever a user changes their <strong>or a groups</strong> profile picture the most efficient and reliable way using python-telegram-bot and python 3.5?</p>