@hiddle

Как сделать что бы все функции были задействованы?

При создании телеграмм бота столкнулся с проблемой, что бот обращается только к одной функции (/chill, помимо start & help)
Бот обращается только к команде /chill, к команде /platform нереагирует
Вот часть Кода:
@bot.message_handler(commands=['start'])
def welcome(message):
 bot.send_message(message.chat.id,f"Привет,{message.from_user.first_name}!\nПриятно познакомиться)\nВот мои команды:\n/start\n/platform\n/chill")


@bot.message_handler(commands=['help'])
def help(message):
 bot.send_message(message.chat.id,"Вот мои команды\n/start\n/platform\n/chill")


@bot.message_handler(commands=['chill'])
def start(message):
    mess = f'Привет,{message.from_user.first_name})\nПриятно познакомиться\n)'

    markup = types.ReplyKeyboardMarkup(resize_keyboard=True)
    mark1 = types.InlineKeyboardButton(' Рандомное число')
    mark2 = types.InlineKeyboardButton(' Как дела?')
    markup.add(mark1, mark2)
    bot.send_message(message.chat.id,"Жмякни", reply_markup=markup)
@bot.message_handler(commands=['platform'])
def website(message):
    markup = types.ReplyKeyboardMarkup(resize_keyboard= True, row_width=2)
    YouTube = types.KeyboardButton('YouTube')
    Twitch = types.KeyboardButton('Twitch')
    TikTok = types.KeyboardButton('TikTok')



    markup.add(YouTube,Twitch,TikTok)

    bot.send_message(message.chat.id, "Выбери, что ты хочешь посмотреть:", reply_markup=markup)
  • Вопрос задан
  • 114 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы