feat: Add notification templates (#2)
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
b9902f0623
commit
632da28954
11 changed files with 154 additions and 67 deletions
1
templates/balance.tmpl
Normal file
1
templates/balance.tmpl
Normal file
|
@ -0,0 +1 @@
|
|||
💰 *Balance* _{{ printf "%.6f" (convertCurrency .Miner.Coin .Miner.Balance) }} {{ upper .Miner.Coin }}_
|
6
templates/block.tmpl
Normal file
6
templates/block.tmpl
Normal 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 }}_
|
5
templates/offline-worker.tmpl
Normal file
5
templates/offline-worker.tmpl
Normal 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
1
templates/payment.tmpl
Normal file
|
@ -0,0 +1 @@
|
|||
💵 *Payment* _{{ printf "%.6f" (convertCurrency .Miner.Coin .Payment.Value) }} {{ upper .Miner.Coin }}_
|
Reference in a new issue