From 86dabaacf459b0616be6d811aea894d7d3a37f6e Mon Sep 17 00:00:00 2001 From: Hamcha Date: Mon, 17 Sep 2018 14:47:09 +0200 Subject: [PATCH] Fix inline keyboard (IS THIS THE ONE?) --- main.go | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/main.go b/main.go index ce051d7..c00a904 100644 --- a/main.go +++ b/main.go @@ -68,17 +68,19 @@ func webhook(update tg.APIUpdate) { PhotoURL: card.ImageUris.Large, ThumbURL: card.ImageUris.Normal, Title: card.Name, - ReplyMarkup: []tg.APIInlineKeyboardButton{ - { - Text: "Scryfall", - URL: card.ScryfallURI, - }, { - Text: fmt.Sprintf("EDHREC (#%d)", card.EdhrecRank), - URL: card.RelatedUris.Edhrec, - }, { - Text: fmt.Sprintf("Cardmarket (%s €)", card.ScryfallURI), - URL: card.PurchaseUris.Magiccardmarket, - }, + ReplyMarkup: &tg.APIInlineKeyboardMarkup{ + InlineKeyboard: [][]tg.APIInlineKeyboardButton{{ + { + Text: "Scryfall", + URL: card.ScryfallURI, + }, { + Text: fmt.Sprintf("EDHREC (#%d)", card.EdhrecRank), + URL: card.RelatedUris.Edhrec, + }, { + Text: fmt.Sprintf("Cardmarket (%s €)", card.ScryfallURI), + URL: card.PurchaseUris.Magiccardmarket, + }, + }}, }, } }