From d0e31deb846c22dd8b20aad285608406dfa44d21 Mon Sep 17 00:00:00 2001 From: stef-devs Date: Fri, 24 Jun 2022 10:16:56 +0200 Subject: [PATCH] Now the file sent to the bot is moved to a folder --- index.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.py b/index.py index ace2779..a88fde2 100644 --- a/index.py +++ b/index.py @@ -21,6 +21,7 @@ import deepl import spotipy import pyshorteners import pdf2docx +from fileinput import filename from pdf2docx import Converter, parse from spotipy.oauth2 import SpotifyClientCredentials from youtube_search import YoutubeSearch @@ -374,5 +375,6 @@ def cloud_step(message): downloaded_file = bot.download_file(file_info.file_path) with open(file_name, 'wb') as new_file: new_file.write(downloaded_file) + os.replace(file_name, 'cloud/'+file_name) bot.polling() \ No newline at end of file