refactor: simplify dler client interface

This commit is contained in:
krau
2025-08-02 10:01:59 +08:00
parent ee5e0b8ff0
commit b9d14f79c8
3 changed files with 14 additions and 13 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/celestix/gotgproto/ext"
"github.com/celestix/gotgproto/types"
"github.com/charmbracelet/log"
"github.com/gotd/td/telegram/downloader"
"github.com/gotd/td/tg"
"github.com/krau/SaveAny-Bot/client/bot/handlers/utils/mediautil"
"github.com/krau/SaveAny-Bot/client/bot/handlers/utils/msgelem"
@@ -83,7 +84,7 @@ func GetFilesFromUpdateLinkMessageWithReplyEdit(ctx *ext.Context, update *ext.Up
}
files = make([]tfile.TGFileMessage, 0, len(msgLinks))
addFile := func(client tfile.DlerClient, msg *tg.Message) {
addFile := func(client downloader.Client, msg *tg.Message) {
if msg == nil || msg.Media == nil {
logger.Warn("message is nil, skipping")
return