diff --git a/bot.go b/bot.go index 7d3be92..d150352 100644 --- a/bot.go +++ b/bot.go @@ -266,13 +266,24 @@ func botMsgLoad(m *tb.Message) { } log.Printf("Message Load\n") if m.ReplyTo != nil { - c := TGCommand{ - Type: commandReplyMsg, - Text: `Message found.`, - FromMsgID64: int64(m.ID), - FromChatID64: m.Chat.ID, + r := m.ReplyTo + if r.Document != nil { + c := TGCommand{ + Type: commandReplyMsg, + Text: `Document found.`, + FromMsgID64: int64(m.ID), + FromChatID64: m.Chat.ID, + } + TGCmdQueue <- c + } else { + c := TGCommand{ + Type: commandReplyMsg, + Text: `Message is not a document.`, + FromMsgID64: int64(m.ID), + FromChatID64: m.Chat.ID, + } + TGCmdQueue <- c } - TGCmdQueue <- c } else { c := TGCommand{ Type: commandReplyMsg,