-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
So I have this code, where it tries to find-out the bots username, it returns with AttributeError: 'Client' object has no attribute 'user', is there a way to fix this?
from fastapi import FastAPI, Request, HTTPException, APIRouter
from fastapi.responses import HTMLResponse
import os
import requests
import ro_py
from ro_py.client import Client
from dotenv import load_dotenv
load_dotenv()
RobloxCookie = os.getenv("COOKIE")
client = ro_py.Client(RobloxCookie)
router = APIRouter()
async def get_bot_username():
bot_username = client.user.name
return bot_username
@router.get("/bot/username", response_class=HTMLResponse)
async def about(request: Request):
bot_username = await get_bot_username()
return bot_usernameMetadata
Metadata
Assignees
Labels
No labels