Exemple #1
0
def add_snip(
    keyword, reply, snip_type, media_id, media_access_hash, media_file_reference
):
    adder = SESSION.query(Snips).get(keyword)
    if adder:
        adder.reply = reply
        adder.snip_type = snip_type
        adder.media_id = media_id
        adder.media_access_hash = media_access_hash
        adder.media_file_reference = media_file_reference
    else:
        adder = Snips(
            keyword, reply, snip_type, media_id, media_access_hash, media_file_reference
        )
    SESSION.add(adder)
    SESSION.commit()
Exemple #2
0
def add_in_db(chat_id: int):
    lodu = Blockedid(str(chat_id))
    SESSION.add(lodu)
    SESSION.commit()
Exemple #3
0
def add_channel(chat_id):
    adder = fban(str(chat_id))
    SESSION.add(adder)
    SESSION.commit()
Exemple #4
0
def add_id_in_db(message_id: int, chat_id: int, um_id: int):
    """ add the message to the table """
    __user = Users(message_id, str(chat_id), um_id)
    SESSION.add(__user)
    SESSION.commit()
Exemple #5
0
def add_usersid_in_db(chat_id: int):
    id_user = Moidata(str(chat_id))
    SESSION.add(id_user)
    SESSION.commit()