title: python telegrambot store chat id
body: <p>I am wondering how I could store/read out a user chat ID to later send them messages.</p>
  <p>Example would be, that the user is adding my telegram bot and sends him a message.
  Later on in my program at some point, when a sepcific situation occurs, I want to send a message to the specific user.</p>
  <p>For a simple example I have this code:</p>
  <pre><code>a=1
  b=2
  
  if a &gt; b:
       # at this point python should send a message to a user via telegram privat chat
  
  else:
      # send a different message
  </code></pre>
  <p>I know how to handle a response to a command sent by the user in the telegram chat, but not how to send a message to a user without receiving a command first. I think there fore I would need to have a way to store the users chat Id first to later refer to that Id when sending the message.</p>
  <p>The point is I want to compile my program to .exe later on and send it to some friends and it should work for them as well.</p>