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

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