import telebot
from telebot import types
bot = telebot.TeleBot("1471284551:AAE58--NjBXrV1fYwT7VqIapWb5QeSH0BXQ")
@bot.message_handler(commands=['website'])
def open_website(message):
markup = types.InlinekeybordMarkup()
markup.add(types.InlinekeybordButton("Перейди по ссылке‚", url="
https://horo.mail.ru/"))
bot.send_message(
message.chat.id, "Хочешь узнать как пройд(т этот день!", parse_mode='html', reply_markup=markup)
@bot.message_handler(content_types=['text'])
def mess(message):
get_message_bot = message.text.strip().lower()
if get_message_bot == "Назад":
markup = types.ReplyKeyboardMarkup(resize_keyboard=True, row_width=3)
zdk1 = types.KeyboardButton('Женщина')
zdk2 = types.KeyboardButton('Мужчина')
zdk3 = types.KeyboardButton('Другое')
markup.add(zdk1, zdk2, zdk3)
final_message = "Выберите ваш пол:"
else:
markup = types.ReplyKeyboardMarkup(resize_keyboard=True, row_width=5)
zdk1 = types.KeyboardButton('Назад')
zdk2 = types.KeyboardButton('Телец')
zdk3 = types.KeyboardButton('Близнецы')
zdk4 = types.KeyboardButton('Рак')
zdk5 = types.KeyboardButton('Лев')
zdk6 = types.KeyboardButton('Дева')
zdk7 = types.KeyboardButton('Весы')
zdk8 = types.KeyboardButton('Скорпион')
zdk9 = types.KeyboardButton('Стрелец')
zdk10 = types.KeyboardButton('Козерог')
zdk11 = types.KeyboardButton('Водолей')
zdk12 = types.KeyboardButton('Рыбы')
zdk13 = types.KeyboardButton('Овен')
markup.add(zdk1, zdk2, zdk3, zdk4, zdk5, zdk6, zdk7, zdk8, zdk9, zdk10, zdk11, zdk12, zdk13)
final_message = "Выберите ваш знак зодиака:"
bot.send_message(
message.chat.id, final_message, parse_mode='html', reply_markup=markup)
@bot.message_handler(commands=['start'])
def start(message):
markup = types.ReplyKeyboardMarkup(resize_keyboard=True, row_width=5)
zdk1 = types.KeyboardButton('Овен')
zdk2 = types.KeyboardButton('Телец')
zdk3 = types.KeyboardButton('Близнецы')
zdk4 = types.KeyboardButton('Рак')
zdk5 = types.KeyboardButton('Лев')
zdk6 = types.KeyboardButton('Дева')
zdk7 = types.KeyboardButton('Весы')
zdk8 = types.KeyboardButton('Скорпион')
zdk9 = types.KeyboardButton('Стрелец')
zdk10 = types.KeyboardButton('Козерог')
zdk11 = types.KeyboardButton('Водолей')
zdk12 = types.KeyboardButton('Рыбы')
zdk13 = types.KeyboardButton('Назад')
markup.add(zdk1, zdk2, zdk3, zdk4, zdk5, zdk6, zdk7, zdk8, zdk9, zdk10, zdk11, zdk12, zdk13)
send_mess = f"<b>Привет‚{message.from_user.first_name} {message.from_user.last_name}</b>!\nКакой у тебя нак зодиака"
bot.send_message(
message.chat.id, send_mess, parse_mode='html', reply_markup=markup)
bot.polling(none_stop=True)