remove encoding arg as binary mode doesn't need it
@@ -76,7 +76,7 @@ class Minecraft(commands.Cog):
mosaic_gen_partial = functools.partial(mosaic.generate, await img.read(use_cached=True), 1600)
_, img_bytes = await self.bot.loop.run_in_executor(pool, mosaic_gen_partial)
- with tempfile.NamedTemporaryFile(mode='wb+', encoding='utf8') as tmp:
+ with tempfile.NamedTemporaryFile(mode='wb+') as tmp:
tmp.write(img_bytes)
await ctx.send(file=discord.File(tmp.name, filename=img.filename))
