From 79ff643a2e74d1664a0269581057318af5ef6ac9 Mon Sep 17 00:00:00 2001 From: Daniel-I-Am Date: Tue, 11 Aug 2020 04:12:27 +0200 Subject: [PATCH] Fail-safe the type on the LevelUp:MentionUser tag --- ChaosBot/Discord/Services/ExperienceHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChaosBot/Discord/Services/ExperienceHandler.cs b/ChaosBot/Discord/Services/ExperienceHandler.cs index fb5c763..4e50d81 100644 --- a/ChaosBot/Discord/Services/ExperienceHandler.cs +++ b/ChaosBot/Discord/Services/ExperienceHandler.cs @@ -70,7 +70,7 @@ namespace ChaosBot.Discord.Services ConfigurationRepository.GetValue("LevelUp:Channel", context.Guild.Id, "false"); string mentionString = $"<@{context.User.Id}>"; - if (!ConfigurationRepository.GetValue("LevelUp:MentionUser", context.Guild.Id, true)) + if (!Convert.ToBoolean(ConfigurationRepository.GetValue("LevelUp:MentionUser", context.Guild.Id, "true"))) { mentionString = context.User.Username; if (context.User is IGuildUser guildUser)