How to download images with aiohttp?
<p>So I have a discord bot that I'm playing with to learn Python.  I have a command that downloads images, and edits/merges them, then sends the edited image to chat. I was using <code>requests</code> to do this before, but I was told by one of the library devs for discord.py that I should be using <code>aiohttp</code>instead of <code>requests</code>.  I can't find how to download images in <code>aiohttp</code>, I've tried a bunch of stuff, but none of it works.  </p>

<pre><code>if message.content.startswith("!async"):
    import aiohttp
    import random
    import time
    import shutil
    start = time.time()
    notr = 0
    imagemake = Image.new("RGBA",(2048,2160))
    imgsave = "H:\Documents\PyCharmProjects\ChatBot\Images"
    imagesend = os.path.join(imgsave,"merged.png")
    imgmergedsend =os.path.join(imgsave,"merged2.png")
    with aiohttp.ClientSession() as session:
        async with session.get("http://schoolido.lu/api/cards/788/") as resp:
            data = await resp.json()
            cardsave = session.get(data["card_image"])
            with open((os.path.join(imgsave, "card.png")),"wb") as out_file:
                shutil.copyfileobj(cardsave, out_file)
</code></pre>

<p>is what I have right now, but that still doesn't work. </p>

<p>So, is there a way to download images? </p>