This commit is contained in:
Yasir Aris M 2024-09-06 22:09:18 +07:00 committed by GitHub
parent 686cd7f300
commit e23b1b5726
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -417,7 +417,7 @@ async def imgbb_upload(_, message):
return await message.edit_msg(
f"**Reply to a photo with /{message.command[0]} command to upload image on ImgBB.**", del_in=6
)
if not reply.photo and not reply.document.mime_type.startswith("image"):
if not (r.photo or (r.document and r.document.mime_type.startswith("image"))):
return await message.reply_msg("This command only support upload photo")
msg = await message.reply_msg("`Uploading image to ImgBB...`")
if message.from_user: