diff --git a/market.go b/market.go index f58f7f7..3d7fccb 100644 --- a/market.go +++ b/market.go @@ -98,6 +98,9 @@ func GetImage(link string) (image.Image, error) { } defer resp.Body.Close() +if resp == nil { + log.Fatal("pizdec") +} img, _, err := image.Decode(resp.Body) if img == nil { log.Fatal("img is nil") @@ -112,7 +115,7 @@ func HandleCommand(update tg.Update, bot *tg.BotAPI) { maxCost := 5 var err error for i := 0; i <= maxCost; i++ { - var buf *bytes.Buffer +buf := new(bytes.Buffer) var img = imageutils.Concat( Must(GetImage(fmt.Sprintf(LinkFormat, takeOne(ShuffledCardPool)))),