From bca8beca286b406bc106ddbd3fb5a1e37fa7b976 Mon Sep 17 00:00:00 2001 From: Lichi Shatskaya <75086807+NanamyYu@users.noreply.github.com> Date: Mon, 22 Aug 2022 01:41:08 +0300 Subject: [PATCH] Replace 'data' with 'document' in send params --- tg_logger/files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tg_logger/files.py b/tg_logger/files.py index 2168ada..09cf59e 100644 --- a/tg_logger/files.py +++ b/tg_logger/files.py @@ -43,7 +43,7 @@ def send(self, file_path: str, caption: str = ''): t0 = time() while time() - t0 < self.timeout: try: - self.bot.send_document(user_id, data=data, caption=caption, parse_mode="HTML") + self.bot.send_document(user_id, document=data, caption=caption, parse_mode="HTML") logger.info("File %s successfully send to %s", file_path, user_id) break except Exception: