mirror of https://github.com/velour/catbase.git
untappd: fix badge image to match json
This commit is contained in:
parent
267ec1a8bf
commit
3ba71cf9f6
|
@ -292,7 +292,11 @@ type checkin struct {
|
||||||
Items []struct {
|
Items []struct {
|
||||||
BadgeName string `json:"badge_name"`
|
BadgeName string `json:"badge_name"`
|
||||||
BadgeDescription string `json:"badge_description"`
|
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 {
|
if checkin.Badges.Count > 0 {
|
||||||
for _, b := range checkin.Badges.Items {
|
for _, b := range checkin.Badges.Items {
|
||||||
args = append(args, bot.ImageAttachment{
|
args = append(args, bot.ImageAttachment{
|
||||||
URL: b.BadgeImage,
|
URL: b.BadgeImage.Lg,
|
||||||
AltTxt: b.BadgeDescription,
|
AltTxt: b.BadgeDescription,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue