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

general code refactor and bug fixes

This commit is contained in:
l1ttleO 2022-02-02 18:14:26 +05:00
parent 4d838e5af3
commit 04facc3de2
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
15 changed files with 197 additions and 132 deletions

View file

@ -8,11 +8,11 @@ namespace Boyfriend.Commands;
public class HelpCommand : Command {
public override async Task Run(SocketCommandContext context, string[] args) {
var nl = Environment.NewLine;
var toSend = string.Format(Messages.CommandHelp, nl);
var prefix = Boyfriend.GetGuildConfig(context.Guild).Prefix;
var toSend = string.Format(Messages.CommandHelp, nl);
toSend = CommandHandler.Commands.Aggregate(toSend,
(current, command) => current + $"`{prefix}{command.GetAliases()[0]}`: {command.GetSummary()}{nl}");
await context.Channel.SendMessageAsync(toSend);
}
@ -27,4 +27,4 @@ public class HelpCommand : Command {
public override string GetSummary() {
return "Показывает эту справку";
}
}
}