Beispiel #1
0
def reply_msg(message):
    if (message.text != "Админ-панель"
            and not base.is_in_base(message.chat.id)):
        request_num = base.add_user(message.chat.id)
        if (request_num != -1):
            bot.send_message(message.chat.id,
                             const.reply_msg.format(id=request_num),
                             reply_markup=markups.start())
            bot.send_message(
                const.admin_id,
                str(message.from_user.first_name) + " " +
                str(message.from_user.last_name) + "; @" +
                str(message.from_user.username) + "; " + str(request_num))
            bot.send_message(
                const.admin_id_1,
                str(message.from_user.first_name) + " " +
                str(message.from_user.last_name) + "; @" +
                str(message.from_user.username) + "; " + str(request_num))
            bot.send_message(
                const.admin_id,
                "%s %s Заявка номер: %d" % message.from_user.first_name %
                message.from_user.last_name % request_num)
        else:
            bot.send_message(message.chat.id,
                             "Сервис временно не доступен. Попробуйте позже")
            bot.send_message(const.admin_id,
                             "Ошибка! Не могу выдать номер заявки")
Beispiel #2
0
def start(message):
    if message.chat.id in const.admins:
        markup = markups.start_admin()
    else:
        markup = markups.start()
    bot.send_message(message.chat.id,
                     'Привет, ' + message.from_user.first_name + '!',
                     reply_markup=markup)
    base.add_user(message)
Beispiel #3
0
def start(message):
    base.add_user(message)
    if base.is_seller(message.from_user.id):
        bot.send_message(message.chat.id,
                         const.welcome_celler,
                         reply_markup=markups.start())
    else:
        bot.send_message(message.chat.id,
                         const.welcome_client,
                         reply_markup=markups.start1())
Beispiel #4
0
def client_panel(call):
    bot.edit_message_text("Меню", chat_id=call.message.chat.id, message_id=call.message.message_id)
    bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id,
                                  reply_markup=markups.start(call.message.chat.id))
Beispiel #5
0
def client_panel(message):
    bot.send_message(message.chat.id, 'Выберите:', reply_markup=markups.start(message.chat.id))
Beispiel #6
0
def start(message):
    bot.send_message(message.chat.id, const.welcome_celler, reply_markup=markups.start(message.chat.id))