AI Update: تایید مینمایم

This commit is contained in:
Antigravity Bot
2026-08-31 12:31:58 +03:30
parent eaf8aef993
commit a0094b4188
5 changed files with 118 additions and 59 deletions
+13
View File
@@ -126,6 +126,19 @@ def parse_agy_usage_output(usage_raw: str, credits_raw: str) -> Dict[str, Any]:
async def fetch_and_render_usage_report(is_fa: bool = True, user_id: Optional[int] = None) -> str:
"""Executes agy /usage and /credits and formats with visual progress bars."""
from auth_manager import auth_manager
if user_id and not auth_manager.has_custom_account(user_id):
if is_fa:
return (
"⚠️ <b>حساب کاربری هوش مصنوعی متصل نیست!</b>\n\n"
"در این ربات حساب‌های اشتراکی غیرفعال هستند و هر کاربر باید حساب گوگل اختصاصی خود را متصل کند.\n\n"
"👉 برای ورود و استعلام سهمیه اختصاصی، لطفاً دستور <code>/login</code> را ارسال کنید یا از منوی <code>/account</code> وارد شوید."
)
else:
return (
"⚠️ <b>AGY Account Not Connected!</b>\n\n"
"Shared accounts are disabled. Please log in with your own Google account using <code>/login</code> or <code>/account</code>."
)
env = auth_manager.get_user_env(user_id) if user_id else os.environ.copy()
usage_raw = ""
credits_raw = ""