fixed a huge mistake

This commit is contained in:
potassium5703 2024-12-27 00:26:46 +03:00
parent efd993663d
commit ddc2c6640f

View File

@ -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)))),