1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-17 03:04:45 +03:00

fix: limit string argument length to avoid "embed description too long" errors

This commit is contained in:
Octol1ttle 2023-10-28 22:54:52 +05:00
parent cf7007f269
commit 6201b6601d
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
5 changed files with 19 additions and 7 deletions

View file

@ -1,4 +1,5 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;
using System.Text.Json.Nodes;
using JetBrains.Annotations;
@ -167,7 +168,8 @@ public class SettingsCommandGroup : CommandGroup
public async Task<Result> ExecuteEditSettingsAsync(
[Description("The setting whose value you want to change")]
AllOptionsEnum setting,
[Description("Setting value")] string value)
[Description("Setting value")] [MaxLength(512)]
string value)
{
if (!_context.TryGetContextIDs(out var guildId, out var channelId, out var executorId))
{