From 1efa808f82251b28d98a8f19cf4802226f2c74a1 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sun, 2 Mar 2025 16:43:49 +0800 Subject: [PATCH] Added a setting for the initial value of the GambaSesh Discord bypass variable --- KfChatDotNetBot/Services/BotServices.cs | 4 +++- KfChatDotNetBot/Settings/BuiltIn.cs | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/KfChatDotNetBot/Services/BotServices.cs b/KfChatDotNetBot/Services/BotServices.cs index 9be53f5..cd5d79e 100644 --- a/KfChatDotNetBot/Services/BotServices.cs +++ b/KfChatDotNetBot/Services/BotServices.cs @@ -39,13 +39,15 @@ public class BotServices internal bool IsChrisDjLive = false; // lol - internal bool TemporarilyBypassGambaSeshForDiscord = false; + internal bool TemporarilyBypassGambaSeshForDiscord; internal bool TemporarilySuppressGambaMessages = false; public BotServices(ChatBot botInstance, CancellationToken ctx) { _chatBot = botInstance; _cancellationToken = ctx; + TemporarilyBypassGambaSeshForDiscord = + Helpers.GetValue(BuiltIn.Keys.DiscordTemporarilyBypassGambaSeshInitialValue).Result.ToBoolean(); _logger.Info("Bot services ready to initialize!"); } diff --git a/KfChatDotNetBot/Settings/BuiltIn.cs b/KfChatDotNetBot/Settings/BuiltIn.cs index fa9809d..5d2fc65 100644 --- a/KfChatDotNetBot/Settings/BuiltIn.cs +++ b/KfChatDotNetBot/Settings/BuiltIn.cs @@ -850,6 +850,16 @@ public static class BuiltIn IsSecret = false, CacheDuration = TimeSpan.FromHours(1), ValueType = SettingValueType.Text + }, + new BuiltInSettingsModel + { + Key = Keys.DiscordTemporarilyBypassGambaSeshInitialValue, + Regex = "(true|false)", + Description = "What the initial value of the Discord GambaSesh temporary bypass variable should be", + Default = "false", + IsSecret = false, + CacheDuration = TimeSpan.FromHours(1), + ValueType = SettingValueType.Boolean } ]; @@ -919,5 +929,7 @@ public static class BuiltIn public static string BotImageRandomSliceDivideBy = "Bot.Image.RandomSliceDivideBy"; public static string TwitchCommercialRestreamShillMessage = "Twitch.CommercialRestreamShillMessage"; public static string BotChrisDjLiveImage = "Bot.ChrisDjLiveImage"; + public static string DiscordTemporarilyBypassGambaSeshInitialValue = + "Discord.TemporarilyBypassGambaSeshInitialValue"; } } \ No newline at end of file