Archived
1
0
Fork 0

feat: Add notification templates (#2)

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2021-10-13 14:38:31 +02:00
parent b9902f0623
commit 632da28954
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
11 changed files with 154 additions and 67 deletions

1
templates/balance.tmpl Normal file
View file

@ -0,0 +1 @@
💰 *Balance* _{{ printf "%.6f" (convertCurrency .Miner.Coin .Miner.Balance) }} {{ upper .Miner.Coin }}_

6
templates/block.tmpl Normal file
View file

@ -0,0 +1,6 @@
🎉 *{{ convertAction .Pool.Coin }}* [#{{ .Block.Number }}]({{ formatBlockURL .Pool.Coin .Block.Hash }}) _
{{- if (eq .Pool.Coin "xch") -}}
{{ printf "%.2f" (convertCurrency .Pool.Coin .Block.Reward) }}
{{- else -}}
{{ printf "%.6f" (convertCurrency .Pool.Coin .Block.Reward) }}
{{- end }} {{ upper .Pool.Coin }}_

View file

@ -0,0 +1,5 @@
{{ if .Worker.IsOnline -}}
🟢 *Worker* _{{ .Worker.Name }}_ is online
{{- else -}}
🔴 *Worker* _{{ .Worker.Name }}_ is offline
{{- end -}}

1
templates/payment.tmpl Normal file
View file

@ -0,0 +1 @@
💵 *Payment* _{{ printf "%.6f" (convertCurrency .Miner.Coin .Payment.Value) }} {{ upper .Miner.Coin }}_