This commit is contained in:
shoopea 2019-06-09 15:35:01 +08:00
parent 8ae650fb41
commit 0657fa1218

View File

@ -276,15 +276,15 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
ch := tb.Chat{
ID: c.ToUserID64,
}
//_, err := b.Send(&ch, c.Document)
_, 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 := b.Send(&ch, c.Document)
_, 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")
}
default: