示例#1
0
文件: main.py 项目: lampardN/ToDo_Bot
def add_command_step2(chat_id):
    db_controller().addNote(chat_id.chat.id, chat_id.text, 'active')
    s = chat_id.text
    if s.lower() == 'jesus':
        GIF = open('jesus.gif', 'rb')
    else:
        GIF = open(choice(['printing.gif']), 'rb')
    bot.send_document(chat_id.chat.id, GIF)
    show(chat_id)
示例#2
0
文件: main.py 项目: lampardN/ToDo_Bot
def Del_step2(chat_id):
    db_controller().DelItem(chat_id)
    GIF = open(
        choice([
            'terminator.gif', 'pepa.gif', 'tomato.gif', 'tenor.gif', 'del.gif',
            'o.gif'
        ]), 'rb')
    bot.send_document(chat_id.chat.id, GIF)
    show(chat_id)
示例#3
0
文件: main.py 项目: lampardN/ToDo_Bot
def show(chat_id):
    global control_btn
    message = db_controller().showAll(chat_id.from_user.id)
    if message != '':
        bot.send_message(chat_id.chat.id, message, reply_markup=control_btn)
    else:
        bot.send_message(chat_id.chat.id,
                         'Записей нет',
                         reply_markup=control_btn)
示例#4
0
文件: main.py 项目: lampardN/ToDo_Bot
def ChangeStatus_step2(chat_id):
    db_controller().ChangeStatus(chat_id)
    GIF = open(choice(['patric.gif', 'mussolini.gif']), 'rb')
    bot.send_document(chat_id.chat.id, GIF)
    show(chat_id)
示例#5
0
文件: main.py 项目: lampardN/ToDo_Bot
def chg_text_step3(chat_id):
    db_controller().ChangeText(user_dict[chat_id.chat.id], chat_id.text,
                               chat_id.chat.id)
    show(chat_id)