diff --git a/app/bot.py b/app/bot.py
index f1e95ee..0374c3f 100644
--- a/app/bot.py
+++ b/app/bot.py
@@ -272,7 +272,20 @@ def add_stan_quote(message):
bot.send_message(message.chat.id, f'✅ Добавил\n └ {message.reply_to_message.text}')
else:
bot.send_message(message.chat.id,
- f'⛔️ Не добавил, есть токое\n └ {message.reply_to_message.text}')
+ f'⛔️ Не добавил, есть токое\n └ {message.reply_to_message.text}')
+
+
+@bot.message_handler(func=is_white, commands=['remove'])
+def remove_stan_quote(message):
+ if message.reply_to_message and message.reply_to_message.text:
+ if message.reply_to_message.text in (i.rstrip() for i in open('Stan.txt', 'r', encoding='utf8')):
+ quotes = [i.rstrip() for i in open('Stan.txt', 'r', encoding='utf8')]
+ with open('Stan.txt', 'w', encoding='utf8') as stan_quotes:
+ quotes.remove(message.reply_to_message.text)
+ stan_quotes.writelines(quotes)
+ bot.send_message(message.chat.id, f'✅ Удолил\n └ {message.reply_to_message.text}')
+ else:
+ bot.send_message(message.chat.id, f'⛔️ Нет такого\n └ {message.reply_to_message.text}')
@bot.message_handler(func=is_admin, commands=['stats'])