Fix decoding issue

This commit is contained in:
Nexus 2023-11-13 19:43:22 +00:00
parent 30d7048113
commit ed277d9f1f
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -1893,7 +1893,7 @@ class OtherCog(commands.Cog):
if context: if context:
try: try:
context_decoded = base64.b85decode(context).decode() context_decoded = base64.b64decode(context).decode()
context_decompressed = await asyncio.to_thread( context_decompressed = await asyncio.to_thread(
functools.partial(zlib.decompress, context_decoded.encode()) functools.partial(zlib.decompress, context_decoded.encode())
) )
@ -2124,7 +2124,7 @@ class OtherCog(commands.Cog):
) )
end = time() end = time()
compress_time_spent = format(round(end * 1000 - start * 1000), ",") compress_time_spent = format(round(end * 1000 - start * 1000), ",")
context: str = base64.b85encode(context_json_compressed).decode() context: str = base64.b64encode(context_json_compressed).decode()
else: else:
compress_time_spent = "N/A" compress_time_spent = "N/A"
context = None context = None