mirror of
https://github.com/idanoo/NZCovidBot
synced 2025-07-02 11:42:15 +00:00
- Skip invalid webhooks
- Build cache based on row data instead of entire row - Compare columns instead of entire row - Removed commitHash check and instead just processes on succesfull git pull - No more entire file dumps!
This commit is contained in:
parent
ae11cc53a3
commit
86eef8cc8e
5 changed files with 102 additions and 132 deletions
|
@ -12,6 +12,10 @@ import (
|
|||
var DiscordWebhooks []string
|
||||
|
||||
func postToDiscord(webhookString string, msg string) {
|
||||
if webhookString == "" {
|
||||
return
|
||||
}
|
||||
|
||||
tokenParts := strings.Split(webhookString, "/")
|
||||
len := len(tokenParts)
|
||||
webhook, err := disgohook.NewWebhookClientByToken(nil, nil, tokenParts[len-2]+"/"+tokenParts[len-1])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue