blob: e3eb037344ad6d264f8e8b443487e0c2ea0b1bec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
using LibMatrix.Extensions;
using LibMatrix.Services;
using LibMatrix.Utilities.Bot;
using MatrixAntiDmSpam;
var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddSingleton<AntiDmSpamConfiguration>();
builder.Services.AddRoryLibMatrixServices()
.AddMatrixBot()
.WithInviteHandler<RoomInviteHandler>();
builder.Services.AddHostedService<PolicyListFetcher>();
builder.Services.AddHostedService<PolicyExecutor>();
builder.Services.AddSingleton<PolicyStore>();
MatrixHttpClient.LogRequests = false;
var host = builder.Build();
host.Run();
|