txlyre 1 day ago
parent
commit
e95f071456
1 changed files with 6 additions and 1 deletions
  1. 6 1
      commands.py

+ 6 - 1
commands.py

@@ -785,8 +785,13 @@ async def chess_handler(bot, event, command):
 
     for reply in result:
         if isinstance(reply, bytes):
+            buffer = BytesIO()
+            buffer.name = "board.png"
+            buffer.write(reply)
+            buffer.seek(0)
+
             await bot.send_file(
-                event.peer_id, file=reply, reply_to=event, force_document=False
+                event.peer_id, file=buffer, reply_to=event, force_document=False
             )
         else:
             await event.reply(reply)