title: Save an attachment from a command
body: <p>I want to make my bot download and save locally the attachments sent in the command (</p>
  <p>see the attachment:<br />
  <a href="https://i.stack.imgur.com/YpYHq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YpYHq.png" alt="see the attachment" /></a></p>
  <p>is it possible because the only thing I could find is this and it doesn't work as I wanted:</p>
  <pre><code>@client.command()
  async def hello(ctx):
      files = []
      for attachment in ctx.message.attachments:
          fp = BytesIO()
          await attachment.save(fp)
  </code></pre>