gamesdk-and-dispatch
gamesdk-and-dispatch copied to clipboard
Avatar not being fetch for users without nitro
Describe the bug Game SDK fetches avatar for nitro users but not for normal users.
Steps to reproduce Steps to reproduce the behavior:
- Make a script that will fetch avatar
- As userId insert id of a user without nitro
- See error.
Expected behavior
Avatar will not be fetched and Discord.Result
will return an InternalError.
Implementation specifics
- C#
- Unity
Additional context Code I used:
void FetchUserInfo()
{
userManager = discord.GetUserManager();
imageManager = discord.GetImageManager();
userManager.OnCurrentUserUpdate += () => {
var currentUser = userManager.GetCurrentUser();
long userID = currentUser.Id;
Debug.Log("Username = " + currentUser.Username);
Debug.Log("User ID = " + userID);
Debug.Log("User Tag = " + currentUser.Discriminator);
eosManager.SetDisplayName(currentUser.Username);
imageManager.Fetch(Discord.ImageHandle.User(userID, 128), (result, handle) =>
{
if (result == Discord.Result.Ok)
{
eosManager.playerAvatar = imageManager.GetTexture(handle);
}
else
{
Debug.LogError("image error " + handle.Id);
}
});
};
}
Getting the same issue.
Embedded message fields can be added to the disabled option.
E.g: { name: 'Name', value: 'Value', disabled: true }
Update: I discovered that the error takes place only if you have changed your avatar, if you still use the default one then it will work but if you ever change the avatar then it will give you the InternalError