Command parsing fixes
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Hamcha 2022-03-27 22:53:50 +02:00
parent c9482d34de
commit 0279e6bd35
Signed by: hamcha
GPG key ID: 1669C533B8CF6D89
2 changed files with 2 additions and 2 deletions

View file

@ -51,7 +51,7 @@ func (m *Module) OnUpdate(update tg.APIUpdate) {
return
}
if utils.IsCommand(*update.Message, m.name, "metafora") {
if utils.IsCommand(*update.Message, m.name, "proverbio") {
start := rand.Intn(len(proverbipairs.start))
end := rand.Intn(len(proverbipairs.end))
m.client.SendTextMessage(tg.ClientTextMessageData{

View file

@ -22,7 +22,7 @@ func IsCommand(update tg.APIMessage, botname string, cmdname string) bool {
}
// Check long form
if text == shortcmd || strings.HasPrefix(text, fullcmd+" ") {
if text == fullcmd || strings.HasPrefix(text, fullcmd+" ") {
return true
}