Forgot to actually call the function
This commit is contained in:
parent
8269e40ff3
commit
9f54924598
1 changed files with 5 additions and 7 deletions
|
@ -24,12 +24,10 @@ var objects []string = []string{
|
||||||
}
|
}
|
||||||
|
|
||||||
func metafora(broker *tg.Broker, update tg.APIMessage) {
|
func metafora(broker *tg.Broker, update tg.APIMessage) {
|
||||||
if update.Text != nil {
|
if isCommand(update, "metafora") {
|
||||||
if *(update.Text) == "/metafora" {
|
|
||||||
n := rand.Intn(len(actions))
|
n := rand.Intn(len(actions))
|
||||||
m := rand.Intn(len(objects))
|
m := rand.Intn(len(objects))
|
||||||
broker.SendTextMessage(update.Chat, actions[n]+" "+objects[m], nil)
|
broker.SendTextMessage(update.Chat, actions[n]+" "+objects[m], nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Reference in a new issue