about summary refs log tree commit diff
path: root/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
diff options
context:
space:
mode:
authorEmma [it/its]@Rory& <root@rory.gay>2023-12-14 07:20:46 +0100
committerEmma [it/its]@Rory& <root@rory.gay>2023-12-14 07:20:46 +0100
commit5affd9f061e75f6575a2fe6715f9e8757cfe87e8 (patch)
tree13ea35ce981094a960746777a16dff8815c45e55 /Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
parentTemp state (diff)
downloadLibMatrix-bak-5affd9f061e75f6575a2fe6715f9e8757cfe87e8.tar.xz
Cleanup
Diffstat (limited to '')
-rw-r--r--Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs b/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs

index 91ec1e8..25a8d92 100644 --- a/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs +++ b/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
@@ -21,8 +21,8 @@ public static class BotCommandInstaller { services.AddSingleton<LibMatrixBotConfiguration>(); services.AddScoped<AuthenticatedHomeserverGeneric>(x => { - var config = x.GetService<LibMatrixBotConfiguration>(); - var hsProvider = x.GetService<HomeserverProviderService>(); + var config = x.GetService<LibMatrixBotConfiguration>() ?? throw new Exception("No configuration found!"); + var hsProvider = x.GetService<HomeserverProviderService>() ?? throw new Exception("No homeserver provider found!"); var hs = hsProvider.GetAuthenticatedWithToken(config.Homeserver, config.AccessToken).Result; return hs;