Added support for removing avatars

This commit is contained in:
RogueException
2015-09-26 23:29:17 -03:00
parent 4710225035
commit 9de7fe173e
2 changed files with 4 additions and 1 deletions

View File

@@ -227,7 +227,9 @@ namespace Discord
if (currentPassword == null) throw new ArgumentNullException(nameof(currentPassword));
string avatarBase64 = null;
if (avatar != null)
if (avatarType == AvatarImageType.None)
avatarBase64 = "";
else if (avatar != null)
{
string base64 = Convert.ToBase64String(avatar);
string type = avatarType == AvatarImageType.Jpeg ? "image/jpeg;base64" : "image/png;base64";

View File

@@ -9,6 +9,7 @@ namespace Discord
{
public enum AvatarImageType
{
None,
Jpeg,
Png
}