add logging

This commit is contained in:
bakatrouble 2021-03-15 22:08:59 +03:00
parent 32302f5c72
commit 70114b5d53

View File

@ -1,3 +1,4 @@
import logging
import os import os
from tempfile import TemporaryDirectory from tempfile import TemporaryDirectory
@ -42,6 +43,7 @@ class RobotBotModuleConfig(TelegramBotModuleConfig):
file = ctx.bot.get_file(file_id) file = ctx.bot.get_file(file_id)
filename = os.path.basename(file.file_path) filename = os.path.basename(file.file_path)
logging.warning(str(file.__dict__))
with TemporaryDirectory() as d: with TemporaryDirectory() as d:
file_path = os.path.join(d, filename) file_path = os.path.join(d, filename)
file.download(file_path) file.download(file_path)