diff options
author | 2019-08-05 19:02:08 +0200 | |
---|---|---|
committer | 2019-08-05 19:02:08 +0200 | |
commit | e906696dbc880f283146cb04aa8916f04f8ab545 (patch) | |
tree | f31e46c2ab16bfdeabf93a117e26536ac72b146e /bot | |
parent | Unify constants file quotation use (diff) | |
parent | Making sure the image BytesIO buffer gets processed correctly by using an exi... (diff) |
Merge pull request #249 from python-discord/snakes-and-ladders-bytesio-fix
Fixing the Snakes and Ladders game
Diffstat (limited to 'bot')
-rw-r--r-- | bot/seasons/evergreen/snakes/utils.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/seasons/evergreen/snakes/utils.py b/bot/seasons/evergreen/snakes/utils.py index 88fb2032..5d3b0dee 100644 --- a/bot/seasons/evergreen/snakes/utils.py +++ b/bot/seasons/evergreen/snakes/utils.py @@ -593,9 +593,8 @@ class SnakeAndLaddersGame: y_offset -= BOARD_PLAYER_SIZE * math.floor(i / player_row_size) board_img.paste(self.avatar_images[player.id], box=(x_offset, y_offset)) - stream = io.BytesIO() - board_img.save(stream, format='JPEG') - board_file = File(stream.getvalue(), filename='Board.jpg') + + board_file = File(frame_to_png_bytes(board_img), filename='Board.jpg') player_list = '\n'.join((user.mention + ": Tile " + str(self.player_tiles[user.id])) for user in self.players) # Store and send new messages |