From 3ba71cf9f6996c9f83da28a80e6602efb86b35c0 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sat, 28 Sep 2019 13:45:53 -0400 Subject: [PATCH] untappd: fix badge image to match json --- plugins/beers/beers.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/beers/beers.go b/plugins/beers/beers.go index 951b28b..2644dc8 100644 --- a/plugins/beers/beers.go +++ b/plugins/beers/beers.go @@ -292,7 +292,11 @@ type checkin struct { Items []struct { BadgeName string `json:"badge_name"` BadgeDescription string `json:"badge_description"` - BadgeImage string `json:"badge_image"` + BadgeImage struct { + Sm string + Md string + Lg string + } `json:"badge_image"` } } } @@ -438,7 +442,7 @@ func (p *BeersPlugin) checkUntappd(c bot.Connector, channel string) { if checkin.Badges.Count > 0 { for _, b := range checkin.Badges.Items { args = append(args, bot.ImageAttachment{ - URL: b.BadgeImage, + URL: b.BadgeImage.Lg, AltTxt: b.BadgeDescription, }) }