This commit is contained in:
shoopea 2019-06-09 18:21:06 +08:00
parent b2c5eaa754
commit 97951ffeab

3
bot.go
View File

@ -4,7 +4,6 @@ import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil"
"log" "log"
"regexp" "regexp"
"strconv" "strconv"
@ -289,7 +288,7 @@ func botMsgLoad(m *tb.Message) {
r, err := b.GetFile(&f) r, err := b.GetFile(&f)
logOnError(err, "botMsgLoad : GetFile") logOnError(err, "botMsgLoad : GetFile")
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
n, err := buf.ReadFrom(r.Reader) n, err := buf.ReadFrom(r)
logOnError(err, "botMsgLoad : ReadFrom") logOnError(err, "botMsgLoad : ReadFrom")
if n > 0 { if n > 0 {
data := buf.Bytes() data := buf.Bytes()