From d85a3fd32652488707ff5108a3cf3385a1125fec Mon Sep 17 00:00:00 2001 From: omg-xtao <100690902+omg-xtao@users.noreply.github.com> Date: Fri, 10 Mar 2023 14:52:18 +0000 Subject: [PATCH] fix: empty photo send --- .gitignore | 2 ++ defs/confirm.py | 4 ++-- requirements.txt | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 914943d..213c8ea 100644 --- a/.gitignore +++ b/.gitignore @@ -129,6 +129,8 @@ dmypy.json .pyre/ .idea/ +.vscode/ +.devcontainer/ bot.session* config.ini data/ diff --git a/defs/confirm.py b/defs/confirm.py index 5d97fde..e83e176 100644 --- a/defs/confirm.py +++ b/defs/confirm.py @@ -36,7 +36,7 @@ class ReadySend: try: misskey_bot = get_misskey_bot(user_id) await misskey_bot.core.api.note.action.send( - content=self.content, + content=self.content or None, reply_id=self.reply_id, files=self.files, ) @@ -80,7 +80,7 @@ class ReadySendMessage: try: misskey_bot = get_misskey_bot(user_id) await misskey_bot.core.api.chat.action.send( - text=self.text, + text=self.text or None, user_id=self.user_id, group_id=self.group_id, file_id=self.file_id, diff --git a/requirements.txt b/requirements.txt index 81e3859..1274b79 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -Pyrogram==2.0.97 +Pyrogram==2.0.100 tgCrypto==1.2.5 httpx==0.23.3 -apscheduler==3.9.1.post1 +apscheduler==3.10.1 sqlalchemy==1.4.41 sqlmodel==0.0.8 aiosqlite==0.18.0