-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLargeCommandHandler.cs
More file actions
22 lines (19 loc) · 890 Bytes
/
Copy pathLargeCommandHandler.cs
File metadata and controls
22 lines (19 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using RustPlusBot.Abstractions.Events;
using RustPlusBot.Features.Commands.Dispatching;
using RustPlusBot.Features.Commands.Localization;
using RustPlusBot.Features.Events.State;
namespace RustPlusBot.Features.Commands.Handlers;
/// <summary>!large — reports the large oil rig's status.</summary>
/// <param name="rigState">The rig state reader.</param>
/// <param name="localizer">The reply localizer.</param>
internal sealed class LargeCommandHandler(IRigState rigState, ICommandLocalizer localizer) : ICommandHandler
{
/// <inheritdoc />
public string Name => "large";
/// <inheritdoc />
public Task<string?> ExecuteAsync(CommandContext context, CancellationToken cancellationToken)
{
ArgumentNullException.ThrowIfNull(context);
return Task.FromResult<string?>(RigReply.For(rigState, context, RigKind.Large, "command.large", localizer));
}
}