bot

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

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

Go to latest
Published: Nov 20, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(conf *config.Config, quit, done chan bool) error

Start will attempt to the start the Mattermost client.

Types

type Bot

type Bot struct {
	UserID string
	// contains filtered or unexported fields
}

func GetBot

func GetBot() *Bot

func (*Bot) FindChannel

func (b *Bot) FindChannel(name, teamID string) (*model.Channel, error)

func (*Bot) FindChannelWithTeam

func (b *Bot) FindChannelWithTeam(name string) (*model.Channel, error)

func (*Bot) FindTeam

func (b *Bot) FindTeam(name string) (*model.Team, error)

func (*Bot) RegisterEventHandler

func (b *Bot) RegisterEventHandler(h EventHandler, channelId string, eventTypes ...string)

func (*Bot) SendMsgTeamChannel

func (b *Bot) SendMsgTeamChannel(name, msg string) error

type EventHandler

type EventHandler func(event *model.WebSocketEvent)

Jump to

Keyboard shortcuts

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