Skip to content

Commit

Permalink
fix: Change embed description max length to 4096 (#1886)
Browse files Browse the repository at this point in the history
* Update max embed description length (fixes #1881)

* Update unit tests for new embed builder length
  • Loading branch information
th0mk committed Jul 10, 2021
1 parent 22bb1b0 commit 8349cd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Discord.Net.Core/Entities/Messages/EmbedBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class EmbedBuilder
/// <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>
Expand Down
4 changes: 2 additions & 2 deletions test/Discord.Net.Tests.Unit/EmbedBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void Description_Invalid()
{
IEnumerable<string> GetInvalid()
{
yield return new string('a', 2049);
yield return new string('a', 4097);
}
foreach (var description in GetInvalid())
{
Expand All @@ -149,7 +149,7 @@ IEnumerable<string> GetValid()
{
yield return string.Empty;
yield return null;
yield return new string('a', 2048);
yield return new string('a', 4096);
}
foreach (var description in GetValid())
{
Expand Down

0 comments on commit 8349cd7

Please sign in to comment.