mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-12 00:59:34 -04:00
Add a tag limit
This commit is contained in:
@@ -97,6 +97,12 @@ public class AddImageTagsCommand : ICommand
|
||||
}
|
||||
|
||||
image.TagList = image.TagList.Concat(tags).Distinct().ToList();
|
||||
if (image.TagList.Count > 50)
|
||||
{
|
||||
await botInstance.SendChatMessageAsync($"{user.FormatUsername()}, {id} has a shitload of tags already!",
|
||||
true);
|
||||
return;
|
||||
}
|
||||
await db.SaveChangesAsync(ctx);
|
||||
await botInstance.SendChatMessageAsync(
|
||||
$"{user.FormatUsername()}, updated tags for image ID {id} with {image.TagList.Humanize()}", true);
|
||||
|
||||
Reference in New Issue
Block a user