From bc76bbb8829f7753a2bf28b7de24aba44c0ea144 Mon Sep 17 00:00:00 2001 From: Noi Date: Thu, 9 May 2024 23:39:10 -0700 Subject: [PATCH] Modify some strings --- Commands/CommandsBase.cs | 7 +++---- Commands/UserCommands.cs | 32 +++++++++++++++++--------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Commands/CommandsBase.cs b/Commands/CommandsBase.cs index a80b3e9..7511bf8 100644 --- a/Commands/CommandsBase.cs +++ b/Commands/CommandsBase.cs @@ -7,10 +7,9 @@ using WorldTime.Data; namespace WorldTime.Commands; public class CommandsBase : InteractionModuleBase { - protected const string ErrInvalidZone = ":x: Not a valid zone name." - + " To find your time zone, refer to: ."; - protected const string ErrNoUserCache = ":warning: Please try the command again."; - protected const string ErrNotAllowed = ":x: Only server moderators may use this command."; + protected const string ErrInvalidZone = + ":x: Not a valid zone name. To find your zone, you may refer to a site such as ."; + protected const string ErrNoUserCache = ":warning: Oops, bot wasn't ready. Please try again in a moment."; private static readonly ReadOnlyDictionary _tzNameMap; diff --git a/Commands/UserCommands.cs b/Commands/UserCommands.cs index 76a370c..cdac27c 100644 --- a/Commands/UserCommands.cs +++ b/Commands/UserCommands.cs @@ -3,17 +3,6 @@ using System.Text; namespace WorldTime.Commands; public class UserCommands : CommandsBase { - const string EmbedHelpField1 = - $"`/help` - {HelpHelp}\n" - + $"`/list` - {HelpList}\n" - + $"`/set` - {HelpSet}\n" - + $"`/remove` - {HelpRemove}"; - const string EmbedHelpField2 = - $"`/config use-12hour` - {ConfigCommands.HelpUse12}\n" - + $"`/config private-confirms` - {ConfigCommands.HelpPrivateConfirms}\n" - + $"`/set-for` - {ConfigCommands.HelpSetFor}\n" - + $"`/remove-for` - {ConfigCommands.HelpRemoveFor}"; - #region Help strings const string HelpHelp = "Displays a list of available bot commands."; const string HelpList = "Shows the current time for all recently active known users."; @@ -31,7 +20,8 @@ public class UserCommands : CommandsBase { var uniquetz = db.GetDistinctZoneCount(); await RespondAsync(embed: new EmbedBuilder() { Title = "Help & About", - Description = $"World Time v{version} - Serving {guildct} communities across {uniquetz} time zones.\n\n" + Description = + $"World Time v{version} - Serving {guildct} communities across {uniquetz} time zones.\n\n" + "This bot is provided for free, without any paywalled 'premium' features. " + "If you've found this bot useful, please consider contributing via the " + "bot author's page on Ko-fi: https://ko-fi.com/noithecat.", @@ -39,11 +29,23 @@ public class UserCommands : CommandsBase { IconUrl = Context.Client.CurrentUser.GetAvatarUrl(), Text = "World Time" } - }.AddField(inline: false, name: "Commands", value: EmbedHelpField1 - ).AddField(inline: false, name: "Admin commands", value: EmbedHelpField2 + }.AddField(inline: false, name: "Commands", value: + $""" + `/help` - {HelpHelp} + `/list` - {HelpList} + `/set` - {HelpSet} + `/remove` - {HelpRemove} + """ + ).AddField(inline: false, name: "Admin commands", value: + $""" + `/config use-12hour` - {ConfigCommands.HelpUse12} + `/config private-confirms` - {ConfigCommands.HelpPrivateConfirms} + `/set-for` - {ConfigCommands.HelpSetFor} + `/remove-for` - {ConfigCommands.HelpRemoveFor} + """ ).AddField(inline: false, name: "Zones", value: "This bot accepts zone names from the IANA Time Zone Database (a.k.a. Olson Database). " + - "A useful tool to determine yours can be found at: https://kevinnovak.github.io/Time-Zone-Picker/" + "A useful tool to determine yours can be found at: https://zones.arilyn.cc/" ).Build()); }