diff --git a/Игра b/Игра new file mode 100644 index 0000000..be1499a --- /dev/null +++ b/Игра @@ -0,0 +1,21 @@ +pip install pyTelegramBotAPI +import telebot +botTimeWeb = telebot.TeleBot('Уникальный токен') +from telebot import types +@botTimeWeb.message_handler(commands=['start']) +def startBot(message): + first_mess = f"{message.from_user.first_name} {message.from_user.last_name}, привет!\nМеня зовут Яна Усанина. Я автор уникальной программы "5 шагов, чтобы заработать на мечту"." + markup = types.InlineKeyboardMarkup() + button_yes = types.InlineKeyboardButton(text = 'Да', callback_data='yes') + markup.add(button_yes) + botTimeWeb.send_message(message.chat.id, first_mess, parse_mode='html', reply_markup=markup) + @botTimeWeb.callback_query_handler(func=lambda call:True) +def response(function_call): + if function_call.message: + if function_call.data == "yes": + second_mess = "Это игра для наёмных рабочих, работающих в банковской сфере!" + markup = types.InlineKeyboardMarkup() + markup.add(types.InlineKeyboardButton("Перейти в чат", url="https://https://t.me/+-a5r11irLO1hMDQy")) + botTimeWeb.send_message(function_call.message.chat.id, second_mess, reply_markup=markup) + botTimeWeb.answer_callback_query(function_call.id) + botTimeWeb.infinity_polling()