From 2909410ce6da1843b5275e65731f52a55ebccbc2 Mon Sep 17 00:00:00 2001 From: mihalin Date: Thu, 12 May 2022 16:17:06 +0300 Subject: [PATCH] minor fixes for prev --- olgram/commands/admin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/olgram/commands/admin.py b/olgram/commands/admin.py index 831240d..9e41976 100644 --- a/olgram/commands/admin.py +++ b/olgram/commands/admin.py @@ -27,7 +27,7 @@ async def notify(message: types.Message, state: FSMContext): await message.answer(_("Нужно указать имя бота")) return - bot = await models.Bot.filter(name=bot_name).first() + bot = await models.Bot.filter(name=bot_name.removeprefix("@")).first() if not bot: await message.answer(_("Такого бота нет в системе")) @@ -76,6 +76,6 @@ async def on_notify_message_confirm(message: types.Message, state: FSMContext): text = data["notify_text"] chat_id = await bot.super_chat_id() + await state.reset_state(with_data=True) await message.bot.send_message(chat_id, text=text) - - await message.answer(_("Отправлено")) + await message.answer(_("Отправлено"), reply_markup=types.ReplyKeyboardRemove())