Browse Source

fix: Change embed description max length to 4096 (#1886)

* Update max embed description length (fixes #1881)

* Update unit tests for new embed builder length
tags/3.0.0
th0mk GitHub 3 years ago
parent
commit
8349cd7e1e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      src/Discord.Net.Core/Entities/Messages/EmbedBuilder.cs
  2. +2
    -2
      test/Discord.Net.Tests.Unit/EmbedBuilderTests.cs

+ 1
- 1
src/Discord.Net.Core/Entities/Messages/EmbedBuilder.cs View File

@@ -27,7 +27,7 @@ namespace Discord
/// <summary>
/// Returns the maximum length of description allowed by Discord.
/// </summary>
public const int MaxDescriptionLength = 2048;
public const int MaxDescriptionLength = 4096;
/// <summary>
/// Returns the maximum length of total characters allowed by Discord.
/// </summary>


+ 2
- 2
test/Discord.Net.Tests.Unit/EmbedBuilderTests.cs View File

@@ -126,7 +126,7 @@ namespace Discord
{
IEnumerable<string> GetInvalid()
{
yield return new string('a', 2049);
yield return new string('a', 4097);
}
foreach (var description in GetInvalid())
{
@@ -149,7 +149,7 @@ namespace Discord
{
yield return string.Empty;
yield return null;
yield return new string('a', 2048);
yield return new string('a', 4096);
}
foreach (var description in GetValid())
{


Loading…
Cancel
Save