go get github.com/ericbear/go_telegram_bot_request/message
- Import
import (
"github.com/ericbear/go_telegram_bot_request/message"
)
- Get Update - api
token := "xxxxx.xxxxxxxxx"
lastUpdateId := 0
msg := message.GetUpdates("https://api.telegram.org/bot"+token+"/", lastUpdateId)
- Send Message - api
token := "xxxxx.xxxxxxxx"
chatId := 1
replyChatId := 0
msg := message.SendMessage("https://api.telegram.org/bot"+token+"/", chatId, "hello world", replyChatId)
add "BotFather" on telegram to create Bot