From 6e7e0fbc31d191a96a61fe1fdb23018858d50a21 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Mon, 17 Sep 2018 14:49:43 +0200 Subject: [PATCH] Tweak caption --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index c00a904..9106a1c 100644 --- a/main.go +++ b/main.go @@ -62,22 +62,24 @@ func webhook(update tg.APIUpdate) { photos := make([]tg.APIInlineQueryResultPhoto, len(results.Data)) for i, card := range results.Data { + caption := fmt.Sprintf("EDHREC rank: #%d - cardmarket: € %s", card.EdhrecRank, card.Eur) photos[i] = tg.APIInlineQueryResultPhoto{ Type: "photo", ResultID: card.ID, PhotoURL: card.ImageUris.Large, ThumbURL: card.ImageUris.Normal, Title: card.Name, + Caption: caption, ReplyMarkup: &tg.APIInlineKeyboardMarkup{ InlineKeyboard: [][]tg.APIInlineKeyboardButton{{ { Text: "Scryfall", URL: card.ScryfallURI, }, { - Text: fmt.Sprintf("EDHREC (#%d)", card.EdhrecRank), + Text: "EDHREC", URL: card.RelatedUris.Edhrec, }, { - Text: fmt.Sprintf("Cardmarket (%s €)", card.ScryfallURI), + Text: "MKM", URL: card.PurchaseUris.Magiccardmarket, }, }},