From 36648a023719061a999d8d5f4d2efc43f3dd15a5 Mon Sep 17 00:00:00 2001 From: Rory& Date: Sat, 15 Mar 2025 18:33:49 +0100 Subject: Extend invite listener API --- Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs') 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 inviteHandler) { services.AddSingleton(inviteHandler); services.AddHostedService(); + services.AddSingleton(); return this; } @@ -79,6 +80,7 @@ public class BotInstaller(IServiceCollection services) { services.AddSingleton(); services.AddSingleton>(sp => sp.GetRequiredService().HandleInviteAsync); services.AddHostedService(); + services.AddSingleton(); return this; } -- cgit 1.5.1