Skip to content

Commit bfe8b6c

Browse files
committed
feat(2a): register Events feature + MarkerPollInterval option in the host
1 parent eb45027 commit bfe8b6c

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/RustPlusBot.Host/Program.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using RustPlusBot.Features.Chat;
1010
using RustPlusBot.Features.Commands;
1111
using RustPlusBot.Features.Connections;
12+
using RustPlusBot.Features.Events;
1213
using RustPlusBot.Features.Pairing;
1314
using RustPlusBot.Features.Workspace;
1415
using RustPlusBot.Host.Credentials;
@@ -50,6 +51,7 @@
5051
.Validate(static o => o.HeartbeatTimeout > TimeSpan.Zero, "Connections:HeartbeatTimeout must be positive.")
5152
.Validate(static o => o.HeartbeatTimeout < o.HeartbeatInterval,
5253
"Connections:HeartbeatTimeout must be less than HeartbeatInterval.")
54+
.Validate(static o => o.MarkerPollInterval > TimeSpan.Zero, "Connections:MarkerPollInterval must be positive.")
5355
.ValidateOnStart();
5456
builder.Services.AddConnections();
5557
builder.Services.AddChat();
@@ -58,6 +60,7 @@
5860
.Validate(static o => o.Cooldown > TimeSpan.Zero, "Commands:Cooldown must be positive.")
5961
.ValidateOnStart();
6062
builder.Services.AddCommands();
63+
builder.Services.AddEvents();
6164

6265
var host = builder.Build();
6366

src/RustPlusBot.Host/RustPlusBot.Host.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
<ProjectReference Include="..\RustPlusBot.Features.Connections\RustPlusBot.Features.Connections.csproj" />
2424
<ProjectReference Include="..\RustPlusBot.Features.Chat\RustPlusBot.Features.Chat.csproj" />
2525
<ProjectReference Include="..\RustPlusBot.Features.Commands\RustPlusBot.Features.Commands.csproj" />
26+
<ProjectReference Include="..\RustPlusBot.Features.Events\RustPlusBot.Features.Events.csproj" />
2627
</ItemGroup>
2728
</Project>

0 commit comments

Comments
 (0)