title: Send photo using telegram.bot
body: <p>I want to create a Robot in Telegram. After searching, I found telegram.bot in a Nuget Package.</p>
  
  <p>But I'm having trouble sending a photo. The function definition is like  </p>
  
  <pre><code>Bot.SendPhoto(int channelId, string photo, string caption)
  </code></pre>
  
  <p>But I don't know what is expected in the <code>string photo</code> parameter. Should I convert my image to a base64 string, or pass an image path, or ...?</p>
  
  <p>My code currently looks like this</p>
  
  <pre><code>var Bot = new Telegram.Bot.Api("API KEY");
  var b = new System.Net.WebClient().DownloadData(a.DefaultImage());
  System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(new System.IO.MemoryStream(b));
  var z = bmp.GetThumbnailImage(200, (200 * bmp.Height) / bmp.Width, 
     new System.Drawing.Image.GetThumbnailImageAbort(
        delegate { return true; }), IntPtr.Zero);
  System.IO.MemoryStream ms = new System.IO.MemoryStream();
  z.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
  var x = new Telegram.Bot.Types.FileToSend() 
  { 
      Filename = a.DefaultImage().Split('/').LastOrDefault(), Content = ms 
  };
  
  var t = Bot.SendPhoto("@Chanel", x, a.Title);
  </code></pre>
  
  <p>But this is causing an exception</p>
  
  <blockquote>
    <p>Telegram.Bot.Types.ApiRequestException: [Error]: Bad Request: File to
    send must be non-empty</p>
  </blockquote>