add logging
This commit is contained in:
parent
32302f5c72
commit
70114b5d53
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user