import telebot
from telebot import types
bot = telebot.TeleBot('636656891:AAFKZDUSVbbIXB76XL57ZbXWbudqqsWfLvA')
@bot.message_handler(commands='start')
def start(message):
bot.send_message(message.chat.id, 'Добро пожаловать!', reply_markup=keyboardone())
def keyboardone():
markup = types.ReplyKeyboardMarkup(one_time_keyboard=True, resize_keyboard=True)
key_start = types.KeyboardButton(text="Начать!")
markup.add(key_start)
return markup
if __name__ == '__main__':
bot.polling(none_stop=True)
import telebot
from telebot import types
bot = telebot.TeleBot('636656891:AAFKZDUSVbbIXB76XL57ZbXWbudqqsWfLvA')
@bot.message_handler(commands='start')
def start(message):
bot.send_message(message.chat.id, 'Добро пожаловать!', reply_markup=keyboardone())
@bot.message_handler(content_types=["text"])
def start(message):
if message.text == 'Начать!':
bot.send_message(message.chat.id, 'Круто! Выбери свой пол: ', reply_markup=keyboardtwo())
else:
pass
def keyboardone():
markup = types.ReplyKeyboardMarkup(one_time_keyboard=True, resize_keyboard=True)
key_start = types.KeyboardButton(text="Начать!")
markup.add(key_start)
return markup
def keyboardtwo():
markup = types.ReplyKeyboardMarkup(one_time_keyboard=True, resize_keyboard=True)
key_M = types.KeyboardButton(text='Муж.')
key_j = types.KeyboardButton(text='Жен.')
markup.add(key_M, key_j)
return markup
if __name__ == '__main__':
bot.polling(none_stop=True)