diff --git a/DisCatSharp/Entities/Message/DiscordMessage.cs b/DisCatSharp/Entities/Message/DiscordMessage.cs index 9a3f6e9bf8..c743a54181 100644 --- a/DisCatSharp/Entities/Message/DiscordMessage.cs +++ b/DisCatSharp/Entities/Message/DiscordMessage.cs @@ -480,18 +480,18 @@ private List GetMentions() try { - if (this.ReferencedMessage is not null && this.MentionedUsersInternal && this.MentionedUsersInternal.Contains(this.ReferencedMessage.Author)) + if (this.ReferencedMessage is not null && this.MentionedUsersInternal.Count is not 0 && this.MentionedUsersInternal.Contains(this.ReferencedMessage.Author)) mentions.Add(new RepliedUserMention()); - if (this.MentionedUsersInternal.Count != 0) + if (this.MentionedUsersInternal.Count is not 0) mentions.AddRange(this.MentionedUsersInternal.Select(m => (IMention)new UserMention(m))); - if (this.MentionedRoleIds.Count != 0) + if (this.MentionedRoleIds.Count is not 0) mentions.AddRange(this.MentionedRoleIds.Select(r => (IMention)new RoleMention(r))); } catch - { } - + { } + return mentions; }