Hi, so I am trying to make a discord bot that gets a roblox players status. Does anyone know how to do this?
1 Like
What type of status are you talking about? The Playing/Studio/Online/Offline status? Or the tiny description they add to their profile?
1 Like
I am trying to get the discription
1 Like
how would I get it to only print out the description?
1 Like
I made a example py script that uses requests to get a players description from his id. Ofcourse replace the id with the player you want.
import requests
def get_player_description(user_id):
url = f"https://users.roblox.com/v1/users/{user_id}"
response = requests.get(url)
if response.status_code == 200:
player_data = response.json()
return player_data["description"]
else:
return None
user_id = 156719681 # Replace with the desired user ID
description = get_player_description(user_id)
print(f"Player description: \n{description}")
2 Likes
holy it actually works that’s so very much
2 Likes
Mark his post as the solution if it worked for you!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.