yeah it's sadge (#2880)

This commit is contained in:
Mihail Gribkov
2024-03-15 02:25:26 +03:00
committed by GitHub
parent d0c0a56884
commit 4efe3be301
3 changed files with 48 additions and 1 deletions

View File

@@ -20,6 +20,22 @@ namespace Discord.WebSocket
public bool IsMfaEnabled { get; private set; }
internal override SocketGlobalUser GlobalUser { get; set; }
/// <summary>
/// Gets the hash of the banner.
/// </summary>
/// <remarks>
/// <see langword="null"/> if the user has no banner set.
/// </remarks>
public string BannerId { get; internal set; }
/// <summary>
/// Gets the color of the banner.
/// </summary>
/// <remarks>
/// <see langword="null"/> if the user has no banner set.
/// </remarks>
public Color? BannerColor { get; internal set; }
/// <inheritdoc />
public override bool IsBot { get { return GlobalUser.IsBot; } internal set { GlobalUser.IsBot = value; } }
/// <inheritdoc />
@@ -86,6 +102,18 @@ namespace Discord.WebSocket
Locale = model.Locale.Value;
hasGlobalChanges = true;
}
if (model.BannerColor.IsSpecified && model.BannerColor.Value != BannerColor)
{
BannerColor = model.BannerColor.Value;
hasGlobalChanges = true;
}
if (model.Banner.IsSpecified && model.Banner.Value != BannerId)
{
BannerId = model.Banner.Value;
hasGlobalChanges = true;
}
return hasGlobalChanges;
}