diff --git a/src/bot.py b/src/bot.py index f1dccf8..3993c21 100644 --- a/src/bot.py +++ b/src/bot.py @@ -28,7 +28,10 @@ def process_audio(message: Message): # Download audio file date = datetime.now().strftime('%Y-%m-%d %H-%M') - downloader = bot.getFile(audio.file_id) + try: + downloader = bot.getFile(audio.file_id) + except: + downloader = bot.getFile(audio.file_id) file = Path(tmpdir).joinpath(f'{date} {message.from_user.name[1:]}.mp3') print(downloader, '->', file) downloader.download(file)