go-dette/filters.go

20 lines
293 B
Go
Raw Normal View History

2023-01-24 23:17:30 +03:00
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
}