import telebot
from telebot import types
bot= telebot.TeleBot('TOKEN')
@bot.message_handler(commands=['start'])
def main(message):
markup = types.InlineKeyboardMarkup()
markup.add(types.InlineKeyboardButton('Да',callback_data='next'))
bot.send_message(message.chat.id, f'Привет {message.from_user.username}', reply_markup=markup)
@bot.message_handler()
def info(message):
markup = types.InlineKeyboardMarkup()
markup.add(types.InlineKeyboardButton('Да',callback_data='next'))
if message.text.lower() == 'привет':
bot.send_message(message.chat.id, f'Привет {message.from_user.username},', reply_markup=markup)
@bot.callback_query_handler(func = lambda callback: callback.data)
def check_callback(callback):
markup = types.InlineKeyboardMarkup()
markup.add(types.InlineKeyboardButton('Получить',callback_data='yes'))
if (callback.data == 'next'):
bot.send_message(callback.message.chat.id, "Отлично!", reply_markup=markup)
@bot.message_handler()
def document(message):
bot.send_document(message.chat.id)
file ='ID FILE'
bot.send_document(message.chat.id, file)