This commit is contained in:
shoopea 2019-06-09 15:46:12 +08:00
parent 0657fa1218
commit 5ddf475be4

View File

@ -276,14 +276,16 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
ch := tb.Chat{
ID: c.ToUserID64,
}
_, err := b.Send(&ch, c.Document)
d := c.Document
_, err := b.Send(&ch, &d)
//_, err := c.Document.Send(b, ch, nil)
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendDocument Chat")
} else if c.ToUserID64 != 0 {
ch := tb.Chat{
ID: c.ToUserID64,
}
_, err := b.Send(&ch, c.Document)
d := c.Document
_, err := b.Send(&ch, &d)
//_, err := c.Document.Send(b, &ch, nil)
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendDocument Chat")
}