replace \n with space

This commit is contained in:
BennyThink
2022-06-19 20:19:51 +08:00
parent 53860b1bf5
commit 0d080722e3

View File

@@ -311,7 +311,7 @@ def choose_link(call):
if result.get("type") == "resource":
caption = "{}\n\n{}".format(result["cnname"], result["share"])
else:
caption = result["all"]
caption = result["all"].replace(r"\n", " ")
bot.send_chat_action(call.message.chat.id, 'upload_document')
bot.send_document(call.message.chat.id, f, caption=caption)