Added overloads for MatrixBot.download_file
This commit is contained in:
@@ -52,9 +52,6 @@ async def on_image(ctx: EventContext) -> None:
|
||||
s = time.time()
|
||||
data = await ctx.bot.download_file(ctx)
|
||||
took_time = time.time() - s
|
||||
if not isinstance(data, bytes):
|
||||
await ctx.bot.send_text(ctx.room, "😧")
|
||||
return
|
||||
# convert to Image
|
||||
with BytesIO(data) as buf:
|
||||
img = Image.open(buf)
|
||||
|
||||
Reference in New Issue
Block a user