From dab26cf3c564ca3f444d0158f1323906b60e9359 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Wed, 19 Oct 2016 16:34:04 +0200 Subject: [PATCH] Usages and descriptions now show correct prefixes if they have been changed --- src/NadekoBot/Modules/Help/Help.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NadekoBot/Modules/Help/Help.cs b/src/NadekoBot/Modules/Help/Help.cs index d7ad1965..e868f82b 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/src/NadekoBot/Modules/Help/Help.cs @@ -98,10 +98,10 @@ namespace NadekoBot.Modules.Help var str = $"**__Help for:__ `{com.Text}`**"; var alias = com.Aliases.Skip(1).FirstOrDefault(); if (alias != null) - str += $" / `{ alias }`"; + str += $" / `{alias}`"; if (com != null) - await channel.SendMessageAsync(str + $@"{Environment.NewLine}**Desc:** {com.Summary} {GetCommandRequirements(com)} -**Usage:** {com.Remarks}").ConfigureAwait(false); + await channel.SendMessageAsync(str + $@"{Environment.NewLine}**Desc:** {string.Format(com.Summary, com.Module.Prefix)} {GetCommandRequirements(com)} +**Usage:** {string.Format(com.Remarks, com.Module.Prefix)}").ConfigureAwait(false); } private string GetCommandRequirements(Command cmd) @@ -136,7 +136,7 @@ namespace NadekoBot.Modules.Help helpstr.AppendLine("----------------|--------------|-------"); lastModule = com.Module.Name; } - helpstr.AppendLine($"`{com.Text}` {string.Join(" ", com.Aliases.Skip(1).Select(a=>"`"+a+"`"))} | {com.Summary} {GetCommandRequirements(com)} | {com.Remarks}"); + helpstr.AppendLine($"`{com.Text}` {string.Join(" ", com.Aliases.Skip(1).Select(a=>"`"+a+"`"))} | {string.Format(com.Summary, com.Module.Prefix)} {GetCommandRequirements(com)} | {string.Format(com.Remarks, com.Module.Prefix)}"); } helpstr = helpstr.Replace(NadekoBot.Client.GetCurrentUser().Username , "@BotName"); File.WriteAllText("../../docs/Commands List.md", helpstr.ToString());