Modify some strings

This commit is contained in:
Noi 2024-05-09 23:39:10 -07:00
parent 6a115c0ea0
commit bc76bbb882
2 changed files with 20 additions and 19 deletions

View file

@ -7,10 +7,9 @@ using WorldTime.Data;
namespace WorldTime.Commands;
public class CommandsBase : InteractionModuleBase<ShardedInteractionContext> {
protected const string ErrInvalidZone = ":x: Not a valid zone name."
+ " To find your time zone, refer to: <https://kevinnovak.github.io/Time-Zone-Picker/>.";
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 <https://zones.arilyn.cc/>.";
protected const string ErrNoUserCache = ":warning: Oops, bot wasn't ready. Please try again in a moment.";
private static readonly ReadOnlyDictionary<string, string> _tzNameMap;

View file

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