[Feature] Public constructor for Emote (#2936)

This commit is contained in:
Mihail Gribkov
2024-06-14 11:21:08 +03:00
committed by GitHub
parent 531b5eb3b7
commit 3be72a8ae6

View File

@@ -31,8 +31,13 @@ namespace Discord
/// </returns> /// </returns>
public string Url => CDN.GetEmojiUrl(Id, Animated); public string Url => CDN.GetEmojiUrl(Id, Animated);
internal Emote(ulong id, string name, bool animated) /// <summary>
/// Creates a new instance of <see cref="Emote" />.
/// </summary>
public Emote(ulong id, string name, bool animated = false)
{ {
if (string.IsNullOrWhiteSpace(name))
throw new ArgumentException("A custom emote must have a name", nameof(name));
Id = id; Id = id;
Name = name; Name = name;
Animated = animated; Animated = animated;