diff --git a/bot.go b/bot.go index a680939..7b3b4d6 100644 --- a/bot.go +++ b/bot.go @@ -269,11 +269,18 @@ func botMsgLoad(m *tb.Message) { r := m.ReplyTo if r.Document != nil { d := r.Document - if len(d.File.FilePath) > 0 { - txt := fmt.Sprintf("Document found at %s\n", d.File.FilePath) + if d.File.OnDisk() { c := TGCommand{ Type: commandReplyMsg, - Text: txt, + Text: "File on disk !", + FromMsgID64: int64(m.ID), + FromChatID64: m.Chat.ID, + } + TGCmdQueue <- c + } else if d.File.InCloud() { + c := TGCommand{ + Type: commandReplyMsg, + Text: "File in cloud !", FromMsgID64: int64(m.ID), FromChatID64: m.Chat.ID, } @@ -281,7 +288,7 @@ func botMsgLoad(m *tb.Message) { } else { c := TGCommand{ Type: commandReplyMsg, - Text: `Document found but can't find local path.`, + Text: `Document found but can't find file.`, FromMsgID64: int64(m.ID), FromChatID64: m.Chat.ID, }