diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-11-20 23:21:14 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-11-20 23:21:14 +0300 |
commit | ee63b08bd7861702123f9c5e83d60f49b1805e85 (patch) | |
tree | f053d4162e05f70f741629c800ce93fd097c28a0 /examples | |
parent | 7a749a3d0c87ddb9d8109c5cbca7d7efcb3991eb (diff) |
Fix example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/example.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/example.go b/examples/example.go index d6b7ab4..9d44434 100644 --- a/examples/example.go +++ b/examples/example.go @@ -42,7 +42,7 @@ func main() { AddCallback("Картинка", schemes.POSITIVE, "picture") // Отправка сообщения с клавиатурой - err := api.Messages.Send(tamtam.NewMessage().SetUser(upd.Message.Sender.UserId).AddKeyboard(keyboard)) + err := api.Messages.Send(tamtam.NewMessage().SetUser(upd.Message.Recipient.UserId).AddKeyboard(keyboard).SetText("Привет!")) log.Printf("Answer: %#v", err) case *schemes.MessageCallbackUpdate: // Ответ на коллбек @@ -51,7 +51,8 @@ func main() { if err != nil { log.Fatal(err) } - if err := api.Messages.Send(tamtam.NewMessage().SetUser(upd.Message.Sender.UserId).AddPhoto(photo)); err != nil { + msg := tamtam.NewMessage().SetUser(upd.Message.Recipient.UserId).AddPhoto(photo) + if err := api.Messages.Send(msg); err != nil { log.Fatal(err) } } |