def get_all_gmex():
    try:
        return SESSION.query(GMEX).all()
    except BaseException:
        return None
    finally:
        SESSION.close()
Beispiel #2
0
def get_all_s():
    try:
        return SESSION.query(LydiaAI).all()
    except BaseException:
        return None
    finally:
        SESSION.close()
def is_gban(chat_id):
    try:
        return SESSION.query(GBan).filter(GBan.chat_id == str(chat_id)).one()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #4
0
def is_fed_indb(feds):
    try:
        return SESSION.query(Fed).filter(Fed.feds == feds).one()
    except:
        return None
    finally:
        SESSION.close()
def get_all_snips():
    try:
        return SESSION.query(Snips).all()
    except:
        return None
    finally:
        SESSION.close()
def is_muted(chat_id):
    try:
        return SESSION.query(Mute).filter(Mute.chat_id == str(chat_id)).all()
    except:
        return None
    finally:
        SESSION.close()
 def is_chat(chat_id):
     try:
         return True if SESSION.query(Chat).get(str(chat_id)) else None
     except:
         return False
     finally:
         SESSION.close()
Beispiel #8
0
def getCommand(command):
    try:
        return SESSION.query(CMD).filter(CMD.command == str(command)).one()
    except BaseException:
        return None
    finally:
        SESSION.close()
Beispiel #9
0
def is_approved(chat_id):
    try:
        return SESSION.query(NOLogPMs).filter(NOLogPMs.chat_id == chat_id).one()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #10
0
def get_notes(keyword):
    try:
        return SESSION.query(notes).get(keyword)
    except:
        return None
    finally:
        SESSION.close()
Beispiel #11
0
def get_all_notes():
    try:
        return SESSION.query(notes).all()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #12
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 #13
0
def is_in(user_id):
    try:
        return SESSION.query(PMPermits).get(str(user_id))
    except BaseException:
        return None
    finally:
        SESSION.close()
Beispiel #14
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 #15
0
def is_folder(folder_id):
    try:
        return SESSION.query(Gdrive).filter(Gdrive.cat == str(folder_id))
    except BaseException:
        return None
    finally:
        SESSION.close()
def is_folder(folder_id):
    try:
        return SESSION.query(Gdrive).filter(Gdrive.wolf == str(folder_id))
    except:
        return None
    finally:
        SESSION.close()
Beispiel #17
0
def get_parent_id():
    try:
        return SESSION.query(Gdrive).all()
    except BaseException:
        return None
    finally:
        SESSION.close()
Beispiel #18
0
def get_all_filters(chat_id):
    try:
        return SESSION.query(Filters).filter(Filters.chat_id == str(chat_id)).all()
    except:
        return None
    finally:
        SESSION.close()
 def all_chat():
     try:
         return SESSION.query(Chat).all()
     except:
         return None
     finally:
         SESSION.close()
Beispiel #20
0
def in_channels(chat_id):
    try:
        return SESSION.query(ghdb).filter(ghdb.chat_id == str(chat_id)).one()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #21
0
def is_gmuted(sender_id):
    try:
        return SESSION.query(GMute).all()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #22
0
def is_echo(user_id, chat_id):
    try:
        return SESSION.query(ECHOSQL).get((str(user_id), str(chat_id)))
    except:
        return None
    finally:
        SESSION.close()
def get_snips(keyword):
    try:
        return SESSION.query(Snips).get(keyword)
    except:
        return None
    finally:
        SESSION.close()
Beispiel #24
0
def get_all_echos():
    try:
        return SESSION.query(ECHOSQL).all()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #25
0
def get_s(user_id, chat_id):
    try:
        return SESSION.query(LydiaAI).get((user_id, chat_id))
    except BaseException:
        return None
    finally:
        SESSION.close()
Beispiel #26
0
def is_approved(chat_id):
    try:
        return SESSION.query(PMPermit).filter(PMPermit.chat_id == str(chat_id)).one()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #27
0
def get_current_welcome_settings(chat_id):
    try:
        return SESSION.query(Welcome).filter(Welcome.chat_id == str(chat_id)).one()
    except:
        return None
    finally:
        SESSION.close()
Beispiel #28
0
def get_filter(chat_id, keyword):
    try:
        return SESSION.query(Filters).get((str(chat_id), keyword))
    except:
        return None
    finally:
        SESSION.close()
Beispiel #29
0
def is_globelmuted(sender_id):
    try:
        return SESSION.query(GLOBELMute).all()
    except BaseException:
        return None
    finally:
        SESSION.close()
def is_gmex(chat_id):
    try:
        return SESSION.query(GMEX).get(str(chat_id))
    except BaseException:
        return None
    finally:
        SESSION.close()