【文件属性】:
文件名称:bot:用Golang编写的Telegram机器人API库
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-07 16:13:48
Go
博特
用Golang编写的Telegram bot API库
例子
package main
import (
"encoding/json"
tb "github.com/TelegramApi/bot"
)
func main () {
bot := tb . Create ( "API_TOKEN" )
bot . Listen ()
for update := range bot . Updates {
var outputMessage string
switch update . Message . Text {
case "/start" :
outputMessage = "I am your new Bot. \n \n "
case "Hi, Bot!" :
outputMessage = "Hello, " + update .