package main
import (
"fmt"
"log"
"net/http"
"os"
"github.com/ramin0/got"
)
func main() {
http.Handle("/messenger/", got.New(&got.BotData{
BaseURL: "https://mybot.com/messenger",
Page: &got.BotPage{
ID: "...",
AccessToken: "...",
VerifyToken: "...",
},
}, func(bot *got.BotData) {
bot.StartBlock(func(b *got.BotBlock) {
b.Component(&got.PluginFacebookProfile{})
b.Component(&got.ComponentText{
Text: "Hello, %{fb:first_name}!",
})
})
}).Handler())
port := os.Getenv("PORT")
if port == "" {
port = "3000"
}
log.Printf("Listening on port %s...", port)
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%s", port), nil))
}
-
Notifications
You must be signed in to change notification settings - Fork 0
RaMin0/got
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Yet another bot-building framework
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published