We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f99eef5 commit c8ec86dCopy full SHA for c8ec86d
plugins/start.py
@@ -51,9 +51,9 @@ async def start_command(client: Client, message: Message):
51
for msg in messages:
52
53
if bool(CUSTOM_CAPTION) & bool(msg.document):
54
- caption = CUSTOM_CAPTION.format(previouscaption = msg.caption.html, filename = msg.document.file_name)
+ caption = CUSTOM_CAPTION.format(previouscaption = "" if not msg.caption else msg.caption.html, filename = msg.document.file_name)
55
else:
56
- caption = msg.caption.html
+ caption = "" if not msg.caption else msg.caption.html
57
58
if DISABLE_CHANNEL_BUTTON:
59
reply_markup = msg.reply_markup
0 commit comments