From ccb450e54381f0bfb72fc6b1b4a244d68b4dd230 Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Wed, 24 Feb 2021 00:03:12 -0900 Subject: [PATCH] Add view command and update utils --- internal/exts/requests/requests.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/exts/requests/requests.go b/internal/exts/requests/requests.go index 35a7f76..cf94665 100644 --- a/internal/exts/requests/requests.go +++ b/internal/exts/requests/requests.go @@ -328,7 +328,7 @@ func commentCommandFunc(ctx disgoman.Context, args []string) { request.ID, discord_utils.GetDisplayName(ctx, request.Author.ID), request.Content, - request.RequestedAt.Format("2006-01-02 15:04:05 MST"), + request.RequestedAt.Format("2006-01-02 15:04:05"), discord_utils.GetChannelName(ctx, request.Channel.ID), ) for _, c := range comments { @@ -339,7 +339,7 @@ func commentCommandFunc(ctx disgoman.Context, args []string) { cs := fmt.Sprintf("```md\n%s\n- %s At %s\n```\n", c.Content, discord_utils.GetDisplayName(ctx, c.Author.ID), - c.CommentAt.Format("2006-01-02 15:04:05 MST"), + c.CommentAt.Format("2006-01-02 15:04:05"), ) if len(commentString+cs) >= 2000 { commentStrings = append(commentStrings, commentString) @@ -355,6 +355,8 @@ func commentCommandFunc(ctx disgoman.Context, args []string) { } } } + } else { + log.Println(err) } _, err = ctx.Send(fmt.Sprintf("%s your comment has been added.", ctx.Message.Author.Mention())) dmChannel, err := ctx.Session.UserChannelCreate(request.Author.ID) @@ -425,14 +427,14 @@ func viewCommandFunc(ctx disgoman.Context, args []string) { request.ID, discord_utils.GetDisplayName(ctx, request.Author.ID), request.Content, - request.RequestedAt.Format("2006-01-02 15:04:05 MST"), + request.RequestedAt.Format("2006-01-02 15:04:05"), discord_utils.GetChannelName(ctx, request.Channel.ID), ) for _, c := range comments { cs := fmt.Sprintf("```md\n%s\n- %s At %s\n```\n", c.Content, discord_utils.GetDisplayName(ctx, c.Author.ID), - c.CommentAt.Format("2006-01-02 15:04:05 MST"), + c.CommentAt.Format("2006-01-02 15:04:05"), ) if len(commentString+cs) >= 2000 { commentStrings = append(commentStrings, commentString)