mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-11 08:39:34 -04:00
Added length limit to tags
This commit is contained in:
@@ -96,6 +96,13 @@ public class AddImageTagsCommand : ICommand
|
||||
return;
|
||||
}
|
||||
|
||||
if (tags.Any(tag => tag.Length > 50))
|
||||
{
|
||||
await botInstance.SendChatMessageAsync($"{user.FormatUsername()}, tag length limit is 50 characters",
|
||||
true);
|
||||
return;
|
||||
}
|
||||
|
||||
image.TagList = image.TagList.Concat(tags).Distinct().ToList();
|
||||
if (image.TagList.Count > 50)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user