From 3be72a8ae663c64301d488245e63a2e24eb8c265 Mon Sep 17 00:00:00 2001 From: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:21:08 +0300 Subject: [PATCH] [Feature] Public constructor for Emote (#2936) --- src/Discord.Net.Core/Entities/Emotes/Emote.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.Core/Entities/Emotes/Emote.cs b/src/Discord.Net.Core/Entities/Emotes/Emote.cs index 71529732..b55535ba 100644 --- a/src/Discord.Net.Core/Entities/Emotes/Emote.cs +++ b/src/Discord.Net.Core/Entities/Emotes/Emote.cs @@ -31,8 +31,13 @@ namespace Discord /// public string Url => CDN.GetEmojiUrl(Id, Animated); - internal Emote(ulong id, string name, bool animated) + /// + /// Creates a new instance of . + /// + 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; Name = name; Animated = animated;