Skip to content

Commit

Permalink
add error logging on fail to upload images
Browse files Browse the repository at this point in the history
  • Loading branch information
mralext20 committed Sep 20, 2024
1 parent aec71de commit 231e74c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion alexBot/cogs/video_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ async def on_message(self, message: discord.Message, override=False, new_deleter
else:
filename = image.content_disposition.filename
attachments.append(discord.File(io.BytesIO(stuff), filename=filename))
uploaded = await message.reply(mention_author=False, files=attachments)
try:

uploaded = await message.reply(mention_author=False, files=attachments)
except DiscordException as e:
log.error("Error uploading images", e)
case "error":
log.error(f"Error in cobalt with url {rq.url}: {res.text}")
log.debug("on_message function ended")
Expand Down

0 comments on commit 231e74c

Please sign in to comment.