code: func (b *Btelegram) handleEntities(rmsg *config.Message, message *tgbotapi.Message) {
  	if message.Entities == nil {
  		return
  	}
  	// for now only do URL replacements
  	for _, e := range *message.Entities {
  		if e.Type == "text_link" {
  			url, err := e.ParseURL()
  			if err != nil {
  				b.Log.Errorf("entity text_link url parse failed: %s", err)
  				continue
  			}
  			link := rmsg.Text[e.Offset : e.Offset+e.Length]
  			rmsg.Text = strings.Replace(rmsg.Text, link, url.String(), 1)
  		}
  	}
  }
docs: // handleEntities handles messageEntities