Gate sloppa behind T&H

This commit is contained in:
barelyprofessional
2026-03-19 21:59:16 -05:00
parent b40fdf1a7c
commit df6db90822

View File

@@ -1,5 +1,6 @@
using System.Net.Http.Headers;
using System.Text.RegularExpressions;
using Humanizer;
using KfChatDotNetBot.Extensions;
using KfChatDotNetBot.Models;
using KfChatDotNetBot.Models.DbModels;
@@ -178,6 +179,12 @@ public class GetRandomImage : ICommand
RateLimitService.RemoveMostRecentEntry(user, this);
return;
}
if (key == "sloppa" && user.UserRight < UserRight.TrueAndHonest)
{
await botInstance.SendWhisperAsync(user.KfId, $"{user.FormatUsername()}, sloppa requires at least {UserRight.TrueAndHonest.Humanize()}");
return;
}
var settings = await SettingsProvider.GetMultipleValuesAsync([
BuiltIn.Keys.BotImageRandomSliceDivideBy, BuiltIn.Keys.BotImagePigCubeSelfDestruct,
BuiltIn.Keys.BotImageInvertedCubeUrl, BuiltIn.Keys.BotImagePigCubeSelfDestructMin,