This commit is contained in:
shoopea 2019-06-09 18:02:44 +08:00
parent ede5a70ebc
commit dbc9bc7dc5

10
bot.go
View File

@ -268,8 +268,8 @@ 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 {
d := r.Document f := r.Document.File
if d.File.OnDisk() { if f.OnDisk() {
c := TGCommand{ c := TGCommand{
Type: commandReplyMsg, Type: commandReplyMsg,
Text: "File on disk !", Text: "File on disk !",
@ -277,7 +277,7 @@ func botMsgLoad(m *tb.Message) {
FromChatID64: m.Chat.ID, FromChatID64: m.Chat.ID,
} }
TGCmdQueue <- c TGCmdQueue <- c
} else if d.File.InCloud() { } else if f.InCloud() {
c := TGCommand{ c := TGCommand{
Type: commandReplyMsg, Type: commandReplyMsg,
Text: "File in cloud !", Text: "File in cloud !",
@ -285,7 +285,7 @@ func botMsgLoad(m *tb.Message) {
FromChatID64: m.Chat.ID, FromChatID64: m.Chat.ID,
} }
TGCmdQueue <- c TGCmdQueue <- c
r, err := b.GetFile(d.File) r, err := b.GetFile(&f)
logOnError(err, "botMsgLoad : GetFile") logOnError(err, "botMsgLoad : GetFile")
c := TGCommand{ c := TGCommand{
Type: commandReplyMsg, Type: commandReplyMsg,
@ -294,7 +294,7 @@ func botMsgLoad(m *tb.Message) {
FromChatID64: m.Chat.ID, FromChatID64: m.Chat.ID,
} }
TGCmdQueue <- c TGCmdQueue <- c
if d.File.OnDisk() { if f.OnDisk() {
c := TGCommand{ c := TGCommand{
Type: commandReplyMsg, Type: commandReplyMsg,
Text: "Yes !", Text: "Yes !",