This repository has been archived on 2024-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
OctobotStealth/Boyfriend/Commands/HelpCommand.cs

20 lines
No EOL
747 B
C#

using Humanizer;
namespace Boyfriend.Commands;
public class HelpCommand : Command {
public override string[] Aliases { get; } = { "help", "помощь", "справка" };
public override Task Run(CommandProcessor cmd, string[] args) {
var prefix = Boyfriend.GetGuildConfig(cmd.Context.Guild.Id)["Prefix"];
var toSend = Boyfriend.StringBuilder.Append(Messages.CommandHelp);
foreach (var command in CommandProcessor.Commands)
toSend.Append(
$"\n`{prefix}{command.Aliases[0]}`: {Utils.GetMessage($"CommandDescription{command.Aliases[0].Titleize()}")}");
cmd.Reply(toSend.ToString(), ":page_facing_up: ");
toSend.Clear();
return Task.CompletedTask;
}
}