mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 11:51:17 +00:00
Use templating on counter name
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
58e984a4f4
commit
87f8fd84e2
1 changed files with 6 additions and 1 deletions
|
@ -11,13 +11,18 @@ func init() {
|
|||
return nil
|
||||
}
|
||||
|
||||
counterName, err := formatMessage(*r.Counter, m, ruleDef, nil)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "preparing response")
|
||||
}
|
||||
|
||||
var counterStep int64 = 1
|
||||
if r.CounterStep != nil {
|
||||
counterStep = *r.CounterStep
|
||||
}
|
||||
|
||||
return errors.Wrap(
|
||||
store.UpdateCounter(*r.Counter, counterStep, false),
|
||||
store.UpdateCounter(counterName, counterStep, false),
|
||||
"update counter",
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue