Moved _strings, added some extension methods
This commit is contained in:
1 parent
13dea118a9
commit
8408a17450
21 files changed
+9
-3
No files matched your search
@@ -93,8 +93,8 @@ namespace NadekoBot.Modules.Help
|
||||
if (alias != null)
|
||||
str += string.Format(" **/ `{0}`**", alias);
|
||||
var embed = new EmbedBuilder()
|
||||
.AddField(fb => fb.WithName(str).WithValue($"{string.Format(com.Summary, com.Module.Aliases.First())} {GetCommandRequirements(com)}").WithIsInline(true))
|
||||
.AddField(fb => fb.WithName(GetText("usage")).WithValue(string.Format(com.Remarks, com.Module.Aliases.First())).WithIsInline(false))
|
||||
.AddField(fb => fb.WithName(str).WithValue($"{com.RealSummary()} {GetCommandRequirements(com)}").WithIsInline(true))
|
||||
.AddField(fb => fb.WithName(GetText("usage")).WithValue(com.RealRemarks()).WithIsInline(false))
|
||||
.WithColor(NadekoBot.OkColor);
|
||||
await channel.EmbedAsync(embed).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
<None Update="data\**\*">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="_strings\**">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="data\musicdata\**\*">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace NadekoBot.Services
|
||||
{
|
||||
public class NadekoStrings
|
||||
{
|
||||
public const string stringsPath = @"data/strings/";
|
||||
public const string stringsPath = @"_strings/";
|
||||
|
||||
private readonly ImmutableDictionary<string, ImmutableDictionary<string, string>> responseStrings;
|
||||
private readonly Logger _log;
|
||||
|
||||
@@ -27,6 +27,9 @@ namespace NadekoBot.Extensions
|
||||
return Convert.ToBase64String(plainTextBytes);
|
||||
}
|
||||
|
||||
public static string RealSummary(this CommandInfo cmd) => string.Format(cmd.Summary, cmd.Module.GetTopLevelModule().Prefix);
|
||||
public static string RealRemarks(this CommandInfo cmd) => string.Format(cmd.Remarks, cmd.Module.GetTopLevelModule().Prefix);
|
||||
|
||||
public static Stream ToStream(this IEnumerable<byte> bytes, bool canWrite = false)
|
||||
{
|
||||
var ms = new MemoryStream(bytes as byte[] ?? bytes.ToArray(), canWrite);
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user