This commit is contained in:
shoopea 2019-06-09 00:58:31 +08:00
parent 0775b445ad
commit c64c544232

View File

@ -257,6 +257,7 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
} }
_, err := b.Reply(&m, c.Text) _, err := b.Reply(&m, c.Text)
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : ReplyMsg") logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : ReplyMsg")
/*
case commandReplyDocument: case commandReplyDocument:
ch := tb.Chat{ ch := tb.Chat{
ID: c.FromChatID64, ID: c.FromChatID64,
@ -267,6 +268,7 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
} }
_, err := c.Document.Send(b, m, nil) _, err := c.Document.Send(b, m, nil)
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : ReplyDocument") logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : ReplyDocument")
*/
case commandSendMsg: case commandSendMsg:
if c.ToChatID64 != 0 { if c.ToChatID64 != 0 {
ch := tb.Chat{ ch := tb.Chat{
@ -281,6 +283,7 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
_, err := b.Send(&ch, c.Text) _, err := b.Send(&ch, c.Text)
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendMsg User") logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendMsg User")
} }
/*
case commandSendDocument: case commandSendDocument:
if c.ToChatID64 != 0 { if c.ToChatID64 != 0 {
_, err := c.Document.Send(b, c.ToChatID64, nil) _, err := c.Document.Send(b, c.ToChatID64, nil)
@ -289,6 +292,7 @@ func TGCmdWorker(id int, b *tb.Bot, cmds <-chan TGCommand) {
_, err := c.Document.Send(b, c.ToUserID64, nil) _, err := c.Document.Send(b, c.ToUserID64, nil)
logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendDocument Chat") logOnError(err, "TGCmdWorker["+strconv.Itoa(id)+"] : SendDocument Chat")
} }
*/
default: default:
} }