xxxxxxxxxx
# pip install pyTelegramBotAPI
import telebot
from io import BytesIO
bot = telebot.TeleBot('token')
with open(file, 'rb') as tmp:
obj = BytesIO(tmp.read())
obj.name = '1.txt'
bot.send_document(message.from_user.id, data=obj, caption='your file')