1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 17:19:00 +03:00
Octobot/Boyfriend/Commands/HelpCommand.cs

20 lines
747 B
C#
Raw Normal View History

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