1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-12-16 23:46:17 +00:00

fix chats

This commit is contained in:
mihalin
2021-09-10 23:09:00 +03:00
parent 2555d155a0
commit e4827132ee
2 changed files with 7 additions and 4 deletions

View File

@@ -47,9 +47,9 @@ async def select_chat(bot: Bot, call: types.CallbackQuery, chat: str):
return
chat_obj = await bot.group_chats.filter(id=chat).first()
if not chat:
if not chat_obj:
await call.answer("Нельзя привязать бота к этому чату")
return
bot.group_chat = chat
bot.group_chat = chat_obj
await bot.save()
await call.answer(f"Выбран чат {chat_obj.name}")