728x90
๋ฐ์ํ
def uploader(update: Update, context: CallbackContext) -> None:
try:
with open(update.message.document.file_name, 'wb') as f:
context.bot.get_file(update.message.document).download(out=f)
update.message.reply_text( 'ํ์ผ ์
๋ก๋ ์ฑ๊ณต.' )
except:
update.message.reply_text( 'ํ์ผ ์
๋ก๋ ์คํจ.' )
updater.dispatcher.add_handler(MessageHandler(Filters.document, uploader))
์ถ์ฒ:
https://stackoverflow.com/questions/62253718/how-can-i-receive-file-in-python-telegram-bot
How can I receive file in python-telegram-bot?
I have a problem about file messages in python telegram bot. How can I receive file and read that file ? Or save it.
stackoverflow.com
728x90
๋ฐ์ํ