title: discord.py send BytesIO
body: <p>I am manipulating an image using Pillow, and then want to send it to Discord. My code: <a href="https://paste.pythondiscord.com/comebefupo.py" rel="nofollow noreferrer">https://paste.pythondiscord.com/comebefupo.py</a></p>
  <p>When using image.show(), the manipulated image is shown fine.</p>
  <p>however, when I want to upload the image to Discord, the bot gets stuck and no error is thrown:</p>
  <pre class="lang-py prettyprint-override"><code>got bytes from direct image string
  got bytes from member/user pfp or str
  opened image
  opened draw
  drew top text
  drew bottom text
  prepared buffer
  prepared file
  # Bot just gets stuck here, no errors
  </code></pre>
  <p>According to multiple sources (<a href="https://www.reddit.com/r/learnpython/comments/esmhxu/how_can_i_upload_a_pil_image_object_to_a_discord/ffb65qs?utm_source=share&amp;utm_medium=web2x&amp;context=3" rel="nofollow noreferrer">1</a>, <a href="https://gist.github.com/Gorialis/e89482310d74a90a946b44cf34009e88" rel="nofollow noreferrer">2</a>), I am doing the right thing by saving the image into a BytesIO stream, and then using <code>seek(0)</code>.</p>
  <p>According to the <a href="https://discordpy.readthedocs.io/en/neo-docs/api.html?highlight=send#discord.File.fp" rel="nofollow noreferrer">documentation</a> for a discord.File, it takes a <code>io.BufferedIOBase</code> which is (I believe) I put in.</p>
  <p>EDIT:
  saving the image first, and then sending that works.</p>
  <pre class="lang-py prettyprint-override"><code># Return whole image object
  return image
  
  self.convert_bytes(image_bytes, top_text, bottom_text).save('image.png')
  await ctx.send(file=discord.File('image.png'))
  </code></pre>
  <p>I have no clue why this works, and the other thing doesnt...</p>