bot

package
v0.0.0-...-6bcaab5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2017 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelpMessage

func HelpMessage(update tgbotapi.Update, ctx *BotContext)

func HknHistory

func HknHistory(update tgbotapi.Update, ctx *BotContext)

func LoadBot

func LoadBot(configuration *common.Configuration)

func RouteEventQuery

func RouteEventQuery(data []string, update tgbotapi.Update, ctx *BotContext)

func RouteMessages

func RouteMessages(ctx *BotContext)

func SendText

func SendText(update tgbotapi.Update, ctx *BotContext, text string)

func ShowEvents

func ShowEvents(update tgbotapi.Update, ctx *BotContext)

func StartMessage

func StartMessage(update tgbotapi.Update, ctx *BotContext)

Types

type BotContext

type BotContext struct {
	Config    *common.Configuration
	Bot       *tgbotapi.BotAPI
	UpChannel <-chan tgbotapi.Update
	ApiAi     *apiai.ApiClient
}

func InitBot

func InitBot(configuration *common.Configuration) *BotContext

type JsonEvents

type JsonEvents struct {
	Events []struct {
		Uid         string `json:"uid"`
		Name        string `json:"name"`
		Date        string `json:"date"`
		Description string `json:"description"`
		Eventbrite  string `json:"eventbrite"`
		Structure   []struct {
			Start       string `json:"start"`
			End         string `json:"end"`
			Description string `json:"description"`
			Speaker     string `json:"speaker"`
		} `json:"structure"`
	} `json:"events"`
}

func EventReader

func EventReader(fileName string) JsonEvents

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL