@@ -222,7 +222,7 @@ func postArtworkCb(ctx context.Context, bot *telego.Bot, query telego.CallbackQu
222
222
if err != nil {
223
223
bot .AnswerCallbackQuery (& telego.AnswerCallbackQueryParams {
224
224
CallbackQueryID : query .ID ,
225
- Text : "获取回调数据失败" + err .Error (),
225
+ Text : "获取回调数据失败 " + err .Error (),
226
226
ShowAlert : true ,
227
227
CacheTime : 60 ,
228
228
})
@@ -237,7 +237,7 @@ func postArtworkCb(ctx context.Context, bot *telego.Bot, query telego.CallbackQu
237
237
if err != nil {
238
238
bot .AnswerCallbackQuery (& telego.AnswerCallbackQueryParams {
239
239
CallbackQueryID : query .ID ,
240
- Text : "获取作品信息失败" + err .Error (),
240
+ Text : "获取作品信息失败 " + err .Error (),
241
241
ShowAlert : true ,
242
242
CacheTime : 60 ,
243
243
})
@@ -263,19 +263,19 @@ func postArtworkCb(ctx context.Context, bot *telego.Bot, query telego.CallbackQu
263
263
}
264
264
}()
265
265
}
266
- go bot .EditMessageCaption (& telego.EditMessageCaptionParams {
266
+ go bot .EditMessageText (& telego.EditMessageTextParams {
267
267
ChatID : telegoutil .ID (query .Message .GetChat ().ID ),
268
268
MessageID : query .Message .GetMessageID (),
269
- Caption : fmt .Sprintf ("正在发布: %s" , artwork .SourceURL ),
269
+ Text : fmt .Sprintf ("正在发布: %s" , artwork .SourceURL ),
270
270
ReplyMarkup : nil ,
271
271
})
272
272
if service .CheckDeletedByURL (ctx , sourceURL ) {
273
273
if err := service .DeleteDeletedByURL (ctx , sourceURL ); err != nil {
274
274
Logger .Errorf ("取消删除记录失败: %s" , err )
275
- bot .EditMessageCaption (& telego.EditMessageCaptionParams {
275
+ bot .EditMessageText (& telego.EditMessageTextParams {
276
276
ChatID : telegoutil .ID (query .Message .GetChat ().ID ),
277
277
MessageID : query .Message .GetMessageID (),
278
- Caption : "取消删除记录失败: " + err .Error (),
278
+ Text : "取消删除记录失败: " + err .Error (),
279
279
})
280
280
return
281
281
}
@@ -285,28 +285,28 @@ func postArtworkCb(ctx context.Context, bot *telego.Bot, query telego.CallbackQu
285
285
}
286
286
if err := fetcher .PostAndCreateArtwork (ctx , artwork , bot , query .Message .GetChat ().ID , query .Message .GetMessageID ()); err != nil {
287
287
Logger .Errorf ("发布失败: %s" , err )
288
- bot .EditMessageCaption (& telego.EditMessageCaptionParams {
288
+ bot .EditMessageText (& telego.EditMessageTextParams {
289
289
ChatID : telegoutil .ID (query .Message .GetChat ().ID ),
290
290
MessageID : query .Message .GetMessageID (),
291
- Caption : "发布失败: " + err .Error () + "\n \n " + time .Now ().Format ("2006-01-02 15:04:05" ),
291
+ Text : "发布失败: " + err .Error () + "\n \n " + time .Now ().Format ("2006-01-02 15:04:05" ),
292
292
})
293
293
return
294
294
}
295
295
artwork , err = service .GetArtworkByURL (ctx , sourceURL )
296
296
if err != nil {
297
297
Logger .Errorf ("获取发布后的作品信息失败: %s" , err )
298
- bot .EditMessageCaption (& telego.EditMessageCaptionParams {
298
+ bot .EditMessageText (& telego.EditMessageTextParams {
299
299
ChatID : telegoutil .ID (query .Message .GetChat ().ID ),
300
300
MessageID : query .Message .GetMessageID (),
301
- Caption : "发布成功, 但获取作品信息失败: " + err .Error (),
301
+ Text : "发布成功, 但获取作品信息失败: " + err .Error (),
302
302
ReplyMarkup : nil ,
303
303
})
304
304
return
305
305
}
306
- bot .EditMessageCaption (& telego.EditMessageCaptionParams {
306
+ bot .EditMessageText (& telego.EditMessageTextParams {
307
307
ChatID : telegoutil .ID (query .Message .GetChat ().ID ),
308
308
MessageID : query .Message .GetMessageID (),
309
- Caption : "发布成功: " + artwork .Title + "\n \n 发布时间: " + artwork .CreatedAt .Format ("2006-01-02 15:04:05" ),
309
+ Text : "发布成功: " + artwork .Title + "\n \n 发布时间: " + artwork .CreatedAt .Format ("2006-01-02 15:04:05" ),
310
310
ReplyMarkup : telegoutil .InlineKeyboard (
311
311
[]telego.InlineKeyboardButton {
312
312
telegoutil .InlineKeyboardButton ("查看" ).WithURL (telegram .GetArtworkPostMessageURL (artwork .Pictures [0 ].TelegramInfo .MessageID )),
0 commit comments