fix: add logging for failed racoon image decoding
Build and publish ich_iel bot / build (push) Successful in 1m32s
Build and publish ich_iel bot / build (push) Successful in 1m32s
This commit is contained in:
@@ -175,6 +175,7 @@ async def racoon(message):
|
|||||||
image_bytes = base64.b64decode(payload)
|
image_bytes = base64.b64decode(payload)
|
||||||
except (ValueError, base64.binascii.Error):
|
except (ValueError, base64.binascii.Error):
|
||||||
await message.channel.send("Could not decode racoon image")
|
await message.channel.send("Could not decode racoon image")
|
||||||
|
logging.warning(f"Failed to decode base64 image data: {payload}")
|
||||||
return
|
return
|
||||||
await message.channel.send(file=fluxer.File(image_bytes, filename="racoon.jpg"))
|
await message.channel.send(file=fluxer.File(image_bytes, filename="racoon.jpg"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user