This commit is contained in:
shoopea 2019-06-09 17:24:38 +08:00
parent 423eb903d5
commit f8489a4f2f

24
bot.go
View File

@ -268,13 +268,25 @@ func botMsgLoad(m *tb.Message) {
if m.ReplyTo != nil { if m.ReplyTo != nil {
r := m.ReplyTo r := m.ReplyTo
if r.Document != nil { if r.Document != nil {
c := TGCommand{ d := r.Document
Type: commandReplyMsg, if d.File.FilePath != nil {
Text: `Document found.`, txt := fmt.Sprintf("Document found at %s\n", d.File.FilePath)
FromMsgID64: int64(m.ID), c := TGCommand{
FromChatID64: m.Chat.ID, Type: commandReplyMsg,
Text: txt,
FromMsgID64: int64(m.ID),
FromChatID64: m.Chat.ID,
}
TGCmdQueue <- c
} else {
c := TGCommand{
Type: commandReplyMsg,
Text: `Document found but can't find local path.`,
FromMsgID64: int64(m.ID),
FromChatID64: m.Chat.ID,
}
TGCmdQueue <- c
} }
TGCmdQueue <- c
} else { } else {
c := TGCommand{ c := TGCommand{
Type: commandReplyMsg, Type: commandReplyMsg,