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