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)
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)
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)
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)
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)