From c71dadc46233e2c8eb74b23d5e98dcd4aad567fc Mon Sep 17 00:00:00 2001 From: HEJOK254 <90698026+HEJOK254@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:12:39 +0200 Subject: [PATCH] Fix DeepSource Issue Fix "Exception thrown is generic CS-R1015" since I forgot about it whoops Also remove the invalid return explanation for InitAsync() --- Commands/InteractionServiceHandler.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Commands/InteractionServiceHandler.cs b/Commands/InteractionServiceHandler.cs index dc9afd2..00ae7a2 100644 --- a/Commands/InteractionServiceHandler.cs +++ b/Commands/InteractionServiceHandler.cs @@ -12,7 +12,6 @@ public class InteractionServiceHandler /// /// Initialize the InteractionService /// - /// True if success, false if failure public static async Task InitAsync() { try @@ -36,7 +35,7 @@ public static async Task RegisterModulesAsync() if (_interactionService == null) { await Program.LogAsync("InteractionServiceManager.RegisterModulesAsync()", "InteractionService not initialized yet", LogSeverity.Error); - throw new Exception("InteractionService not initialized while trying to register commands"); + throw new InvalidOperationException("InteractionService not initialized while trying to register commands"); } try