1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-02 20:19:55 +03:00

Add version display

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-03-17 23:38:07 +03:00
parent 62709d927b
commit 847c3211a0
Signed by: mctaylors
GPG key ID: 7181BEBE676903C1
6 changed files with 24 additions and 0 deletions

View file

@ -21,6 +21,10 @@
<ItemGroup>
<PackageReference Include="DiffPlex" Version="1.7.2" />
<PackageReference Include="GitInfo" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Humanizer.Core.ru" Version="2.14.1" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />

View file

@ -657,4 +657,7 @@
<data name="TimeSpanExample" xml:space="preserve">
<value>Example of a valid input: `1h30m`</value>
</data>
<data name="Version" xml:space="preserve">
<value>Version: {0}</value>
</data>
</root>

View file

@ -657,4 +657,7 @@
<data name="TimeSpanExample" xml:space="preserve">
<value>Пример правильного ввода: `1ч30м`</value>
</data>
<data name="Version" xml:space="preserve">
<value>Версия: {0}</value>
</data>
</root>

View file

@ -657,4 +657,7 @@
<data name="TimeSpanExample" xml:space="preserve">
<value>правильно пишут так: `1h30m`</value>
</data>
<data name="Version" xml:space="preserve">
<value>{0}</value>
</data>
</root>

View file

@ -96,11 +96,16 @@ public class AboutCommandGroup : CommandGroup
builder.AppendBulletPointLine($"{tag} — {$"AboutDeveloper@{dev.Username}".Localized()}");
}
var footer = ThisAssembly.Git.IsDirty
? $"{ThisAssembly.Git.Branch}-{ThisAssembly.Git.Commit}-dirty"
: $"{ThisAssembly.Git.Branch}-{ThisAssembly.Git.Commit}";
var embed = new EmbedBuilder()
.WithSmallTitle(string.Format(Messages.AboutBot, bot.Username), bot)
.WithDescription(builder.ToString())
.WithColour(ColorsList.Cyan)
.WithImageUrl("https://i.ibb.co/fS6wZhh/octobot-banner.png")
.WithFooter(string.Format(Messages.Version, footer))
.Build();
var repositoryButton = new ButtonComponent(

View file

@ -1184,5 +1184,11 @@ namespace Octobot {
return ResourceManager.GetString("TimeSpanExample", resourceCulture);
}
}
internal static string Version {
get {
return ResourceManager.GetString("Version", resourceCulture);
}
}
}
}