1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-20 00:43:36 +03:00

generic commit name

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-03-23 20:25:25 +03:00
parent e0232f6008
commit a50a35c9f5
Signed by: mctaylors
GPG key ID: 7181BEBE676903C1
7 changed files with 27 additions and 3 deletions

View file

@ -672,4 +672,7 @@
<data name="ButtonDirty" xml:space="preserve"> <data name="ButtonDirty" xml:space="preserve">
<value>Can't report an issue in the development version</value> <value>Can't report an issue in the development version</value>
</data> </data>
<data name="ButtonOpenWiki" xml:space="preserve">
<value>Open Octobot's Wiki</value>
</data>
</root> </root>

View file

@ -672,4 +672,7 @@
<data name="ButtonDirty" xml:space="preserve"> <data name="ButtonDirty" xml:space="preserve">
<value>Нельзя сообщить о проблеме в версии под разработкой</value> <value>Нельзя сообщить о проблеме в версии под разработкой</value>
</data> </data>
<data name="ButtonOpenWiki" xml:space="preserve">
<value>Открыть Octobot's Wiki</value>
</data>
</root> </root>

View file

@ -672,4 +672,7 @@
<data name="ButtonDirty" xml:space="preserve"> <data name="ButtonDirty" xml:space="preserve">
<value>вот иди сам и почини что сломал</value> <value>вот иди сам и почини что сломал</value>
</data> </data>
<data name="ButtonOpenWiki" xml:space="preserve">
<value>вики Octobot (жмак)</value>
</data>
</root> </root>

View file

@ -6,6 +6,8 @@ public static class BuildInfo
public static string IssuesUrl => $"{RepositoryUrl}/issues"; public static string IssuesUrl => $"{RepositoryUrl}/issues";
public static string WikiUrl => $"{RepositoryUrl}/wiki";
private static string Commit => ThisAssembly.Git.Commit; private static string Commit => ThisAssembly.Git.Commit;
private static string Branch => ThisAssembly.Git.Branch; private static string Branch => ThisAssembly.Git.Branch;

View file

@ -111,6 +111,13 @@ public class AboutCommandGroup : CommandGroup
URL: BuildInfo.RepositoryUrl URL: BuildInfo.RepositoryUrl
); );
var wikiButton = new ButtonComponent(
ButtonComponentStyle.Link,
Messages.ButtonOpenWiki,
new PartialEmoji(Name: "📖"),
URL: BuildInfo.WikiUrl
);
var issuesButton = new ButtonComponent( var issuesButton = new ButtonComponent(
ButtonComponentStyle.Link, ButtonComponentStyle.Link,
BuildInfo.IsDirty BuildInfo.IsDirty
@ -124,7 +131,7 @@ public class AboutCommandGroup : CommandGroup
return await _feedback.SendContextualEmbedResultAsync(embed, return await _feedback.SendContextualEmbedResultAsync(embed,
new FeedbackMessageOptions(MessageComponents: new[] new FeedbackMessageOptions(MessageComponents: new[]
{ {
new ActionRowComponent(new[] { repositoryButton, issuesButton }) new ActionRowComponent(new[] { repositoryButton, wikiButton, issuesButton })
}), ct); }), ct);
} }
} }

View file

@ -262,7 +262,7 @@ public class ToolsCommandGroup : CommandGroup
/// </returns> /// </returns>
[Command("guildinfo")] [Command("guildinfo")]
[DiscordDefaultDMPermission(false)] [DiscordDefaultDMPermission(false)]
[Description("Shows info current guild")] [Description("Shows info about current guild")]
[UsedImplicitly] [UsedImplicitly]
public async Task<Result> ExecuteGuildInfoAsync() public async Task<Result> ExecuteGuildInfoAsync()
{ {
@ -514,7 +514,7 @@ public class ToolsCommandGroup : CommandGroup
[UsedImplicitly] [UsedImplicitly]
public async Task<Result> ExecuteEightBallAsync( public async Task<Result> ExecuteEightBallAsync(
// let the user think he's actually asking the ball a question // let the user think he's actually asking the ball a question
string question) [Description("Question to ask")] string question)
{ {
if (!_context.TryGetContextIDs(out var guildId, out _, out _)) if (!_context.TryGetContextIDs(out var guildId, out _, out _))
{ {

View file

@ -1210,5 +1210,11 @@ namespace Octobot {
return ResourceManager.GetString("ButtonDirty", resourceCulture); return ResourceManager.GetString("ButtonDirty", resourceCulture);
} }
} }
internal static string ButtonOpenWiki {
get {
return ResourceManager.GetString("ButtonOpenWiki", resourceCulture);
}
}
} }
} }