feat: tune webapp visual, use telegram widget for login

This commit is contained in:
3252a8
2026-04-23 14:06:21 +03:00
parent eab803652b
commit b9cb1fec06
14 changed files with 6265 additions and 1212 deletions
+8 -2
View File
@@ -243,8 +243,14 @@ async def run_bot(settings_param: Settings):
actual_bot_username = "your_bot_username"
try:
bot_info = await bot.get_me()
actual_bot_username = bot_info.username
logging.info(f"Bot username resolved: @{actual_bot_username}")
if bot_info.username:
actual_bot_username = bot_info.username
dp["bot_username"] = actual_bot_username
logging.info(f"Bot username resolved: @{actual_bot_username}")
else:
logging.warning(
"Bot username is empty; Telegram Login Widget will be unavailable."
)
except Exception as e:
logging.error(
f"Failed to get bot info (e.g., for YooKassa default URL): {e}. Using fallback: {actual_bot_username}"