title: How to get a User object from a message in group at Telegram Bot
body: <p>Recently I was working on a simple Telegram bot written in python (with the <a href="https://pypi.python.org/pypi/python-telegram-bot" rel="nofollow"><code>python-telegram-bot</code> library</a>). In this bot I can get the last message object using following command :</p>
  
  <pre><code>bot.getUpdates()[-1].message
  </code></pre>
  
  <p>and according the <a href="https://core.telegram.org/bots/api#message" rel="nofollow">Telegram Doc</a> a message object is contains some attributes such as <code>message_id,from,date,chat</code> ,... which the <code>from</code> attribute returns a User object which is the sender of a message. But since <code>from</code> is a <a href="https://docs.python.org/2/tutorial/modules.html#importing-from-a-package" rel="nofollow">python keyword</a> (used at import time) thus we can not use it which raise a SyntaxError.</p>
  
  <p>As an alternative way we can use <code>chat</code> attribute which returns a User object in personal chats and a <code>GroupChat</code> object in groups that it doesn't contains and information about the user.Also I couldn't find any direct way to report this bug.</p>
  
  <p>So the question is that is there any way to do this job? or any alternative solution maybe?</p>