format: |
{
"content": null,
"embeds": [
{{range . -}}
{{$alert := . -}}
{{range .Decisions -}}
{{if $alert.Source.Cn -}}
{
"title": "{{$alert.MachineID}}: {{.Scenario}}",
"description": ":flag_{{ $alert.Source.Cn | lower }}: {{$alert.Source.IP}} will get a {{.Type}} for the next {{.Duration}}.",
"url": "https://db-ip.com/{{$alert.Source.IP}}",
"color": "16711680"
}
{{end}}
{{if not $alert.Source.Cn -}}
{
"title": "{{$alert.MachineID}}: {{.Scenario}}",
"description": ":pirate_flag: {{$alert.Source.IP}} will get a {{.Type}} for the next {{.Duration}}.",
"url": "https://db-ip.com/{{$alert.Source.IP}}",
"color": "16711680"
}
{{end}}
{{end -}}
{{end -}}
]
}
url: https://discord.com/api/webhooks/xxx
method: POST
headers:
Content-Type: application/json
format: |
{
"content": null,
"embeds": [
{{range . -}}
{{$alert := . -}}
{{range .Decisions -}}
{{if $alert.Source.Cn -}}
{
"title": "{{$alert.MachineID}}: {{.Scenario}}",
"description": ":flag_{{ $alert.Source.Cn | lower }}: {{$alert.Source.IP}} will get a {{.Type}} for the next {{.Duration}}.",
"url": "https://db-ip.com/{{$alert.Source.IP}}",
"color": "16711680"
}
{{end}}
{{if not $alert.Source.Cn -}}
{
"title": "{{$alert.MachineID}}: {{.Scenario}}",
"description": ":pirate_flag: {{$alert.Source.IP}} will get a {{.Type}} for the next {{.Duration}}.",
"url": "https://db-ip.com/{{$alert.Source.IP}}",
"color": "16711680"
}
{{end}}
{{end -}}
{{end -}}
]
}
url: https://discord.com/api/webhooks/xxx
method: POST
headers:
Content-Type: application/json