fixed a huge mistake
This commit is contained in:
parent
efd993663d
commit
ddc2c6640f
@ -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)))),
|
||||
|
Loading…
Reference in New Issue
Block a user