mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
minor fixes for prev
This commit is contained in:
parent
d5c003400a
commit
2909410ce6
@ -27,7 +27,7 @@ async def notify(message: types.Message, state: FSMContext):
|
|||||||
await message.answer(_("Нужно указать имя бота"))
|
await message.answer(_("Нужно указать имя бота"))
|
||||||
return
|
return
|
||||||
|
|
||||||
bot = await models.Bot.filter(name=bot_name).first()
|
bot = await models.Bot.filter(name=bot_name.removeprefix("@")).first()
|
||||||
|
|
||||||
if not bot:
|
if not bot:
|
||||||
await message.answer(_("Такого бота нет в системе"))
|
await message.answer(_("Такого бота нет в системе"))
|
||||||
@ -76,6 +76,6 @@ async def on_notify_message_confirm(message: types.Message, state: FSMContext):
|
|||||||
text = data["notify_text"]
|
text = data["notify_text"]
|
||||||
chat_id = await bot.super_chat_id()
|
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.bot.send_message(chat_id, text=text)
|
||||||
|
await message.answer(_("Отправлено"), reply_markup=types.ReplyKeyboardRemove())
|
||||||
await message.answer(_("Отправлено"))
|
|
||||||
|
Loading…
Reference in New Issue
Block a user