1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-01 03:29:54 +03:00

Rename solution & project, move the project files one layer up

This commit is contained in:
Octol1ttle 2023-01-18 20:17:33 +05:00
parent b486d2d3d9
commit c220a0f379
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
27 changed files with 52 additions and 76 deletions

21
Commands/HelpCommand.cs Normal file
View file

@ -0,0 +1,21 @@
using Boyfriend.Data;
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 = GuildData.Get(cmd.Context.Guild).Preferences["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(), ReplyEmojis.Help);
toSend.Clear();
return Task.CompletedTask;
}
}