mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-13 01:22:43 -04:00
Added length limit to tags
This commit is contained in:
@@ -96,6 +96,13 @@ public class AddImageTagsCommand : ICommand
|
|||||||
return;
|
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();
|
image.TagList = image.TagList.Concat(tags).Distinct().ToList();
|
||||||
if (image.TagList.Count > 50)
|
if (image.TagList.Count > 50)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user