This commit is contained in:
shoopea 2019-06-09 18:23:19 +08:00
parent 97951ffeab
commit 2d66971e17

3
bot.go
View File

@ -264,7 +264,6 @@ func botMsgLoad(m *tb.Message) {
if !m.Private() {
return
}
log.Printf("Message Load\n")
if m.ReplyTo != nil {
r := m.ReplyTo
if r.Document != nil {
@ -285,8 +284,10 @@ func botMsgLoad(m *tb.Message) {
FromChatID64: m.Chat.ID,
}
TGCmdQueue <- c
log.Printf("Getting file !\n")
r, err := b.GetFile(&f)
logOnError(err, "botMsgLoad : GetFile")
log.Printf("Reading file !\n")
buf := new(bytes.Buffer)
n, err := buf.ReadFrom(r)
logOnError(err, "botMsgLoad : ReadFrom")