test
This commit is contained in:
parent
c64c544232
commit
55564b6c56
25
workers.go
25
workers.go
@ -283,16 +283,21 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
|
||||
_, err := b.Send(&ch, c.Text)
|
||||
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendMsg User")
|
||||
}
|
||||
/*
|
||||
case commandSendDocument:
|
||||
if c.ToChatID64 != 0 {
|
||||
_, err := c.Document.Send(b, c.ToChatID64, nil)
|
||||
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendDocument Chat")
|
||||
} else if c.ToUserID64 != 0 {
|
||||
_, err := c.Document.Send(b, c.ToUserID64, nil)
|
||||
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendDocument Chat")
|
||||
}
|
||||
*/
|
||||
case commandSendDocument:
|
||||
if c.ToChatID64 != 0 {
|
||||
ch := tb.Chat{
|
||||
ID: c.ToUserID64,
|
||||
}
|
||||
_, 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)
|
||||
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendDocument Chat")
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user