Skip to content

Commit

Permalink
Fix CS8601
Browse files Browse the repository at this point in the history
  • Loading branch information
HEJOK254 committed Jun 16, 2024
1 parent 5dc84ed commit 58a6d5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Commands/InteractionServiceHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace QuickEdit.Commands;
public class InteractionServiceHandler
{
private static readonly DiscordSocketClient _client = Program.client;
private static readonly DiscordSocketClient? _client = Program.client;
private static InteractionService? _interactionService;
private static readonly InteractionServiceConfig _interactionServiceConfig = new() { UseCompiledLambda = true, DefaultRunMode = RunMode.Async };

Expand All @@ -17,7 +17,7 @@ public static async Task InitAsync()
{
try
{
_interactionService = new InteractionService(_client.Rest, _interactionServiceConfig);
_interactionService = new InteractionService(_client!.Rest, _interactionServiceConfig);
await RegisterModulesAsync();
}
catch
Expand Down Expand Up @@ -48,7 +48,7 @@ public static async Task RegisterModulesAsync()
}

await _interactionService.RegisterCommandsGloballyAsync();
_client.InteractionCreated += OnInteractionCreatedAsync;
_client!.InteractionCreated += OnInteractionCreatedAsync;
await Program.LogAsync("InteractionServiceManager", "Modules registered successfully", LogSeverity.Info);
}
catch (Exception e)
Expand Down

0 comments on commit 58a6d5f

Please sign in to comment.