24 lines
679 B
C#
24 lines
679 B
C#
using SkyBot.Helpers;
|
|
using SkyBot.Models;
|
|
|
|
namespace SkyBot.Commands
|
|
{
|
|
public class Cancel : ICommand
|
|
{
|
|
public string Name => "cancel";
|
|
public string[] Aliases => [];
|
|
public string Description => "Cancels a pending action.";
|
|
public string Category => "Utils";
|
|
public string Usage => "cancel";
|
|
public string[] SubCommands => [];
|
|
|
|
public async Task Execute(CommandContext ctx)
|
|
{
|
|
foreach (var handler in PendingActionRegistry.CancelHandlers)
|
|
if (await handler(ctx)) return;
|
|
|
|
await MessageHelper.ReplyAsync(ctx, "You have nothing pending to cancel.");
|
|
}
|
|
}
|
|
}
|