Skip to content

Commit

Permalink
Pre-Wiki Update (#285)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mctaylors authored Mar 23, 2024
1 parent e0232f6 commit ac8621a
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 4 deletions.
3 changes: 3 additions & 0 deletions locale/Messages.resx
Original file line number Diff line number Diff line change
Expand Up @@ -672,4 +672,7 @@
<data name="ButtonDirty" xml:space="preserve">
<value>Can't report an issue in the development version</value>
</data>
<data name="ButtonOpenWiki" xml:space="preserve">
<value>Open Octobot's Wiki</value>
</data>
</root>
3 changes: 3 additions & 0 deletions locale/Messages.ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -672,4 +672,7 @@
<data name="ButtonDirty" xml:space="preserve">
<value>Нельзя сообщить о проблеме в версии под разработкой</value>
</data>
<data name="ButtonOpenWiki" xml:space="preserve">
<value>Открыть Octobot's Wiki</value>
</data>
</root>
3 changes: 3 additions & 0 deletions locale/Messages.tt-ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -672,4 +672,7 @@
<data name="ButtonDirty" xml:space="preserve">
<value>вот иди сам и почини что сломал</value>
</data>
<data name="ButtonOpenWiki" xml:space="preserve">
<value>вики Octobot (жмак)</value>
</data>
</root>
2 changes: 2 additions & 0 deletions src/BuildInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 8 additions & 1 deletion src/Commands/AboutCommandGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ private async Task<Result> SendAboutBotAsync(IUser bot, Snowflake guildId, Cance
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
Expand All @@ -124,7 +131,7 @@ private async Task<Result> SendAboutBotAsync(IUser bot, Snowflake guildId, Cance
return await _feedback.SendContextualEmbedResultAsync(embed,
new FeedbackMessageOptions(MessageComponents: new[]
{
new ActionRowComponent(new[] { repositoryButton, issuesButton })
new ActionRowComponent(new[] { repositoryButton, wikiButton, issuesButton })
}), ct);
}
}
2 changes: 1 addition & 1 deletion src/Commands/SettingsCommandGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private async Task<Result> EditSettingAsync(
[DiscordDefaultDMPermission(false)]
[RequireContext(ChannelContext.Guild)]
[RequireDiscordPermission(DiscordPermission.ManageGuild)]
[Description("Reset settings for this server")]
[Description("Reset settings for this guild")]
[UsedImplicitly]
public async Task<Result> ExecuteResetSettingsAsync(
[Description("Setting to reset")] AllOptionsEnum? setting = null)
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/ToolsCommandGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private static void AppendMuteInformation(
/// </returns>
[Command("guildinfo")]
[DiscordDefaultDMPermission(false)]
[Description("Shows info current guild")]
[Description("Shows info about current guild")]
[UsedImplicitly]
public async Task<Result> ExecuteGuildInfoAsync()
{
Expand Down Expand Up @@ -514,7 +514,7 @@ private Task<Result> SendTimestampAsync(TimeSpan? offset, IUser executor, Cancel
[UsedImplicitly]
public async Task<Result> 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 _))
{
Expand Down
6 changes: 6 additions & 0 deletions src/Messages.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ac8621a

Please sign in to comment.