diff --git a/DeukBot4/Database/ServerSettings/ServerSetting.cs b/DeukBot4/Database/ServerSettings/ServerSetting.cs index 6bd655a..82a2d6b 100644 --- a/DeukBot4/Database/ServerSettings/ServerSetting.cs +++ b/DeukBot4/Database/ServerSettings/ServerSetting.cs @@ -13,10 +13,11 @@ namespace DeukBot4.Database.ServerSettings } public ulong ServerId { get; } - public ulong MutedRoleId { get; } + public ulong MutedRoleId { get; private set; } public async Task SetMutedRoleId(ulong id) { + MutedRoleId = id; using (var conn = new DatabaseConnection()) { using (var cmd = new NpgsqlCommand()) diff --git a/DeukBot4/Utilities/StringExtensions.cs b/DeukBot4/Utilities/StringExtensions.cs index f746e40..581227b 100644 --- a/DeukBot4/Utilities/StringExtensions.cs +++ b/DeukBot4/Utilities/StringExtensions.cs @@ -7,7 +7,7 @@ namespace DeukBot4.Utilities public static string RemoveSpecialCharacters(this string str) { StringBuilder sb = new StringBuilder(); foreach (char c in str) { - if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) { + if (char.IsLetterOrDigit(c) || char.IsWhiteSpace(c)) { sb.Append(c); } }