Forgot to await from_file
This commit is contained in:
parent
a23c874518
commit
f1ba88a302
1 changed files with 1 additions and 1 deletions
|
@ -172,7 +172,7 @@ class EvalModule(niobot.Module):
|
||||||
if not isinstance(thumbnail, niobot.ThumbnailResponse):
|
if not isinstance(thumbnail, niobot.ThumbnailResponse):
|
||||||
return await ctx.respond("Failed to thumbnail: %r" % thumbnail)
|
return await ctx.respond("Failed to thumbnail: %r" % thumbnail)
|
||||||
fn = thumbnail.filename or "thumbnail.webp"
|
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)
|
return await ctx.respond("Downloaded from %r" % url, file=file)
|
||||||
|
|
||||||
async with aiohttp.ClientSession(headers={"User-Agent": niobot.__user_agent__}) as client:
|
async with aiohttp.ClientSession(headers={"User-Agent": niobot.__user_agent__}) as client:
|
||||||
|
|
Loading…
Reference in a new issue