vegapokerbot/internal/handler/util/command.go
Neur0toxine 2cd46585a8
All checks were successful
continuous-integration/drone/push Build is passing
add hot-reload & debugger
2024-05-14 15:26:28 +03:00

18 lines
356 B
Go

package util
import (
"github.com/mymmrac/telego"
th "github.com/mymmrac/telego/telegohandler"
)
func MatchCommand(command string, msg *telego.Message) bool {
return th.CommandEqual(command)(telego.Update{Message: msg})
}
func HasCommand(msg *telego.Message) bool {
if msg == nil {
return false
}
return th.CommandRegexp.MatchString(msg.Text)
}