This commit is contained in:
shoopea 2019-06-09 17:44:19 +08:00
parent 45b1dc51c5
commit 85fa235399

15
bot.go
View File

@ -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,
}