daily pastebin goal
2%
SHARE
TWEET

Untitled

a guest Jun 10th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func (tg *TgBot) SendMessages() {
  2.     for resp := range tg.SendMessagesChan {
  3.         go func() {
  4.             msg := tgbotapi.NewMessage(resp.ID, resp.Response)
  5.             tg.TgClient.Send(msg)
  6.         }()
  7.     }
  8. }
  9.  
  10. func (tg *TgBot) GetMessages() {
  11.     for msg := range tg.updChan {
  12.         go func() {
  13.             tg.GetMessagesChan <- TgMsg{ID: msg.Message.Chat.ID, Request: msg.Message.Text}
  14.         }()
  15.     }
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top