From 431111cb3ff4e6053128def74614289be88525fd Mon Sep 17 00:00:00 2001 From: Macintosh II Date: Tue, 3 Oct 2023 15:03:40 +0300 Subject: [PATCH] Resolve conversations pt.2 Signed-off-by: Macintosh II --- src/Commands/ToolsCommandGroup.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Commands/ToolsCommandGroup.cs b/src/Commands/ToolsCommandGroup.cs index 22a9306..6abb918 100644 --- a/src/Commands/ToolsCommandGroup.cs +++ b/src/Commands/ToolsCommandGroup.cs @@ -290,6 +290,17 @@ public class ToolsCommandGroup : CommandGroup return await _feedback.SendContextualEmbedResultAsync(embed, ct); } + private static readonly TimestampStyle[] AllStyles = + { + TimestampStyle.ShortDate, + TimestampStyle.LongDate, + TimestampStyle.ShortTime, + TimestampStyle.LongTime, + TimestampStyle.ShortDateTime, + TimestampStyle.LongDateTime, + TimestampStyle.RelativeTime + }; + /// /// A slash command that shows the current timestamp with an optional offset in all styles supported by Discord. /// @@ -302,7 +313,7 @@ public class ToolsCommandGroup : CommandGroup [Description("Shows a timestamp in all styles")] [UsedImplicitly] public async Task ExecuteTimestampAsync( - [Description("Add an offset from now")] + [Description("Offset from current time")] TimeSpan? offset = null) { if (!_context.TryGetContextIDs(out var guildId, out _, out var userId)) @@ -322,17 +333,6 @@ public class ToolsCommandGroup : CommandGroup return await SendTimestampAsync(offset, user, CancellationToken); } - private static readonly TimestampStyle[] AllStyles = - { - TimestampStyle.ShortDate, - TimestampStyle.LongDate, - TimestampStyle.ShortTime, - TimestampStyle.LongTime, - TimestampStyle.ShortDateTime, - TimestampStyle.LongDateTime, - TimestampStyle.RelativeTime - }; - private async Task SendTimestampAsync(TimeSpan? offset, IUser user, CancellationToken ct) { var timestamp = DateTimeOffset.UtcNow.Add(offset ?? TimeSpan.Zero).ToUnixTimeSeconds();