Bug fixes and improvements #8

Merged
profitroll merged 23 commits from dev into master 2023-01-11 17:22:34 +02:00
Showing only changes of commit bcaf80e2e1 - Show all commits

View File

@ -33,13 +33,13 @@ async def cmd_start(app: Client, msg: Message):
try:
spoiler = col_spoilers.find_one( {"_id": ObjectId(msg.command[1])} )
if spoiler["photo"] is not None:
await msg.reply_document(spoiler["photo"], caption=spoiler["caption"])
await msg.reply_cached_media(spoiler["photo"], caption=spoiler["caption"])
if spoiler["video"] is not None:
await msg.reply_cached_media(spoiler["video"], caption=spoiler["caption"])
if spoiler["animation"] is not None:
await msg.reply_cached_media(spoiler["animation"], caption=spoiler["caption"])
if spoiler["document"] is not None:
await msg.reply_document(spoiler["document"], caption=spoiler["caption"])
await msg.reply_cached_media(spoiler["document"], caption=spoiler["caption"])
if spoiler["text"] is not None:
await msg.reply_text(spoiler["text"])
except InvalidId: