go-dette/filters.go

20 lines
293 B
Go

package main
import (
"strings"
neco "git.nefrace.ru/nefrace/nechotron"
)
func karmaTriggers(u *neco.Update) bool {
good, bad := GetTriggers()
all := append(good, bad...)
text := u.Text()
for _, t := range all {
if strings.HasPrefix(text, t) {
return true
}
}
return false
}