Fix Arcane refresh edit errors

This commit is contained in:
2026-02-07 23:38:15 +03:00
parent 0e6459ea40
commit 08d936ac3e

View File

@@ -21,7 +21,10 @@ async def cmd_arcane_projects(msg: Message, *, edit: bool):
return
if edit:
await msg.edit_text("⏳ Arcane projects…")
try:
await msg.edit_text("⏳ Arcane projects…")
except Exception:
await msg.answer("⏳ Arcane projects…", reply_markup=arcane_kb)
else:
await msg.answer("⏳ Arcane projects…", reply_markup=arcane_kb)
@@ -51,7 +54,10 @@ async def cmd_arcane_projects(msg: Message, *, edit: bool):
kb_inline = InlineKeyboardMarkup(inline_keyboard=rows) if rows else None
if edit:
await msg.edit_text("\n".join(lines), reply_markup=kb_inline)
try:
await msg.edit_text("\n".join(lines), reply_markup=kb_inline)
except Exception:
await msg.answer("\n".join(lines), reply_markup=kb_inline or arcane_kb)
else:
await msg.answer("\n".join(lines), reply_markup=kb_inline or arcane_kb)
@@ -67,7 +73,7 @@ async def arcane_menu(msg: Message):
@dp.message(F.text == "🔄 Refresh")
async def arcane_refresh(msg: Message):
if is_admin_msg(msg):
await cmd_arcane_projects(msg, edit=True)
await cmd_arcane_projects(msg, edit=False)
@dp.callback_query(F.data.startswith("arcane:restart:"))