Skip to content

Commit e671748

Browse files
committed
fix: meaningless wait
1 parent 819585f commit e671748

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cmd/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
const (
10-
Version string = "0.10.5"
10+
Version string = "0.10.6"
1111
)
1212

1313
var VersionCmd = &cobra.Command{

telegram/artwork.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ func PostArtwork(bot *telego.Bot, artwork *types.Artwork) ([]telego.Message, err
6161
return nil, err
6262
}
6363
copy(allMessages[i:], messages)
64-
time.Sleep(time.Duration(int(config.Cfg.Telegram.Sleep)*len(inputMediaPhotos)) * time.Second)
64+
if i+10 < len(artwork.Pictures) {
65+
time.Sleep(time.Duration(int(config.Cfg.Telegram.Sleep)*len(inputMediaPhotos)) * time.Second)
66+
}
6567
}
6668
return allMessages, nil
6769
}

0 commit comments

Comments
 (0)