This commit is contained in:
shoopea 2019-06-09 16:02:10 +08:00
parent ae00d64a92
commit e8edde5722

View File

@ -255,10 +255,10 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
_, err := b.Send(&ch, c.Text)
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendMsg Chat")
} else if c.ToUserID64 != 0 {
ch := tb.Chat{
ID: c.ToUserID64,
u := tb.User{
ID: int(c.ToUserID64),
}
_, err := b.Send(&ch, c.Text)
_, err := b.Send(&u, c.Text)
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendMsg User")
}
case commandReplyMsg:
@ -282,7 +282,7 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendDocument Chat")
} else if c.ToUserID64 != 0 {
u := tb.User{
ID: c.ToUserID64,
ID: int(c.ToUserID64),
}
d := c.Document
_, err := b.Send(&u, &d)