Skip to content

Commit

Permalink
Update DiscordMessage.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby committed Jan 24, 2024
1 parent 7582112 commit d28589d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions DisCatSharp/Entities/Message/DiscordMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,18 +480,18 @@ private List<IMention> 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;
}

Expand Down

0 comments on commit d28589d

Please sign in to comment.