Versions in this module Expand all Collapse all v0 v0.0.2 Aug 10, 2020 Changes in this version + type Attachment struct + Payload Payload + Type string + type Callback struct + Entries []Entry + Object string + type Entry struct + ID string + Messagings []Messaging + Time int + type Message struct + Attachments *[]Attachment + MID string + QuickReply *QuickReply + ReplyTo *ReplyTo + Text string + type Messaging struct + Message Message + Postback Postback + Recipient User + Sender UserWithRef + Timestamp int + type Payload struct + StickerId string + Title string + URL string + type Postback struct + Payload string + Title string + type QuickReply struct + Payload string + type ReplyTo struct + MID string + type Response struct + Message Message + Recipient User + type User struct + ID string + type UserWithRef struct + ID string + UserRef string v0.0.1 Aug 10, 2020 Changes in this version + var ConfigPath = path.Join(configDir, "config.yaml") + var DataPath = path.Join(dataDir, "data.json") + var FacebookApi = "https://graph.facebook.com/v2.6/me/messages?access_token=%s" + func Find(values []string, val string) (int, bool) + type Bot struct + func NewBot(strategy string, path string) (*Bot, error) + func (bot *Bot) Add(q string, r string) + func (bot *Bot) Adds(qs []string, rs []string) error + func (bot *Bot) CallbackHandler(w http.ResponseWriter, r *http.Request) + func (bot *Bot) Debug() string + func (bot *Bot) FullDebug() string + func (bot *Bot) Get(q string) (string, error) + func (bot *Bot) GetLastMessage(id string) (string, error) + func (bot *Bot) HandleMessage(inMessage facebook.Message, id string) + func (bot *Bot) LenQueries() int + func (bot *Bot) LenResponses(q string) (int, error) + func (bot *Bot) Load(path string) error + func (bot *Bot) PeriodicSave(path string) + func (bot *Bot) RemoveQueries(qs []string) error + func (bot *Bot) RemoveQuery(q string) error + func (bot *Bot) RemoveResponse(q string, r string) error + func (bot *Bot) RemoveResponses(qs []string, rs []string) error + func (bot *Bot) Save(path string) error + func (bot *Bot) ShowQueries() []string + func (bot *Bot) ShowResponses(q string) ([]string, error) + func (bot *Bot) TestHandler(w http.ResponseWriter, r *http.Request) + func (bot *Bot) UpdateLastMessage(id string, message string) + func (bot *Bot) ValidStrategy() bool + func (bot *Bot) VerificationHandler(w http.ResponseWriter, r *http.Request) + type Config struct + Strategy string + func LoadConfig(path string) (Config, error) + type Env struct + PageAccessToken string + Port string + VerifyToken string + func LoadEnv() (Env, error) + type GombalErrors struct + func (e *GombalErrors) Error() string + type Tuple struct + Q string + R string + func Zip(as []string, bs []string) ([]Tuple, error)