Exemple #1
0
 def request_name(message):
     db_worker.add_new_request_name(message)
     bot.send_message(message.chat.id,
                      'Опишите задание как можно подробнее')
     db_worker.update_state(message.chat.id,
                            config.Query.update_state.value,
                            config.StateUser.S_INFO_REQUEST.value)
Exemple #2
0
 def request_info(message):
     db_worker.update_info_request(message,
                                   config.Query.update_info_request.value)
     bot.send_message(message.chat.id,
                      'Введите возможный бюджет\nПример: 4000 руб.')
     db_worker.update_state(message.chat.id,
                            config.Query.update_state.value,
                            config.StateUser.S_PRICE.value)
Exemple #3
0
 def check_admin_msg(message):
     if str(message.chat.id) == config.ID_ADMIN:
         bot.send_message(message.chat.id,
                          'Привет админ',
                          reply_markup=keybord.keyboard_admin())
         db_worker.update_state(message.chat.id,
                                config.StateAdmin.S_START.value)
     else:
         bot.send_message(message.chat.id, 'Вы не админ')
Exemple #4
0
 def start_msg(message):
     """COMMAND START"""
     bot.send_message(message.chat.id,
                      'Приветствую Вас',
                      reply_markup=keybord.keyboard_start())
     db_worker.adding_new_user(message, config.Query.insert_user.value,
                               config.Query.select_user.value)
     db_worker.update_state(message.chat.id,
                            config.Query.update_state.value,
                            config.StateUser.S_START.value)
Exemple #5
0
 def request_price(message):
     msg_reply = '\n'.join(config.contacts_arr)
     db_worker.update_info_request(message,
                                   config.Query.update_price_request.value)
     bot.send_message(
         message.chat.id,
         'В течении суток вам ответят. Откройте личные сообщения\n\nВы можете сами '
         'связаться со мной\n' + msg_reply)
     db_worker.update_state(message.chat.id,
                            config.Query.update_state.value,
                            config.StateUser.S_START.value)
Exemple #6
0
 def bot_menu(message):
     """BOT MENU"""
     if message.text.lower() == 'информация обо мне':
         bot.send_message(message.chat.id, 'Сообщение')
     elif message.text.lower() == 'оставить заявку':
         bot.send_message(
             message.chat.id,
             'Введите название услуги\n(Чат-бот, верстка, доработка)')
         db_worker.update_state(message.chat.id,
                                config.Query.update_state.value,
                                config.StateUser.S_NAME_REQUEST.value)
     elif message.text.lower() == 'помощь':
         bot.send_message(message.chat.id, 'Помощь')
     elif message.text.lower() == 'контакты':
         msg_reply = '\n'.join(config.contacts_arr)
         bot.send_message(message.chat.id, msg_reply)