From ac8621a2ec8e54c96fa04020756914c11132caa7 Mon Sep 17 00:00:00 2001 From: Macintxsh <95250141+mctaylors@users.noreply.github.com> Date: Sat, 23 Mar 2024 21:45:39 +0300 Subject: [PATCH] Pre-Wiki Update (#285) This PR has been opened to finally update Octobot's Wiki. Current changes summary: - correct minor spelling issues in some command descriptions - /about: add Octobot's Wiki button --------- Signed-off-by: mctaylors --- locale/Messages.resx | 3 +++ locale/Messages.ru.resx | 3 +++ locale/Messages.tt-ru.resx | 3 +++ src/BuildInfo.cs | 2 ++ src/Commands/AboutCommandGroup.cs | 9 ++++++++- src/Commands/SettingsCommandGroup.cs | 2 +- src/Commands/ToolsCommandGroup.cs | 4 ++-- src/Messages.Designer.cs | 6 ++++++ 8 files changed, 28 insertions(+), 4 deletions(-) diff --git a/locale/Messages.resx b/locale/Messages.resx index f7500b6..41bb6ef 100644 --- a/locale/Messages.resx +++ b/locale/Messages.resx @@ -672,4 +672,7 @@ Can't report an issue in the development version + + Open Octobot's Wiki + diff --git a/locale/Messages.ru.resx b/locale/Messages.ru.resx index e28b405..273338b 100644 --- a/locale/Messages.ru.resx +++ b/locale/Messages.ru.resx @@ -672,4 +672,7 @@ Нельзя сообщить о проблеме в версии под разработкой + + Открыть Octobot's Wiki + diff --git a/locale/Messages.tt-ru.resx b/locale/Messages.tt-ru.resx index 58e1178..af2c94d 100644 --- a/locale/Messages.tt-ru.resx +++ b/locale/Messages.tt-ru.resx @@ -672,4 +672,7 @@ вот иди сам и почини что сломал + + вики Octobot (жмак) + diff --git a/src/BuildInfo.cs b/src/BuildInfo.cs index 369feff..fc3a089 100644 --- a/src/BuildInfo.cs +++ b/src/BuildInfo.cs @@ -6,6 +6,8 @@ public static class BuildInfo public static string IssuesUrl => $"{RepositoryUrl}/issues"; + public static string WikiUrl => $"{RepositoryUrl}/wiki"; + private static string Commit => ThisAssembly.Git.Commit; private static string Branch => ThisAssembly.Git.Branch; diff --git a/src/Commands/AboutCommandGroup.cs b/src/Commands/AboutCommandGroup.cs index b37b2f0..027e7f8 100644 --- a/src/Commands/AboutCommandGroup.cs +++ b/src/Commands/AboutCommandGroup.cs @@ -111,6 +111,13 @@ public class AboutCommandGroup : CommandGroup URL: BuildInfo.RepositoryUrl ); + var wikiButton = new ButtonComponent( + ButtonComponentStyle.Link, + Messages.ButtonOpenWiki, + new PartialEmoji(Name: "📖"), + URL: BuildInfo.WikiUrl + ); + var issuesButton = new ButtonComponent( ButtonComponentStyle.Link, BuildInfo.IsDirty @@ -124,7 +131,7 @@ public class AboutCommandGroup : CommandGroup return await _feedback.SendContextualEmbedResultAsync(embed, new FeedbackMessageOptions(MessageComponents: new[] { - new ActionRowComponent(new[] { repositoryButton, issuesButton }) + new ActionRowComponent(new[] { repositoryButton, wikiButton, issuesButton }) }), ct); } } diff --git a/src/Commands/SettingsCommandGroup.cs b/src/Commands/SettingsCommandGroup.cs index 30150ee..f756e93 100644 --- a/src/Commands/SettingsCommandGroup.cs +++ b/src/Commands/SettingsCommandGroup.cs @@ -241,7 +241,7 @@ public class SettingsCommandGroup : CommandGroup [DiscordDefaultDMPermission(false)] [RequireContext(ChannelContext.Guild)] [RequireDiscordPermission(DiscordPermission.ManageGuild)] - [Description("Reset settings for this server")] + [Description("Reset settings for this guild")] [UsedImplicitly] public async Task ExecuteResetSettingsAsync( [Description("Setting to reset")] AllOptionsEnum? setting = null) diff --git a/src/Commands/ToolsCommandGroup.cs b/src/Commands/ToolsCommandGroup.cs index cc3c2cf..d4f3f75 100644 --- a/src/Commands/ToolsCommandGroup.cs +++ b/src/Commands/ToolsCommandGroup.cs @@ -262,7 +262,7 @@ public class ToolsCommandGroup : CommandGroup /// [Command("guildinfo")] [DiscordDefaultDMPermission(false)] - [Description("Shows info current guild")] + [Description("Shows info about current guild")] [UsedImplicitly] public async Task ExecuteGuildInfoAsync() { @@ -514,7 +514,7 @@ public class ToolsCommandGroup : CommandGroup [UsedImplicitly] public async Task ExecuteEightBallAsync( // 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 _)) { diff --git a/src/Messages.Designer.cs b/src/Messages.Designer.cs index 3d452a6..2910bae 100644 --- a/src/Messages.Designer.cs +++ b/src/Messages.Designer.cs @@ -1210,5 +1210,11 @@ namespace Octobot { return ResourceManager.GetString("ButtonDirty", resourceCulture); } } + + internal static string ButtonOpenWiki { + get { + return ResourceManager.GetString("ButtonOpenWiki", resourceCulture); + } + } } }