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:
parent
4d838e5af3
commit
04facc3de2
15 changed files with 197 additions and 132 deletions
|
@ -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 "Показывает эту справку";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue