package main import ( "fmt" "strings" "github.com/hamcha/clessy/tg" ) func memegen(broker *tg.Broker, update tg.APIMessage) { if update.Photo != nil && update.Caption != nil { if strings.HasPrefix(*(update.Caption), "/meme") { maxsz := 0 photo := tg.APIPhotoSize{} for _, curphoto := range update.Photo { if curphoto.Width > maxsz { maxsz = curphoto.Width photo = curphoto } } fmt.Println(photo) } } }