Added a setting for the initial value of the GambaSesh Discord bypass variable

This commit is contained in:
barelyprofessional
2025-03-02 16:43:49 +08:00
parent 64d7e38619
commit 1efa808f82
2 changed files with 15 additions and 1 deletions

View File

@@ -39,13 +39,15 @@ public class BotServices
internal bool IsChrisDjLive = false; internal bool IsChrisDjLive = false;
// lol // lol
internal bool TemporarilyBypassGambaSeshForDiscord = false; internal bool TemporarilyBypassGambaSeshForDiscord;
internal bool TemporarilySuppressGambaMessages = false; internal bool TemporarilySuppressGambaMessages = false;
public BotServices(ChatBot botInstance, CancellationToken ctx) public BotServices(ChatBot botInstance, CancellationToken ctx)
{ {
_chatBot = botInstance; _chatBot = botInstance;
_cancellationToken = ctx; _cancellationToken = ctx;
TemporarilyBypassGambaSeshForDiscord =
Helpers.GetValue(BuiltIn.Keys.DiscordTemporarilyBypassGambaSeshInitialValue).Result.ToBoolean();
_logger.Info("Bot services ready to initialize!"); _logger.Info("Bot services ready to initialize!");
} }

View File

@@ -850,6 +850,16 @@ public static class BuiltIn
IsSecret = false, IsSecret = false,
CacheDuration = TimeSpan.FromHours(1), CacheDuration = TimeSpan.FromHours(1),
ValueType = SettingValueType.Text 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 BotImageRandomSliceDivideBy = "Bot.Image.RandomSliceDivideBy";
public static string TwitchCommercialRestreamShillMessage = "Twitch.CommercialRestreamShillMessage"; public static string TwitchCommercialRestreamShillMessage = "Twitch.CommercialRestreamShillMessage";
public static string BotChrisDjLiveImage = "Bot.ChrisDjLiveImage"; public static string BotChrisDjLiveImage = "Bot.ChrisDjLiveImage";
public static string DiscordTemporarilyBypassGambaSeshInitialValue =
"Discord.TemporarilyBypassGambaSeshInitialValue";
} }
} }