@tihonff

Скрипт работает ,но команада 'if message.text == '☀ Профиль' не работает, что я не так сделал? Буду благодарен если поправите сам скрипт?

import telebot
from telebot import types

bot = telebot.TeleBot("5448065080:AAHjPbHDMiAf3RIz6iDusHSeEfx5NsVAAbw")

@bot.message_handler(commands=['start'])
def start(message):

    StartMarkUp = types.ReplyKeyboardMarkup(resize_keyboard=True)
    zarabotok = types.KeyboardButton(' Заработать')
    profili = types.KeyboardButton('☀ Профиль')
    partner = types.KeyboardButton(' Партнеры')
    statistik = types.KeyboardButton(' Статистика')
    bonus = types.KeyboardButton(' Бонус')
    help = types.KeyboardButton(' Помощь')
    StartMarkUp.add(zarabotok, profili, partner, statistik, bonus, help)

    img = open('tihon.png', 'rb')
    bot.send_photo(message.chat.id, img)
    bot.send_message(message.chat.id, ' Привет, Tisha\n Добро пожаловать в JoJoClicker! Мы одни из лучших кликеров во всём telegrame! Зарабатывай кликая по кнопке и это не шутка!', parse_mode='html', reply_markup=StartMarkUp)


@bot.message_handler(content_types=['text'])
def text(message):
    if message.chat.type == 'private':
        if message.text == ' Заработать':
            zarabotat = types.InlineKeyboardMarkup(row_width=1)
            click = types.InlineKeyboardButton(' Клик', callback_data='click2')
            click1 = types.InlineKeyboardButton(' СуперКлик', callback_data='click3')
            zarabotat.add(click, click1)

            bot.send_message(message.chat.id, 'Просто кликай и зарабатывай ', parse_mode='html', reply_markup=zarabotat)

            @bot.callback_query_handler(func=lambda call: True)
            def callback(call):
                if call.data == 'click2':
                    bot.send_message(call.message.chat.id, ' Клик', parse_mode='html')
                else:
                    bot.send_message(call.message.chat.id, ' СуперКлик', parse_mode='html')

        elif message.text == '☀ Профиль':
            profq = types.InlineKeyboardMarkup(row_width=1)
            vidod = types.InlineKeyboardButton(' Вывод')
            popol = types.InlineKeyboardButton(' Пополнить')
            profq.add(vidod, popol)

            bot.send_message(message.chat.id, ' Имя: {0.first_name}', parse_mode='html', reply_markup=profq)


bot.polling(none_stop=True)
  • Вопрос задан
  • 249 просмотров
Пригласить эксперта
Ответы на вопрос 1
@tihonff Автор вопроса
на отступы не жалуеться, в скрипте они есть если что , просто тут пробелы не передались
Ответ написан
Ваш ответ на вопрос

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

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