Esempio n. 1
0
async def pm_block(client, message):
    if not get_whitelist(message.chat.id):
        await client.read_history(message.chat.id)
        if message.text:
            for x in message.text.lower().split():
                if x in BLACKLIST:
                    # await message.reply("F**k you too!")
                    await client.block_user(message.chat.id)
                    return
        from nana.modules.lydia import lydia_status
        print(get_req(message.chat.id))
        if not get_req(message.chat.id):
            await message.reply(welc_txt)
            result = await client.get_inline_bot_results(
                BotUsername, "engine_pm")
            result = await client.send_inline_bot_result(
                message.chat.id,
                query_id=result.query_id,
                result_id=result.results[0].id,
                hide_via=True)
        elif lydia_api and lydia_status:
            reply = await message.reply(message.text)
            footer = "\n\n- Nana AI"
            await message.reply(reply + footer)
        else:
            result = await client.get_inline_bot_results(
                BotUsername, "engine_pm")
            result = await client.send_inline_bot_result(
                message.chat.id,
                query_id=result.query_id,
                result_id=result.results[0].id,
                hide_via=True)
Esempio n. 2
0
async def pm_block(client, message):
    if PM_PERMIT:
        if not get_whitelist(message.chat.id):
            await client.read_history(message.chat.id)
            if message.text:
                for x in message.text.lower().split():
                    if x in BLACKLIST:
                        await message.reply(
                            "Naah im blocking you and reporting you to TAbuse,\nwith that being said f**k you OwO"
                        )
                        await client.block_user(message.chat.id)
                        return
            if not get_req(message.chat.id):
                x = await client.get_inline_bot_results(
                    BotUsername, "engine_pm")
                await client.send_inline_bot_result(message.chat.id,
                                                    query_id=x.query_id,
                                                    result_id=x.results[0].id,
                                                    hide_via=True)
            else:
                x = await client.get_inline_bot_results(
                    BotUsername, "engine_pm")
                await client.send_inline_bot_result(message.chat.id,
                                                    query_id=x.query_id,
                                                    result_id=x.results[0].id,
                                                    hide_via=True)
    else:
        return
Esempio n. 3
0
async def pm_block(client, message):
    if not PM_PERMIT:
        return
    if not get_whitelist(message.chat.id):
        await client.read_history(message.chat.id)
        if message.text:
            for x in message.text.lower().split():
                if x in BLACKLIST:
                    await client.send_sticker(
                        message.chat.id, sticker="CAADAgAD1QQAAp7kTAry1JrL3zVXSxYE"
                    )
                    await message.reply(
                        "Naah im blocking you and reporting you to SpamWatch,\nwith that being said f**k you too OwO"
                    )
                    await client.block_user(message.chat.id)
                    return
        if not get_req(message.chat.id):
            x = await client.get_inline_bot_results(BotUsername, "engine_pm")
        else:
            x = await client.get_inline_bot_results(BotUsername, "engine_pm")
        await client.send_inline_bot_result(
            message.chat.id,
            query_id=x.query_id,
            result_id=x.results[0].id,
            hide_via=True,
        )