fix: empty photo send

This commit is contained in:
omg-xtao 2023-03-10 14:52:18 +00:00 committed by GitHub
parent 1ca95af500
commit d85a3fd326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

2
.gitignore vendored
View File

@ -129,6 +129,8 @@ dmypy.json
.pyre/ .pyre/
.idea/ .idea/
.vscode/
.devcontainer/
bot.session* bot.session*
config.ini config.ini
data/ data/

View File

@ -36,7 +36,7 @@ class ReadySend:
try: try:
misskey_bot = get_misskey_bot(user_id) misskey_bot = get_misskey_bot(user_id)
await misskey_bot.core.api.note.action.send( await misskey_bot.core.api.note.action.send(
content=self.content, content=self.content or None,
reply_id=self.reply_id, reply_id=self.reply_id,
files=self.files, files=self.files,
) )
@ -80,7 +80,7 @@ class ReadySendMessage:
try: try:
misskey_bot = get_misskey_bot(user_id) misskey_bot = get_misskey_bot(user_id)
await misskey_bot.core.api.chat.action.send( await misskey_bot.core.api.chat.action.send(
text=self.text, text=self.text or None,
user_id=self.user_id, user_id=self.user_id,
group_id=self.group_id, group_id=self.group_id,
file_id=self.file_id, file_id=self.file_id,

View File

@ -1,7 +1,7 @@
Pyrogram==2.0.97 Pyrogram==2.0.100
tgCrypto==1.2.5 tgCrypto==1.2.5
httpx==0.23.3 httpx==0.23.3
apscheduler==3.9.1.post1 apscheduler==3.10.1
sqlalchemy==1.4.41 sqlalchemy==1.4.41
sqlmodel==0.0.8 sqlmodel==0.0.8
aiosqlite==0.18.0 aiosqlite==0.18.0