Example #1
0
            await borg.forward_messages(chat, reply_message)
            response = await response
        except YouBlockedUserError:
            await event.reply(
                "```Please unblock @sangmatainfo_bot and try again```")
            return
        if response.text.startswith("Forward"):
            await event.edit(
                "```can you kindly disable your forward privacy settings for good?```"
            )
        else:
            if response.text.startswith("Select"):
                await event.edit(
                    "`Please go to` @DrWebBot `and select your language.`")
            else:
                await event.edit(
                    f"**Antivirus scan was completed. I got dem final results.**\n {response.message.message}"
                )


MODULE_LIST.append("antivirus")

SYNTAX.update({
    "antivirus":
    "\
**Requested Module --> Antivirus**\
\n\n `.scan <while replying to a file>`\
\nUsage: __Scans the replied message (file) for viruses.__\
"
})
Example #2
0
    await event.edit(f"```Looking for latest OTA for {model}...```")

    async with borg.conversation(bot) as bot_conv:
        if True:
            response = await silently_send_message(bot_conv, "/start")
            if not response.text.startswith("Hey!"):
                await event.edit(f"{response.text}")
                return
            response = await silently_send_message(bot_conv, f"/GetLatestOTA {model}")
            if response.text.startswith("There"):
                await event.edit(f"{response.text}")
                return
            await event.edit(response.text)


async def silently_send_message(conv, text):
    await conv.send_message(text)
    response = await conv.get_response()
    await conv.mark_read(message=response)
    return response


SYNTAX.update({
    "rmota": "\
**Requested Module --> rmota**\
\n\n**Detailed usage of fuction(s):**\
\n\n• ```.rmota <device_model>```\
\nUsage: __Returns latest update info for specified device.__\nUses @Realme_3ProBot to get update information.\
"
})