diff --git a/NadekoBot/Classes/NadekoStats.cs b/NadekoBot/Classes/NadekoStats.cs index 66ef0984..36fe55bd 100644 --- a/NadekoBot/Classes/NadekoStats.cs +++ b/NadekoBot/Classes/NadekoStats.cs @@ -14,7 +14,7 @@ using System.Timers; namespace NadekoBot { - public class NadekoStats + public class NadekoStats : IDisposable { public static NadekoStats Instance { get; } = new NadekoStats(); @@ -231,5 +231,20 @@ namespace NadekoBot } }).ConfigureAwait(false); } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + private void Dispose(bool disposing) + { + if (disposing) + { + carbonClient.Dispose(); + } + + } } } \ No newline at end of file diff --git a/NadekoBot/Modules/Searches/Commands/EvalCommand.cs b/NadekoBot/Modules/Searches/Commands/EvalCommand.cs index 57f45342..fdb2f1c1 100644 --- a/NadekoBot/Modules/Searches/Commands/EvalCommand.cs +++ b/NadekoBot/Modules/Searches/Commands/EvalCommand.cs @@ -49,11 +49,11 @@ namespace NadekoBot.Modules.Searches.Commands string result = parser.Parse(expression).ToString(); return result; } - catch (OverflowException e) + catch (OverflowException) { return $"Overflow error on {expression}"; } - catch (FormatException e) + catch (FormatException) { return $"\"{expression}\" was not formatted correctly"; }