Beispiel #1
0
def in_channels(chat_id):
    try:
        return SESSION.query(fban).filter(fban.chat_id == str(chat_id)).one()
    except BaseException:
        return None
    finally:
        SESSION.close()
Beispiel #2
0
def get_all_snips():
    try:
        return SESSION.query(Snips).all()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #3
0
def its_userid(message_id: int):
    """ get the user_id from the message_id """
    try:
        s__ = SESSION.query(Users).get(str(message_id))
        return int(s__.chat_id), s__.um_id
    finally:
        SESSION.close()
Beispiel #4
0
def get_snips(keyword):
    try:
        return SESSION.query(Snips).get(keyword)
    except:
        return None
    finally:
        SESSION.close()
Beispiel #5
0
def is_id_added(chat_id):
    try:
        return SESSION.query(Blockedid).filter(
            Blockedid.chat_id == str(chat_id)).one()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #6
0
def already_added(chat_id):
    try:
        return SESSION.query(Moidata).filter(
            Moidata.chat_id == str(chat_id)).one()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #7
0
def get_all_channels():
    rem = SESSION.query(fban).all()
    SESSION.close()
    return rem
Beispiel #8
0
def get_all_nibba():
    eberyone = SESSION.query(Blockedid).all()
    SESSION.close()
    return eberyone
Beispiel #9
0
def get_all_users():
    stark = SESSION.query(Moidata).all()
    SESSION.close()
    return stark