C
C
ceyolic2021-10-27 21:01:49
Python
ceyolic, 2021-10-27 21:01:49

How to add buttons to telegram bot?

import telebot
from telebot import types
bot = telebot.TeleBot('токен')
keyboard1 = telebot.types.ReplyKeyboardMarkup()
item1 = types.KeyboardButton('Сделать заказ')
keyboard1.add(item1)


I write this code, but the button is not added. Please tell me what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Gamovich, 2021-10-27
@ceyolic

bot.send_message(message.chat.id,"Сообщение", reply_markup=keyboard1)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question