This commit is contained in:
yasirarism 2023-04-03 09:47:28 +07:00 committed by GitHub
parent 218db3f06f
commit 0e7924c8db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -48,9 +48,9 @@ scheduler = AsyncIOScheduler(jobstores=jobstores, timezone=TZ)
app.start()
user.start()
BOT_ID = app.id
BOT_NAME = app.first_name
BOT_USERNAME = app.username
UBOT_ID = user.id
UBOT_NAME = user.first_name
UBOT_USERNAME = user.username
BOT_ID = app.me.id
BOT_NAME = app.me.first_name
BOT_USERNAME = app.me.username
UBOT_ID = user.me.id
UBOT_NAME = user.me.first_name
UBOT_USERNAME = user.me.username

View file

@ -29,7 +29,7 @@ __HELP__ = f"/ocr [reply to photo] - Read Text From Image"
@use_chat_lang()
async def ocr(_, m, strings):
reply = m.reply_to_message
if not reply or not reply.photo and not reply.sticker:
if not reply or not reply.photo and (reply.document and not reply.document.mime_type.startswith("image")) and not reply.sticker:
return await kirimPesan(m, strings("no_photo").format(cmd=m.command[0]), quote=True)
msg = await kirimPesan(m, strings("read_ocr"), quote=True)
try: