discordo/internal/notifications/desktop_toast_darwin.go
2025-04-17 19:31:30 -04:00

19 lines
385 B
Go

//go:build darwin
package notifications
import (
gosxnotifier "github.com/deckarep/gosx-notifier"
)
func sendDesktopNotification(title string, body string, image string, playSound bool, _ int) error {
notify := gosxnotifier.NewNotification(body)
notify.Title = title
notify.ContentImage = image
if playSound {
notify.Sound = gosxnotifier.Default
}
return notify.Push()
}