test
This commit is contained in:
parent
423eb903d5
commit
f8489a4f2f
14
bot.go
14
bot.go
@ -268,13 +268,25 @@ func botMsgLoad(m *tb.Message) {
|
||||
if m.ReplyTo != nil {
|
||||
r := m.ReplyTo
|
||||
if r.Document != nil {
|
||||
d := r.Document
|
||||
if d.File.FilePath != nil {
|
||||
txt := fmt.Sprintf("Document found at %s\n", d.File.FilePath)
|
||||
c := TGCommand{
|
||||
Type: commandReplyMsg,
|
||||
Text: `Document found.`,
|
||||
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
|
||||
}
|
||||
} else {
|
||||
c := TGCommand{
|
||||
Type: commandReplyMsg,
|
||||
|
Loading…
Reference in New Issue
Block a user