Add banner (large) image
This commit is contained in:
@@ -11,6 +11,7 @@ namespace PluralKit.Core
|
||||
public Partial<string> Hid { get; set; }
|
||||
public Partial<string?> DisplayName { get; set; }
|
||||
public Partial<string?> AvatarUrl { get; set; }
|
||||
public Partial<string?> BannerImage { get; set; }
|
||||
public Partial<string?> Color { get; set; }
|
||||
public Partial<LocalDate?> Birthday { get; set; }
|
||||
public Partial<string?> Pronouns { get; set; }
|
||||
@@ -32,6 +33,7 @@ namespace PluralKit.Core
|
||||
.With("hid", Hid)
|
||||
.With("display_name", DisplayName)
|
||||
.With("avatar_url", AvatarUrl)
|
||||
.With("banner_image", BannerImage)
|
||||
.With("color", Color)
|
||||
.With("birthday", Birthday)
|
||||
.With("pronouns", Pronouns)
|
||||
@@ -52,6 +54,8 @@ namespace PluralKit.Core
|
||||
{
|
||||
if (AvatarUrl.Value != null && !MiscUtils.TryMatchUri(AvatarUrl.Value, out var avatarUri))
|
||||
throw new InvalidPatchException("avatar_url");
|
||||
if (BannerImage.Value != null && !MiscUtils.TryMatchUri(BannerImage.Value, out var bannerImage))
|
||||
throw new InvalidPatchException("banner");
|
||||
if (Color.Value != null && (!Regex.IsMatch(Color.Value, "^[0-9a-fA-F]{6}$")))
|
||||
throw new InvalidPatchException("color");
|
||||
}
|
||||
|
Reference in New Issue
Block a user