1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 00:19:00 +03:00

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 <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-03-23 21:45:39 +03:00 committed by GitHub
parent e0232f6008
commit ac8621a2ec
Signed by: GitHub
GPG key ID: B5690EEEBB952194
8 changed files with 28 additions and 4 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

@ -241,7 +241,7 @@ public class SettingsCommandGroup : CommandGroup
[DiscordDefaultDMPermission(false)] [DiscordDefaultDMPermission(false)]
[RequireContext(ChannelContext.Guild)] [RequireContext(ChannelContext.Guild)]
[RequireDiscordPermission(DiscordPermission.ManageGuild)] [RequireDiscordPermission(DiscordPermission.ManageGuild)]
[Description("Reset settings for this server")] [Description("Reset settings for this guild")]
[UsedImplicitly] [UsedImplicitly]
public async Task<Result> ExecuteResetSettingsAsync( public async Task<Result> ExecuteResetSettingsAsync(
[Description("Setting to reset")] AllOptionsEnum? setting = null) [Description("Setting to reset")] AllOptionsEnum? setting = null)

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);
}
}
} }
} }