Add time format example to the description of commands that use TimeSpan. (#267)

This PR was made to help users who are trying /remind for the first time
by showing an example of the correct time format in the description.

---------

Signed-off-by: Macintxsh <95250141+mctaylors@users.noreply.github.com>
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-03-17 16:46:53 +03:00 committed by GitHub
parent 8eed295fcd
commit 62709d927b
Signed by: GitHub
GPG key ID: B5690EEEBB952194
8 changed files with 24 additions and 3 deletions

View file

@ -120,7 +120,7 @@ public class RemindCommandGroup : CommandGroup
[RequireContext(ChannelContext.Guild)]
[UsedImplicitly]
public async Task<Result> ExecuteReminderAsync(
[Description("After what period of time mention the reminder")]
[Description("After what period of time mention the reminder (e.g. 1h30m)")]
[Option("in")]
string timeSpanString,
[Description("Reminder text")] [MaxLength(512)]
@ -151,6 +151,7 @@ public class RemindCommandGroup : CommandGroup
{
var failedEmbed = new EmbedBuilder()
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
.WithDescription(Messages.TimeSpanExample)
.WithColour(ColorsList.Red)
.Build();
@ -264,6 +265,7 @@ public class RemindCommandGroup : CommandGroup
{
var failedEmbed = new EmbedBuilder()
.WithSmallTitle(Messages.InvalidTimeSpan, bot)
.WithDescription(Messages.TimeSpanExample)
.WithColour(ColorsList.Red)
.Build();