import telebot
from datetime import datetime

bot = telebot.TeleBot(TOKEN)

@bot.message_handler(commands=['start'])
def start(message):
    bot.send_message(message.chat.id, 'Hello!')

@bot.message_handler(func=lambda message: message.text == 'Расписание')
def rasp(message):
    bot.send_document(message.chat.id, f"http://восколледж.рф/files/0001/%D0%A0%D0%B0%D1%81%D0%BF%D0%B8%D1%81%D0%B0%D0%BD%D0%B8%D0%B5%20%D0%B7%D0%B0%D0%BD%D1%8F%D1%82%D0%B8%D0%B9%20%D0%A1%D0%9F-1%20%D0%BD%D0%B0%20{datetime.now().day}.{str(datetime.now().month).zfill(2)}.{datetime.now().year}.pdf", caption="Держи расписание на сегодня")

bot.polling(none_stop=True, interval=0)
Edit
Pub: 14 Feb 2023 10:41 UTC
Edit: 14 Feb 2023 10:43 UTC
Views: 35