code: func (c *Context) EditMessagesWithEventID(eventID string, fromState string, text string, kb InlineKeyboard) (edited int, err error) {
  	var messages []OutgoingMessage
  	f := bson.M{"botid": c.Bot().ID, "eventid": eventID}
  	if fromState != "" {
  		f["inlinekeyboardmarkup.state"] = fromState
  	}
  
  	//update MAX_MSGS_TO_UPDATE_WITH_EVENTID last bot messages
  	c.db.C("messages").Find(f).Sort("-_id").Limit(MaxMsgsToUpdateWithEventID).All(&messages)
  	for _, message := range messages {
  		err = c.EditMessageTextAndInlineKeyboard(&message, fromState, text, kb)
  		if err != nil {
  			c.Log().WithError(err).WithField("eventid", eventID).Error("EditMessagesWithEventID")
  		} else {
  			edited++
  		}
  	}
  	return edited, err
  }
docs: // EditMessagesWithEventID edit the last MaxMsgsToUpdateWithEventID messages' text and inline keyboard with the corresponding eventID in ALL chats