diff --git a/src/Discord.Net.Rest/API/Common/ButtonComponent.cs b/src/Discord.Net.Rest/API/Common/ButtonComponent.cs index 3c8fcca8c..dd10bcd44 100644 --- a/src/Discord.Net.Rest/API/Common/ButtonComponent.cs +++ b/src/Discord.Net.Rest/API/Common/ButtonComponent.cs @@ -42,23 +42,25 @@ namespace Discord.API this.Url = c.Url; this.Disabled = c.Disabled; - if (c.Emote is Emote e) + if (c.Emote != null) { - this.Emote = new Emoji() + if (c.Emote is Emote e) { - Name = e.Name, - Animated = e.Animated, - Id = e.Id, - }; - } - else - { - this.Emote = new Emoji() + this.Emote = new Emoji() + { + Name = e.Name, + Animated = e.Animated, + Id = e.Id, + }; + } + else { - Name = c.Emote.Name - }; - } - + this.Emote = new Emoji() + { + Name = c.Emote.Name + }; + } + } } } }