Skip to content

Commit

Permalink
fix: Add length check for modifying channel length
Browse files Browse the repository at this point in the history
  • Loading branch information
VelvetToroyashi committed May 2, 2024
1 parent 5bf22c4 commit 47b48b7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ public virtual async Task<Result<IChannel>> ModifyChannelAsync
return new ArgumentOutOfRangeError(nameof(name), "The name must be between 1 and 100 characters.");
}

if (status is { HasValue: true, Value.Length: > 500 })
{
return new ArgumentOutOfRangeError(nameof(status), "The status must be between 0 and 500 characters.");
}

if (topic.HasValue)
{
if (type.TryGet(out var channelType) && channelType == ChannelType.GuildForum)
Expand Down

0 comments on commit 47b48b7

Please sign in to comment.