mirror of
https://github.com/NoiTheCat/WorldTime.git
synced 2024-10-16 08:29:57 +00:00
Modify some strings
This commit is contained in:
parent
6a115c0ea0
commit
bc76bbb882
2 changed files with 20 additions and 19 deletions
|
@ -7,10 +7,9 @@ using WorldTime.Data;
|
||||||
|
|
||||||
namespace WorldTime.Commands;
|
namespace WorldTime.Commands;
|
||||||
public class CommandsBase : InteractionModuleBase<ShardedInteractionContext> {
|
public class CommandsBase : InteractionModuleBase<ShardedInteractionContext> {
|
||||||
protected const string ErrInvalidZone = ":x: Not a valid zone name."
|
protected const string ErrInvalidZone =
|
||||||
+ " To find your time zone, refer to: <https://kevinnovak.github.io/Time-Zone-Picker/>.";
|
":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: Please try the command again.";
|
protected const string ErrNoUserCache = ":warning: Oops, bot wasn't ready. Please try again in a moment.";
|
||||||
protected const string ErrNotAllowed = ":x: Only server moderators may use this command.";
|
|
||||||
|
|
||||||
private static readonly ReadOnlyDictionary<string, string> _tzNameMap;
|
private static readonly ReadOnlyDictionary<string, string> _tzNameMap;
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,6 @@ using System.Text;
|
||||||
|
|
||||||
namespace WorldTime.Commands;
|
namespace WorldTime.Commands;
|
||||||
public class UserCommands : CommandsBase {
|
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
|
#region Help strings
|
||||||
const string HelpHelp = "Displays a list of available bot commands.";
|
const string HelpHelp = "Displays a list of available bot commands.";
|
||||||
const string HelpList = "Shows the current time for all recently active known users.";
|
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();
|
var uniquetz = db.GetDistinctZoneCount();
|
||||||
await RespondAsync(embed: new EmbedBuilder() {
|
await RespondAsync(embed: new EmbedBuilder() {
|
||||||
Title = "Help & About",
|
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. "
|
+ "This bot is provided for free, without any paywalled 'premium' features. "
|
||||||
+ "If you've found this bot useful, please consider contributing via the "
|
+ "If you've found this bot useful, please consider contributing via the "
|
||||||
+ "bot author's page on Ko-fi: https://ko-fi.com/noithecat.",
|
+ "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(),
|
IconUrl = Context.Client.CurrentUser.GetAvatarUrl(),
|
||||||
Text = "World Time"
|
Text = "World Time"
|
||||||
}
|
}
|
||||||
}.AddField(inline: false, name: "Commands", value: EmbedHelpField1
|
}.AddField(inline: false, name: "Commands", value:
|
||||||
).AddField(inline: false, name: "Admin commands", value: EmbedHelpField2
|
$"""
|
||||||
|
`/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:
|
).AddField(inline: false, name: "Zones", value:
|
||||||
"This bot accepts zone names from the IANA Time Zone Database (a.k.a. Olson Database). " +
|
"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());
|
).Build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue