def exit_details(call): print("CAlbback:[" + call.data + "]") print_functions.delete_few_messages(call.message.message_id, 1, call.message.chat.id, bot) print_functions.print_products(call.message, bot) logmode.create_log(bot, call.message, "command")
def add_favourite(call): print("CAlbback:[" + call.data + "]") # bot.send_photo(call.message.chat.id, "AgADAgAD6KsxG53BuUqdkrXazwk3dX3Rtw8ABAEAAwIAA3gAA5hjAgABFgQ" ) print_functions.new_favourite(call, bot) print_functions.delete_few_messages(call.message.message_id, 1, call.message.chat.id, bot) print_functions.print_products(call.message, bot) logmode.create_log(bot, call.message, "command")
def answer_text(message): code = print_functions.check_if_service_name(message).code if print_functions.say_hello(message, bot): # CHAT-BOT FUNCTIONS if config.create_log: logmode.create_log(bot, message, "text") return elif (code >= 0): # IF STRING IS SHOP NAME logmode.create_log(bot, message, "command") logmode.update_user_field("current_page", 0, message.chat.username) logmode.update_user_field("current_service_code", code, message.chat.username) print_functions.delete_few_messages(message.message_id, 2, message.chat.id, bot) print_functions.print_products(message, bot) return else: print_functions.responce_to_casual_text( message, bot) # DEFAULT ANSWER TO STRING if config.create_log: logmode.create_log(bot, message, "text")
def exit_product_menu(message): print_functions.delete_few_messages(message.message_id, 2, message.chat.id, bot) print_functions.main_menu(message, bot) logmode.create_log(bot, message, "command")
def send_contacts(message): print_functions.delete_few_messages(message.message_id, 2, message.chat.id, bot) print_functions.tell_about_contacts(message, bot) logmode.create_log(bot, message, "command")
def print_start(message): print_functions.delete_few_messages(message.message_id, 1, message.chat.id, bot) print_functions.main_menu(message, bot) logmode.create_log(bot, message, "command")
def favourites_menu(message): print_functions.delete_few_messages(message.message_id, 2, message.chat.id, bot) logmode.update_user_field("current_page", 0, message.chat.username) print_functions.print_favourites(message, bot) logmode.create_log(bot, message, "command")