mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-07-12 16:02:05 +08:00
fix: add error handling for message retrieval in saveCmd function
This commit is contained in:
@@ -151,6 +151,11 @@ func saveCmd(ctx *ext.Context, update *ext.Update) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg, err := GetTGMessage(ctx, Client, replyToMsgID)
|
msg, err := GetTGMessage(ctx, Client, replyToMsgID)
|
||||||
|
if err != nil {
|
||||||
|
logger.L.Errorf("Failed to get message: %s", err)
|
||||||
|
ctx.Reply(update, ext.ReplyTextString("无法获取消息"), nil)
|
||||||
|
return dispatcher.EndGroups
|
||||||
|
}
|
||||||
|
|
||||||
supported, _ := supportedMediaFilter(msg)
|
supported, _ := supportedMediaFilter(msg)
|
||||||
if !supported {
|
if !supported {
|
||||||
|
|||||||
Reference in New Issue
Block a user