Browse Source

Fix being unable to modify AllowedMentions with no embeds set.(#2108)

tags/3.3.1
Armano den Boef GitHub 3 years ago
parent
commit
169d54f1df
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions
  1. +0
    -1
      src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs

+ 0
- 1
src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs View File

@@ -53,7 +53,6 @@ namespace Discord.Rest
AllowedMentions allowedMentions = args.AllowedMentions.Value;
Preconditions.AtMost(allowedMentions?.RoleIds?.Count ?? 0, 100, nameof(allowedMentions.RoleIds), "A max of 100 role Ids are allowed.");
Preconditions.AtMost(allowedMentions?.UserIds?.Count ?? 0, 100, nameof(allowedMentions.UserIds), "A max of 100 user Ids are allowed.");
Preconditions.AtMost(args.Embeds.Value?.Length ?? 0, 10, nameof(args.Embeds), "A max of 10 embeds are allowed.");

// check that user flag and user Id list are exclusive, same with role flag and role Id list
if (allowedMentions != null && allowedMentions.AllowedTypes.HasValue)


Loading…
Cancel
Save