Example #1
0
func init() {
	b := &bot{}
	l, err := time.LoadLocation(os.Getenv("BIJIN_TIMEZONE"))
	if err != nil {
		log.Printf("Error loading location: %v", err)
	}
	b.Location = l
	robots.RegisterRobot("bijin", b)
}
Example #2
0
// Loads the config file and registers the bot with the server for command /${1/(.+)/\L\1/g}.
func init() {
	p := &bot{}
	p.ProjectID = os.Getenv("PIVOTAL_PROJECT_ID")
	p.Token = os.Getenv("PIVOTAL_TOKEN")
	if p.ProjectID == "" || p.Token == "" {
		log.Println("PIVOTAL_PROJECT_ID or PIVOTAL_TOKEN not set, Pivotal bot disabled")
		return
	}
	robots.RegisterRobot("pivotal", p)
}
Example #3
0
File: ping.go Project: mbp/slackbot
func init() {
	p := &bot{}
	robots.RegisterRobot("ping", p)
}
Example #4
0
// Loads the config file and registers the bot with the server for command /store.
func init() {
	s := &bot{}
	robots.RegisterRobot("store", s)
}
Example #5
0
func init() {
	w := &bot{}
	robots.RegisterRobot("nihongo", w)
}
Example #6
0
func init() {
	d := &bot{}
	d.Random = rand.New(rand.NewSource(time.Now().UnixNano()))
	robots.RegisterRobot("decide", d)
}
Example #7
0
File: wiki.go Project: mbp/slackbot
func init() {
	w := &bot{}
	robots.RegisterRobot("wiki", w)
}
Example #8
0
File: help.go Project: mbp/slackbot
func init() {
	r := &bot{}
	robots.RegisterRobot("bots", r)
}
Example #9
0
func init() {
	y := &bot{}
	robots.RegisterRobot("youtube", y)
}
Example #10
0
File: bot.go Project: mbp/slackbot
func init() {
	s := &bot{}
	robots.RegisterRobot("bot", s)
}
Example #11
0
File: roll.go Project: mbp/slackbot
func init() {
	r := &bot{}
	r.Random = rand.New(rand.NewSource(time.Now().UnixNano()))

	robots.RegisterRobot("roll", r)
}