Example #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,
                             "Ошибка! Не могу выдать номер заявки")
Example #2
0
File: bot.py Project: XrayT3/Barber
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)
Example #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())
Example #4
0
File: bot.py Project: XrayT3/Kazbot
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))
Example #5
0
File: bot.py Project: XrayT3/Kazbot
def client_panel(message):
    bot.send_message(message.chat.id, 'Выберите:', reply_markup=markups.start(message.chat.id))
Example #6
0
File: bot.py Project: XrayT3/Kazbot
def start(message):
    bot.send_message(message.chat.id, const.welcome_celler, reply_markup=markups.start(message.chat.id))