Skip to content

Commit da5fd25

Browse files
committed
chore: Improve error handling and messaging in batchPostArtwork
1 parent e472d10 commit da5fd25

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bot/handlers_admin.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -537,13 +537,14 @@ func batchPostArtwork(ctx context.Context, bot *telego.Bot, message telego.Messa
537537
if err != nil {
538538
Logger.Errorf("获取作品信息失败: %s", err)
539539
failed++
540+
telegram.ReplyMessage(bot, message, fmt.Sprintf("获取 %s 信息失败: %s", sourceURL, err))
540541
continue
541542
}
542543
}
543544
if err := fetcher.PostAndCreateArtwork(ctx, artwork, bot, storage.GetStorage(), message.Chat.ID); err != nil {
544545
Logger.Errorf("发布失败: %s", err)
545546
failed++
546-
telegram.ReplyMessage(bot, message, "发布失败: "+err.Error())
547+
telegram.ReplyMessage(bot, message, fmt.Sprintf("发布 %s 失败: %s", sourceURL, err))
547548
continue
548549
}
549550
time.Sleep(time.Duration(sleepTime) * time.Second)

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.7.16"
10+
Version string = "0.7.17"
1111
)
1212

1313
var VersionCmd = &cobra.Command{

0 commit comments

Comments
 (0)