diff --git a/samples/RoleManager/Pipelines/PerformancePipeline.cs b/samples/RoleManager/Pipelines/PerformancePipeline.cs index b731ecb9..2657cb0b 100644 --- a/samples/RoleManager/Pipelines/PerformancePipeline.cs +++ b/samples/RoleManager/Pipelines/PerformancePipeline.cs @@ -36,7 +36,7 @@ public async Task> HandleAsync(ISlashCommand sw.Stop(); - _logger.Log(sw.ElapsedMilliseconds > 500 ? LogLevel.Warning : LogLevel.Information, "Command {Name} ran for {Time}ms.", context.MethodName, sw.ElapsedMilliseconds.ToString()); + _logger.Log(sw.ElapsedMilliseconds > 500 ? LogLevel.Warning : LogLevel.Information, "Command {Name} ran for {Time}ms", context.MethodName, sw.ElapsedMilliseconds.ToString()); return result; } } diff --git a/src/Color-Chan.Discord.Commands/Services/Implementations/ComponentService.cs b/src/Color-Chan.Discord.Commands/Services/Implementations/ComponentService.cs index 4ca1b714..66e80ba9 100644 --- a/src/Color-Chan.Discord.Commands/Services/Implementations/ComponentService.cs +++ b/src/Color-Chan.Discord.Commands/Services/Implementations/ComponentService.cs @@ -112,6 +112,7 @@ public async Task> ExecuteComponentInteracti if (componentInfo.ComponentMethod.Invoke(instance, null) is not Task> task) { var errorMessage = $"Failed to cast {componentInfo.ComponentMethod.Name} to Task>"; + // ReSharper disable once TemplateIsNotCompileTimeConstantProblem _logger.LogWarning(errorMessage); return Result.FromError(default, new ErrorResult(errorMessage)); }