Example #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)
Example #2
0
async def get_notes(chatid):
    return cli.find({'chat_id': chatid})
Example #3
0
async def list_chat():
    return cli.find({})
Example #4
0
async def get_all_chats(chat_id):
    return cli.find({'chat_id': chatid})
async def check():
    return (False if not list(cli.find({}, {"Others": 0}))
            else list(cli.find({}, {"Others": 0})))
Example #6
0
async def retrieve():
    return (False if not list(cli.find({}))
            else list(cli.find({})))
Example #7
0
async def get_muted(chatid):
    muted_db = cli.find({'chat_id': int(chatid)})

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