D
D
D55RUS2020-04-14 19:59:47
Python
D55RUS, 2020-04-14 19:59:47

How to make a button with a link in telebot python?

5e95ebd3260ae770214560.png
It needs to be done like. I couldn't find any good guides on Google, please help! :D

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor, 2020-04-14
@enotcode

keyboard = types.InlineKeyboardMarkup()
url_button = types.InlineKeyboardButton(text="Перейти к оплате", url="https://example.com")
keyboard.add(url_button)

@bot.message_handler(content_types=["text"])
def foo(message):
    bot.send_message(message.chat.id, "Для пополнения баланса нажмите на кнопку ниже.", reply_markup=keyboard)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question