1 files changed, 2 insertions, 0 deletions
diff --git a/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs b/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
index 0d755a1..f7ef317 100644
--- a/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
+++ b/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
@@ -72,6 +72,7 @@ public class BotInstaller(IServiceCollection services) {
public BotInstaller WithInviteHandler(Func<InviteHandlerHostedService.InviteEventArgs, Task> inviteHandler) {
services.AddSingleton(inviteHandler);
services.AddHostedService<InviteHandlerHostedService>();
+ services.AddSingleton<InviteHandlerHostedService.InviteListenerSyncConfiguration>();
return this;
}
@@ -79,6 +80,7 @@ public class BotInstaller(IServiceCollection services) {
services.AddSingleton<T>();
services.AddSingleton<Func<InviteHandlerHostedService.InviteEventArgs, Task>>(sp => sp.GetRequiredService<T>().HandleInviteAsync);
services.AddHostedService<InviteHandlerHostedService>();
+ services.AddSingleton<InviteHandlerHostedService.InviteListenerSyncConfiguration>();
return this;
}
|