Browse Source

Don't check message content if an embed is present when modifying

tags/1.0-rc
Christopher F 8 years ago
parent
commit
1be6f77efb
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/Discord.Net.Core/API/DiscordRestApiClient.cs

+ 2
- 1
src/Discord.Net.Core/API/DiscordRestApiClient.cs View File

@@ -505,7 +505,8 @@ namespace Discord.API
Preconditions.NotNull(args, nameof(args));
if (args.Content.IsSpecified)
{
Preconditions.NotNullOrEmpty(args.Content, nameof(args.Content));
if (!args.Embed.IsSpecified)
Preconditions.NotNullOrEmpty(args.Content, nameof(args.Content));
if (args.Content.Value.Length > DiscordConfig.MaxMessageSize)
throw new ArgumentOutOfRangeException($"Message content is too long, length must be less or equal to {DiscordConfig.MaxMessageSize}.", nameof(args.Content));
}


Loading…
Cancel
Save