adding error & deploy notification
This commit is contained in:
37
haven-notify/template/error.tmpl
Normal file
37
haven-notify/template/error.tmpl
Normal file
@@ -0,0 +1,37 @@
|
||||
{{/*
|
||||
Error Notification Template
|
||||
Variables expected:
|
||||
- .caller: The caller of the error
|
||||
- .message: The error message
|
||||
- .critical: Boolean indicating if the error is critical
|
||||
- .extra: Optional array of additional fields with .name and .value
|
||||
*/}}
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
"title": "❌ Error",
|
||||
"description": "**{{.caller}}** encountered an error!",
|
||||
"color": {{if .critical}}15158332{{else}}15844367{{end}},
|
||||
"fields": [
|
||||
{
|
||||
"name": "📄 Message",
|
||||
"value": "{{.message}}",
|
||||
"inline": false
|
||||
}
|
||||
{{- if .extra}}
|
||||
{{- range $index, $field := .extra}},
|
||||
{
|
||||
"name": "{{$field.name}}",
|
||||
"value": "{{$field.value}}",
|
||||
"inline": true
|
||||
}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
],
|
||||
"footer": {
|
||||
"text": "✨ Haven Notify ✨"
|
||||
},
|
||||
"timestamp": "{{formatTime .timestamp}}"
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user