Skip to content

Commit c8ec86d

Browse files
authored
Update start.py
1 parent f99eef5 commit c8ec86d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/start.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ async def start_command(client: Client, message: Message):
5151
for msg in messages:
5252

5353
if bool(CUSTOM_CAPTION) & bool(msg.document):
54-
caption = CUSTOM_CAPTION.format(previouscaption = msg.caption.html, filename = msg.document.file_name)
54+
caption = CUSTOM_CAPTION.format(previouscaption = "" if not msg.caption else msg.caption.html, filename = msg.document.file_name)
5555
else:
56-
caption = msg.caption.html
56+
caption = "" if not msg.caption else msg.caption.html
5757

5858
if DISABLE_CHANNEL_BUTTON:
5959
reply_markup = msg.reply_markup

0 commit comments

Comments
 (0)