[Feature] Avatar decorations support (#2782)

* yup

* nullable...

* add props & methos to `GuildUser` & `IUser`
This commit is contained in:
Mihail Gribkov
2023-11-18 23:38:36 +03:00
committed by GitHub
parent b45b7743a5
commit f64d9d6f22
6 changed files with 90 additions and 0 deletions

View File

@@ -257,5 +257,15 @@ namespace Discord
_ => throw new ArgumentException(nameof(format)),
};
}
/// <summary>
/// Gets an avatar decoration url based off the hash.
/// </summary>
/// <param name="avatarDecorationHash">The hash of the avatar decoraition.</param>
/// <returns>
/// A URL to the avatar decoration.
/// </returns>
public static string GetAvatarDecorationUrl(string avatarDecorationHash)
=> $"{DiscordConfig.CDNUrl}avatar-decoration-presets/{avatarDecorationHash}.png";
}
}