Forgot to await from_file

This commit is contained in:
Nexus 2024-09-08 01:30:24 +01:00
parent a23c874518
commit f1ba88a302

View file

@ -172,7 +172,7 @@ class EvalModule(niobot.Module):
if not isinstance(thumbnail, niobot.ThumbnailResponse):
return await ctx.respond("Failed to thumbnail: %r" % thumbnail)
fn = thumbnail.filename or "thumbnail.webp"
file = niobot.ImageAttachment.from_file(thumbnail.body, fn)
file = await niobot.ImageAttachment.from_file(thumbnail.body, fn)
return await ctx.respond("Downloaded from %r" % url, file=file)
async with aiohttp.ClientSession(headers={"User-Agent": niobot.__user_agent__}) as client: