Usages and descriptions now show correct prefixes if they have been changed
This commit is contained in:
parent
ac45df0c2a
commit
dab26cf3c5
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user