From f7f59325c07cfade842f95210de58d52d19b3a10 Mon Sep 17 00:00:00 2001 From: Rykov7 Date: Mon, 16 Jan 2023 11:56:40 +0300 Subject: [PATCH] replace new strings with spaces in /add --- app/bot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/bot.py b/app/bot.py index 0dd0bd5..210f823 100644 --- a/app/bot.py +++ b/app/bot.py @@ -270,7 +270,9 @@ def add_stan_quote(message): with open('Stan.txt', 'a', encoding='utf8') as stan_quotes: if message.reply_to_message.text not in (i.rstrip() for i in open('Stan.txt', 'r', encoding='utf8')): stan_quotes.write(message.reply_to_message.text.replace('\n', ' ') + '\n') - bot.send_message(message.chat.id, '✅ Добавил\n └ ' + message.reply_to_message.text.replace("\n", " ") + '') + bot.send_message(message.chat.id, + '✅ Добавил\n └ ' + message.reply_to_message.text.replace("\n", + " ") + '') else: bot.send_message(message.chat.id, f'⛔️ Не добавил, есть токое\n └ {message.reply_to_message.text}')