fixed error on changing role icon/emoji to an image. (#3192)

* fixed error on changing role icon/emoji to an image.

* Update src/Discord.Net.Rest/Entities/Roles/RoleHelper.cs

---------

Co-authored-by: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com>
This commit is contained in:
Kevin
2025-11-13 18:06:05 +01:00
committed by GitHub
parent f205bba17f
commit 06510e1b2b

View File

@@ -40,7 +40,7 @@ namespace Discord.Rest
if ((args.Icon.IsSpecified && args.Icon.Value != null) && role.Emoji != null) if ((args.Icon.IsSpecified && args.Icon.Value != null) && role.Emoji != null)
{ {
apiArgs.Emoji = ""; apiArgs.Emoji = Optional<string>. Unspecified;
} }
if ((args.Emoji.IsSpecified && args.Emoji.Value != null) && !string.IsNullOrEmpty(role.Icon)) if ((args.Emoji.IsSpecified && args.Emoji.Value != null) && !string.IsNullOrEmpty(role.Icon))