forked from TeamInklings/Octobot
20 lines
763 B
C#
20 lines
763 B
C#
using Humanizer;
|
|
|
|
namespace Boyfriend.Commands;
|
|
|
|
public sealed class HelpCommand : ICommand {
|
|
public string[] Aliases { get; } = { "help", "помощь", "справка" };
|
|
|
|
public Task RunAsync(CommandProcessor cmd, string[] args, string[] cleanArgs) {
|
|
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;
|
|
}
|
|
}
|