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))
|
photos := make([]tg.APIInlineQueryResultPhoto, len(results.Data))
|
||||||
for i, card := range results.Data {
|
for i, card := range results.Data {
|
||||||
|
caption := fmt.Sprintf("EDHREC rank: #%d - cardmarket: € %s", card.EdhrecRank, card.Eur)
|
||||||
photos[i] = tg.APIInlineQueryResultPhoto{
|
photos[i] = tg.APIInlineQueryResultPhoto{
|
||||||
Type: "photo",
|
Type: "photo",
|
||||||
ResultID: card.ID,
|
ResultID: card.ID,
|
||||||
PhotoURL: card.ImageUris.Large,
|
PhotoURL: card.ImageUris.Large,
|
||||||
ThumbURL: card.ImageUris.Normal,
|
ThumbURL: card.ImageUris.Normal,
|
||||||
Title: card.Name,
|
Title: card.Name,
|
||||||
|
Caption: caption,
|
||||||
ReplyMarkup: &tg.APIInlineKeyboardMarkup{
|
ReplyMarkup: &tg.APIInlineKeyboardMarkup{
|
||||||
InlineKeyboard: [][]tg.APIInlineKeyboardButton{{
|
InlineKeyboard: [][]tg.APIInlineKeyboardButton{{
|
||||||
{
|
{
|
||||||
Text: "Scryfall",
|
Text: "Scryfall",
|
||||||
URL: card.ScryfallURI,
|
URL: card.ScryfallURI,
|
||||||
}, {
|
}, {
|
||||||
Text: fmt.Sprintf("EDHREC (#%d)", card.EdhrecRank),
|
Text: "EDHREC",
|
||||||
URL: card.RelatedUris.Edhrec,
|
URL: card.RelatedUris.Edhrec,
|
||||||
}, {
|
}, {
|
||||||
Text: fmt.Sprintf("Cardmarket (%s €)", card.ScryfallURI),
|
Text: "MKM",
|
||||||
URL: card.PurchaseUris.Magiccardmarket,
|
URL: card.PurchaseUris.Magiccardmarket,
|
||||||
},
|
},
|
||||||
}},
|
}},
|
||||||
|
|
Loading…
Reference in a new issue