THE ISSUE:
I am making an icon which shows the player’s avatar headshot, and used GetUserThumbnailAsync() to try and get the image URL for a player, and i tried to make it so that if the player’s icon is moderated, it uses my own image, but GetUserThumbnailAsync() doesn’t seem to properly tell me that the image is moderated. I tried to find other people with the same issue, but the only ones I found that had the same issue all appeared to have been fixed using the IsReady Boolean returned by the method. According to the Documentation, The return should include the Image URL, And a boolean which states whether the image is ready or not. During testing, the IsReady Boolean seems to always be true, and never returns false even when the image is moderated, and there also seems to be a third boolean returned, which always seems to be false, and is unlisted in the documentation.
MY CODE:
local function GetUserImage(Username:string)
Username = Username or ""
local Success, UserID = GetUserIDFromName(Username)
local PlayerIcon, IsReady, unknown = "rbxassetid://107707948515777", false, nil
if Success then
PlayerIcon, IsReady, unknown = game.Players:GetUserThumbnailAsync(UserID,Enum.ThumbnailType.HeadShot,Enum.ThumbnailSize.Size150x150)
print(PlayerIcon,IsReady,unknown)
if not IsReady then
PlayerIcon = "rbxassetid://107707948515777"
end
end
return PlayerIcon
end
MORE:
Im not sure about whether this should be a bug report or not, but I was hoping that there may perhaps be a solution to this that I am missing, And I would prefer not to use HttpService but there may be a method of getting the icon via HttpService which actually tells me that the image is moderated. Also, The users that I have been using to test this are moderated accounts, such as “Cat” and “Dog”, since their profile always returns a Moderated Image, But it also fails to detect moderated images for non-terminated users, such as when i used the username of a user that I saw earlier today while playing a game. (though i forgot their username).
Edit: Im sorry in advanced if this is poorly worded, I am tired rn.
Edit2: HttpService does not seem to be a good or valid way to get the image either.
Edit3: I found a way to detect some of the content moderated users, by checking if they were wearing a moderated item, but I couldn’t figure out how to get banned users (without HttpService)