refactor: complete core features

This commit is contained in:
krau
2024-11-09 09:07:00 +08:00
parent fbdfc04ad8
commit 20e06fbf46
14 changed files with 380 additions and 106 deletions

View File

@@ -2,6 +2,7 @@ package types
import (
"context"
"fmt"
"github.com/gotd/td/tg"
)
@@ -30,7 +31,7 @@ type Task struct {
Ctx context.Context
Error error
Status TaskStatus
FileName string
File *File
Storage StorageType
StoragePath string
@@ -40,7 +41,11 @@ type Task struct {
}
func (t Task) String() string {
return t.FileName
return fmt.Sprintf("[%d:%d]:%s", t.ChatID, t.MessageID, t.File.FileName)
}
func (t Task) FileName() string {
return t.File.FileName
}
type File struct {