feat(bot): add bot account ownership and balance

This commit is contained in:
2026-07-24 10:44:48 +05:00
parent 87385228ea
commit 8bd5c80693
22 changed files with 1008 additions and 393 deletions
+3 -2
View File
@@ -111,11 +111,12 @@ async def redeem_single_bot_keys(bot_name: str, keys: list[str]) -> str:
return text[:4000] + ("\n\n...обрезано" if len(text) > 4000 else "")
async def redeem_all_bots_keys(keys: list[str]) -> str:
async def redeem_all_bots_keys(keys: list[str], allowed_bots: list[str] | None = None) -> str:
logger.info("Начата активация ключей по всем ботам: count=%s", len(keys))
response = get_all_bots()
data = response.json()
bots = list(data.get("Result", {}).keys())
available = list(data.get("Result", {}).keys())
bots = [name for name in available if allowed_bots is None or name in allowed_bots]
logger.info("Для массовой активации найдено ботов: count=%s", len(bots))
success_count = 0
failed_count = 0