I'm trying to develop a Telegram bot using pyTelegramBotAPI package and I need to output multiple documents when user enter an specific /command. I tried below code but it shows an error.
def pca_papers(self, message):
bot.send_message(message.chat.id, "Files incoming")
file = open('https://atikegalle.com/uploads/1514125303.pdf', 'rb')
bot.send_document(message.chat.id, file)
Error:
File "C:\Users\pasin\Documents\tgbot\pastpapers.py", line 26, in pca_papers
file = open('https://atikegalle.com/uploads/1514125303.pdf', 'rb')
OSError: [Errno 22] Invalid argument: 'https://atikegalle.com/uploads/1514125303.pdf'