From 2e48da96bc83ded6e9939dc4048b009d951d0a6b Mon Sep 17 00:00:00 2001 From: 1zc Date: Fri, 16 Feb 2024 02:05:18 +1100 Subject: [PATCH] Disable pretty style if Steam key isnt configured --- src/DiscordChat.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DiscordChat.cs b/src/DiscordChat.cs index a4f8071..30d32f4 100644 --- a/src/DiscordChat.cs +++ b/src/DiscordChat.cs @@ -64,6 +64,12 @@ public void OnConfigParsed(DiscordChatConfig config) throw new InvalidOperationException("[DISCORDCHAT ERROR] Failed to load configuration >> DiscordWebhook is a required field in the configuration file."); } + if (config.DiscordChatSteamKey == null || config.DiscordChatSteamKey == "") + { + // Steam Key not configured, defaulting to simple style. + config.DiscordChatStyle = 0; + } + // Load config Config = config; }