Tweak caption
This commit is contained in:
parent
86dabaacf4
commit
6e7e0fbc31
1 changed files with 4 additions and 2 deletions
6
main.go
6
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,
|
||||
},
|
||||
}},
|
||||
|
|
Loading…
Reference in a new issue