diff --git a/bots/modules/robot.py b/bots/modules/robot.py index 5304c0c..22385b9 100644 --- a/bots/modules/robot.py +++ b/bots/modules/robot.py @@ -1,5 +1,6 @@ import logging import os +import time from tempfile import TemporaryDirectory import boto3 @@ -42,7 +43,7 @@ class RobotBotModuleConfig(TelegramBotModuleConfig): return file = ctx.bot.get_file(file_id) - filename = os.path.basename(file.file_path) + filename = str(int(time.time())) + '-' + os.path.basename(file.file_path) with TemporaryDirectory() as d: file_path = os.path.join(d, filename) file.download(file_path)