gamesdk-and-dispatch icon indicating copy to clipboard operation
gamesdk-and-dispatch copied to clipboard

Avatar not being fetch for users without nitro

Open NIMFER opened this issue 3 years ago • 3 comments

Describe the bug Game SDK fetches avatar for nitro users but not for normal users.

Steps to reproduce Steps to reproduce the behavior:

  1. Make a script that will fetch avatar
  2. As userId insert id of a user without nitro
  3. 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);
				}

			});
		};
	}

NIMFER avatar Nov 04 '21 07:11 NIMFER

Getting the same issue.

thetestgame avatar Nov 10 '21 00:11 thetestgame

Embedded message fields can be added to the disabled option.

E.g: { name: 'Name', value: 'Value', disabled: true }

theneron avatar Nov 11 '21 18:11 theneron

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

NIMFER avatar Nov 16 '21 17:11 NIMFER