This commit is contained in:
shoopea 2019-06-09 14:57:37 +08:00
parent 55564b6c56
commit b1637b8af8

View File

@ -288,13 +288,15 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
ch := tb.Chat{
ID: c.ToUserID64,
}
_, err := c.Document.Send(b, ch, nil)
_, err := b.Send(&ch, c.Document)
// _, 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 := c.Document.Send(b, &ch, nil)
_, err := b.Send(&ch, c.Document)
// _, err := c.Document.Send(b, &ch, nil)
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendDocument Chat")
}