Skip to content

Commit

Permalink
bug fixing reply analysis mode
Browse files Browse the repository at this point in the history
  • Loading branch information
aaj2005 committed Nov 11, 2024
1 parent 689f946 commit c72e454
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cogs/commands/chess.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ async def reload_board(self, interaction: Interaction):
img = discord_file(bytesImage, filename="board.png", description=pgn[:1024])
self.message.attachments = [img]
for i in range(len(pgn)//1024):
self.message.attachments.append(discord_file("1pximage.png", filename="1.png", description=pgn[1024*i:1024*(i+1)]))
self.message.attachments.append(discord_file("1pximage.png", filename="1.png", description=pgn[1024*(i+1):1024*(i+2)]))

end = ""

Expand Down Expand Up @@ -441,8 +441,7 @@ async def initialise_board(self, ctx: Context, game, analysis_mode, pgn):
bytesImage = BytesIO(svg2png(bytestring=svg_board))
img = [discord_file(bytesImage, filename="board.png", description=pgn[:1024])]
for i in range(len(pgn)//1024):
img.append(discord_file("1pximage.png", filename="1.png", description=pgn[1024*i:1024*(i+1)]))

img.append(discord_file("1pximage.png", filename="1.png", description=pgn[1024*(i+1):1024*(i+2)]))
message = await ctx.send( header_message_format(pgn, last_move, board.turn), files=img, view=view)

# store the message in the view manager to edit later
Expand Down

0 comments on commit c72e454

Please sign in to comment.