fre
This commit is contained in:
+8
-8
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user