replace new strings with spaces in /add
This commit is contained in:
+2
-2
@@ -269,8 +269,8 @@ def add_stan_quote(message):
|
|||||||
if message.reply_to_message and message.reply_to_message.text:
|
if message.reply_to_message and message.reply_to_message.text:
|
||||||
with open('Stan.txt', 'a', encoding='utf8') as stan_quotes:
|
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')):
|
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 + '\n')
|
stan_quotes.write(message.reply_to_message.text.replace('\n', ' ') + '\n')
|
||||||
bot.send_message(message.chat.id, f'✅ <b>Добавил</b>\n └ <i>{message.reply_to_message.text}</i>')
|
bot.send_message(message.chat.id, '✅ <b>Добавил</b>\n └ <i>' + message.reply_to_message.text.replace("\n", " ") + '</i>')
|
||||||
else:
|
else:
|
||||||
bot.send_message(message.chat.id,
|
bot.send_message(message.chat.id,
|
||||||
f'⛔️ <b>Не добавил</b>, есть токое\n └ <i>{message.reply_to_message.text}</i>')
|
f'⛔️ <b>Не добавил</b>, есть токое\n └ <i>{message.reply_to_message.text}</i>')
|
||||||
|
|||||||
Reference in New Issue
Block a user