This commit is contained in:
unintended fraud
2022-10-12 07:36:30 +02:00
parent 8cfd8638f8
commit 25a96a37bd
+8 -8
View File
@@ -4,6 +4,7 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"math/rand" "math/rand"
"strings"
"time" "time"
tempest "github.com/Amatsagu/Tempest" tempest "github.com/Amatsagu/Tempest"
@@ -85,15 +86,14 @@ var Pinned tempest.Command = tempest.Command{
} }
func formatMessageContent(m tempest.Message) string { func formatMessageContent(m tempest.Message) string {
return fmt.Sprintf( lines := []string{
`>>> par **%s** le %s ">>> pin du jour",
- fmt.Sprintf("par **%s** le %s", m.Author.Username, m.Timestamp.Format("02/01/2006 15:04")),
%s "-",
`,
m.Author.Username,
m.Timestamp.Format("02/01/2006 15:04"),
m.Content, m.Content,
) }
return strings.Join(lines, "\n")
} }
func getChannels(rest tempest.Rest, serverID string) ([]Channel, error) { func getChannels(rest tempest.Rest, serverID string) ([]Channel, error) {