about summary refs log tree commit diff
path: root/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-03-15 18:33:49 +0100
committerRory& <root@rory.gay>2025-03-15 18:33:49 +0100
commit36648a023719061a999d8d5f4d2efc43f3dd15a5 (patch)
tree807c91c900a470a0bd61d24b4dda0f1fead163f1 /Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
parentAdd full invite data to invite handler callback (diff)
downloadLibMatrix-36648a023719061a999d8d5f4d2efc43f3dd15a5.tar.xz
Extend invite listener API
Diffstat (limited to 'Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs')
-rw-r--r--Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs2
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; }