Refine the discord api a little

This commit is contained in:
2025-04-13 16:30:28 +02:00
parent 00ed4e9fc1
commit 586c49558e
2 changed files with 12 additions and 21 deletions

View File

@@ -10,6 +10,13 @@ import (
"os"
)
func NotifyDiscordErrorless(message string) {
err := NotifyDiscord(message)
if err != nil {
log.Printf("Error notifying discord: %v", err)
}
}
func NotifyDiscord(message string) error {
webhookURL := os.Getenv("YTDL_DISCORD_WEBHOOK_URL")
if webhookURL == "" {