Ejemplo n.º 1
0
async def keep_read(message):
    """ The mute logic. """
    from userbot.database.mongo import cli
    cli = cli["Userbot"]["mute_chat"]
    kread = cli.find({"chat_id": message.chat_id})
    if kread:
        for i in kread:
            if i["chat_id"] == message.chat_id:
                await message.client.send_read_acknowledge(
                    entity=message.chat_id, max_id=0, clear_mentions=True)
Ejemplo n.º 2
0
async def get_notes(chatid):
    return cli.find({'chat_id': chatid})
Ejemplo n.º 3
0
async def list_chat():
    return cli.find({})
Ejemplo n.º 4
0
async def get_all_chats(chat_id):
    return cli.find({'chat_id': chatid})
Ejemplo n.º 5
0
async def check():
    return (False if not list(cli.find({}, {"Others": 0}))
            else list(cli.find({}, {"Others": 0})))
Ejemplo n.º 6
0
async def retrieve():
    return (False if not list(cli.find({}))
            else list(cli.find({})))
Ejemplo n.º 7
0
async def get_muted(chatid):
    muted_db = cli.find({'chat_id': int(chatid)})

    return [user["user_id"] for user in muted_db]
Ejemplo n.º 8
0
async def check_dload():
    return (False if not cli.find({"Name": {
        "$exists": True
    }}) else cli.find({"Name": {
        "$exists": True
    }}))
Ejemplo n.º 9
0
async def get_chat_blacklist(chat_id):
    return cli.find({'chat_id': chat_id})
Ejemplo n.º 10
0
async def check_blacklist(chat_id, trigger):
    return cli.find({'chat_id': chat_id, 'trigger': trigger})
Ejemplo n.º 11
0
async def get_gmuted():
    gmuted_db = cli.find()
    return [user["user_id"] for user in gmuted_db]
Ejemplo n.º 12
0
async def get_fban():
    return cli.find()