From 25a96a37bd13211d61327d3781fc8c5c5057e8ed Mon Sep 17 00:00:00 2001 From: unintended fraud Date: Wed, 12 Oct 2022 07:36:30 +0200 Subject: [PATCH] fre --- commands/pinned.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/commands/pinned.go b/commands/pinned.go index 7a3dd26..0e4bb5b 100644 --- a/commands/pinned.go +++ b/commands/pinned.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "math/rand" + "strings" "time" tempest "github.com/Amatsagu/Tempest" @@ -85,15 +86,14 @@ var Pinned tempest.Command = tempest.Command{ } func formatMessageContent(m tempest.Message) string { - return fmt.Sprintf( - `>>> par **%s** le %s - - - %s - `, - m.Author.Username, - m.Timestamp.Format("02/01/2006 15:04"), + lines := []string{ + ">>> pin du jour", + fmt.Sprintf("par **%s** le %s", m.Author.Username, m.Timestamp.Format("02/01/2006 15:04")), + "-", m.Content, - ) + } + + return strings.Join(lines, "\n") } func getChannels(rest tempest.Rest, serverID string) ([]Channel, error) {