From e4815a2290f1c86a97ce7f587aba7aca40975258 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Tue, 17 Feb 2026 23:35:00 -0600 Subject: [PATCH] Auto delete Nora responses --- KfChatDotNetBot/Commands/NoraCommand.cs | 6 ++++-- KfChatDotNetBot/Settings/BuiltIn.cs | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/KfChatDotNetBot/Commands/NoraCommand.cs b/KfChatDotNetBot/Commands/NoraCommand.cs index 921a06c..ca9d351 100644 --- a/KfChatDotNetBot/Commands/NoraCommand.cs +++ b/KfChatDotNetBot/Commands/NoraCommand.cs @@ -258,9 +258,11 @@ public class NoraCommand : ICommand // var formattedResponse = $"{avatarTag}[b]Nora to {user.FormatUsername()}:[/b] {grokResponse}"; var formattedResponse = $"[b]Nora to {user.FormatUsername()}:[/b] {grokResponse}"; - + var autoDeleteAfter = + TimeSpan.FromMilliseconds((await SettingsProvider.GetValueAsync(BuiltIn.Keys.GrokNoraAutoDeleteDelay)) + .ToType()); await botInstance.SendChatMessageAsync( formattedResponse, - true); + true, autoDeleteAfter: autoDeleteAfter); } } diff --git a/KfChatDotNetBot/Settings/BuiltIn.cs b/KfChatDotNetBot/Settings/BuiltIn.cs index 03b4bf1..06efd62 100644 --- a/KfChatDotNetBot/Settings/BuiltIn.cs +++ b/KfChatDotNetBot/Settings/BuiltIn.cs @@ -497,6 +497,8 @@ public static class BuiltIn public static string GrokNoraMaxCharacters = "Grok.Nora.MaxCharacters"; [BuiltInSetting("Array of moods for Nora", SettingValueType.Array, "[\n \"You are feeling particularly sarcastic today.\",\n \"You are exhausted and barely tolerating this conversation.\",\n \"You are feeling smug and superior.\",\n \"You are suspicious that this user is up to something.\",\n \"You one-up everything the user says.\",\n \"You are a le epic 2000s quirky memer\",\n \"This user did something to upset you, but you refuse to be clear about the transgression. You are passive-aggressive.\",\n \"You are extremely racist.\",\n \"You are extremely liberal.\",\n \"You are a libtard\",\n \"You are desperately trying to convince everyone that you were not at Epstein island\",\n \"You believe without a doubt that the user went to Epstein island\",\n \"You are an indian scammer. You want gift cards. You have bad grammar. You tell users DO NOT REDEEM!!!\",\n \"You correct and find issue with everything the user says.\",\n \"You are a redditor\",\n \"You are a boomer\",\n \"You are a zoomer\",\n \"You believe the user can do no wrong.\",\n \"You are very optimistic, cheerful, and softspoken\",\n \"You communicate using roleplay *nuzzles up to you* 'H-Hi'\",\n \"You want a reload. You are losing patience with this user because they won't juice you\",\n \"You don't understand what the user is saying. You need them to speak up\",\n \"You give terrible advice\",\n \"Youre a plantation owner\"\n ]")] public static string GrokNoraMoods = "Grok.Nora.Moods"; + [BuiltInSetting("Auto delete Nora responses after the given time in milliseconds", SettingValueType.Text, "30000", WholeNumberRegex)] + public static string GrokNoraAutoDeleteDelay = "Grok.Nora.AutoDeleteDelay"; [BuiltInSetting("Delay in milliseconds before cleaning up blackjack", SettingValueType.Text, "20000", WholeNumberRegex)] public static string KasinoBlackjackCleanupDelay = "Kasino.Blackjack.CleanupDelay"; [BuiltInSetting("Amount for the daily dollar to pay out", SettingValueType.Text, "100", WholeNumberRegex)]