about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Bot/Commands/CreateSystemCommand.cs4
-rw-r--r--Program.cs2
2 files changed, 4 insertions, 2 deletions
diff --git a/Bot/Commands/CreateSystemCommand.cs b/Bot/Commands/CreateSystemCommand.cs
index 0bb3265..160c0e5 100644
--- a/Bot/Commands/CreateSystemCommand.cs
+++ b/Bot/Commands/CreateSystemCommand.cs
@@ -10,7 +10,9 @@ namespace PluralContactBotPoC.Bot.Commands;
 
 public class CreateSystemCommand(IServiceProvider services, HomeserverProviderService hsProvider, HomeserverResolverService hsResolver) : ICommand {
     public string Name { get; } = "createsystem";
+    public string[]? Aliases { get; }
     public string Description { get; } = "Create a new system";
+    public bool Unlisted { get; }
 
     public async Task<bool> CanInvoke(CommandContext ctx) {
         return true;
@@ -54,4 +56,4 @@ public class CreateSystemCommand(IServiceProvider services, HomeserverProviderSe
             await ctx.Reply(MessageFormatter.FormatException("Something went wrong!", e));
         }
     }
-}
+}
\ No newline at end of file
diff --git a/Program.cs b/Program.cs
index f65f2e9..674f91d 100644
--- a/Program.cs
+++ b/Program.cs
@@ -64,7 +64,7 @@ var host = Host.CreateDefaultBuilder(args).ConfigureServices((_, services) => {
     services.AddSingleton<AppServiceConfiguration>();
 
     services.AddRoryLibMatrixServices();
-    services.AddBot(withCommands: true);
+    services.AddMatrixBot().AddCommandHandler().DiscoverAllCommands();
 
     services.AddHostedService<PluralContactBot>();
 }).UseConsoleLifetime().Build();