refactor: migrate to gotd (wip)

This commit is contained in:
krau
2024-11-08 23:00:57 +08:00
parent 32bd391129
commit fbdfc04ad8
14 changed files with 465 additions and 387 deletions

View File

@@ -1,6 +1,10 @@
package types
import "context"
import (
"context"
"github.com/gotd/td/tg"
)
type TaskStatus string
@@ -30,11 +34,19 @@ type Task struct {
Storage StorageType
StoragePath string
MessageID int32
MessageID int
ChatID int64
ReplyMessageID int32
ReplyMessageID int
}
func (t *Task) String() string {
func (t Task) String() string {
return t.FileName
}
type File struct {
Location *tg.InputDocumentFileLocation
FileSize int64
FileName string
MimeType string
ID int64
}