Пример #1
0
def login(message):
    chat_id = message.from_user.id

    insert_with_params = """SELECT * FROM User WHERE chat_id = (?);"""
    data_tuple = (chat_id,)
    crsr.execute(insert_with_params, data_tuple)
    rows = crsr.fetchall()
    if len(rows) == 1:
        bot.send_message(chat_id, 'You are logged in 😊')
        return

    msg = bot.send_message(chat_id, 'Username')
    bot.register_next_step_handler(msg, get_username)
Пример #2
0
def delete_notif(message):
    chat_id = message.from_user.id
    msg = bot.send_message(chat_id, 'id')
    bot.register_next_step_handler(msg, get_id_for_delete)
Пример #3
0
def edit_notif(message):
    chat_id = message.from_user.id
    bot.send_message(chat_id, 'in each section you can type <none> for passing and not editing that')
    msg = bot.send_message(chat_id, 'id')
    bot.register_next_step_handler(msg, get_id_for_edit)
Пример #4
0
def add_notif(message):
    chat_id = message.from_user.id
    msg = bot.send_message(chat_id, 'title')
    bot.register_next_step_handler(msg, add_title)
Пример #5
0
def test(message):
    chat_id = message.from_user.id
    msg = bot.send_message(chat_id, 'first')
    bot.register_next_step_handler(msg, test_register_next_step_handler, a=1, b=2)
    print(10000000000000000000000000000)