Forgot to actually call the function

This commit is contained in:
Hamcha 2016-02-09 10:51:04 +00:00
parent 8269e40ff3
commit 9f54924598
1 changed files with 5 additions and 7 deletions

View File

@ -24,12 +24,10 @@ var objects []string = []string{
}
func metafora(broker *tg.Broker, update tg.APIMessage) {
if update.Text != nil {
if *(update.Text) == "/metafora" {
n := rand.Intn(len(actions))
m := rand.Intn(len(objects))
broker.SendTextMessage(update.Chat, actions[n]+" "+objects[m], nil)
return
}
if isCommand(update, "metafora") {
n := rand.Intn(len(actions))
m := rand.Intn(len(objects))
broker.SendTextMessage(update.Chat, actions[n]+" "+objects[m], nil)
return
}
}