mirror of
https://github.com/idanoo/NZCovidBot
synced 2025-07-01 11:12:15 +00:00
Collapsable slack post
This commit is contained in:
parent
4c283f1cbb
commit
903012231a
1 changed files with 3 additions and 3 deletions
|
@ -2,6 +2,7 @@ package nzcovidbot
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/ashwanthkumar/slack-go-webhook"
|
||||
)
|
||||
|
@ -19,10 +20,9 @@ func postToSlack() {
|
|||
return
|
||||
}
|
||||
|
||||
rawText := strings.Join(postableData, "\n")
|
||||
attachment1 := slack.Attachment{}
|
||||
for _, v := range postableData {
|
||||
attachment1.AddField(slack.Field{Value: v})
|
||||
}
|
||||
attachment1.Text = &rawText
|
||||
|
||||
payload := slack.Payload{
|
||||
Text: "New Locations of Interest!",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue