about summary refs log tree commit diff
path: root/MatrixAntiDmSpam/Program.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-03-15 13:23:42 +0100
committerRory& <root@rory.gay>2025-03-15 13:27:49 +0100
commit3d1cfde726e8b8d4f3a820cdf5fb136c2f6bea33 (patch)
treed03e21fbf68110cfe60d04a7f7a88b6a52defddd /MatrixAntiDmSpam/Program.cs
downloadMatrixAntiDmSpam-3d1cfde726e8b8d4f3a820cdf5fb136c2f6bea33.tar.xz
Initial commit
Diffstat (limited to 'MatrixAntiDmSpam/Program.cs')
-rw-r--r--MatrixAntiDmSpam/Program.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/MatrixAntiDmSpam/Program.cs b/MatrixAntiDmSpam/Program.cs
new file mode 100644

index 0000000..cbf1dc9 --- /dev/null +++ b/MatrixAntiDmSpam/Program.cs
@@ -0,0 +1,16 @@ +using System.ComponentModel; +using LibMatrix.Services; +using LibMatrix.Utilities.Bot; +using MatrixAntiDmSpam; + +var builder = Host.CreateApplicationBuilder(args); + +builder.Services.AddSingleton<AntiDmSpamConfiguration>(); +builder.Services.AddRoryLibMatrixServices() + .AddMatrixBot() + .WithInviteHandler<InviteHandler>(); + +builder.Services.AddHostedService<PolicyListFetcher>(); + +var host = builder.Build(); +host.Run(); \ No newline at end of file