bots

package
v0.0.0-...-40f30c5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmojiUnauthorized = "(foreveralone)"
	EmojiFailed       = "(failed)"
	EmojiSuccess      = "(successful)"

	CmdNext     = "next"
	CmdPrevious = "previous"
	CmdSet      = "set"
	CmdAway     = "away"
	CmdBack     = "back"
	CmdList     = "list"
	CmdAnnounce = "announce"
)

Variables

Functions

This section is empty.

Types

type EightBall

type EightBall struct {
	// contains filtered or unexported fields
}

func (*EightBall) CurrentState

func (b *EightBall) CurrentState() []byte

func (*EightBall) Description

func (b *EightBall) Description() string

func (*EightBall) HandleConfig

func (b *EightBall) HandleConfig(w *core.Wrangler, data json.RawMessage) error

func (*EightBall) HandleMessage

func (b *EightBall) HandleMessage(req *webhook.Request) core.Reply

func (*EightBall) Help

func (b *EightBall) Help() core.Reply

func (*EightBall) Name

func (b *EightBall) Name() string

type Sheriff

type Sheriff struct {
	// contains filtered or unexported fields
}

func (*Sheriff) CurrentState

func (b *Sheriff) CurrentState() []byte

func (*Sheriff) Description

func (b *Sheriff) Description() string

func (*Sheriff) HandleConfig

func (b *Sheriff) HandleConfig(w *core.Wrangler, data json.RawMessage) error

func (*Sheriff) HandleMessage

func (b *Sheriff) HandleMessage(req *webhook.Request) core.Reply

func (*Sheriff) Help

func (b *Sheriff) Help() core.Reply

func (*Sheriff) Name

func (b *Sheriff) Name() string

type SheriffConfig

type SheriffConfig struct {
	Days         []int        `json:"days"`
	Time         string       `json:"time"`
	Announce     bool         `json:"announce"`
	AnnounceTime string       `json:"announce_time"`
	Topic        string       `json:"topic"`
	Users        []string     `json:"users"`
	SheriffUsers SheriffUsers `json:"-"`
}

type SheriffState

type SheriffState struct {
	CurrentSheriff int          `json:"current_sheriff"`
	SheriffUsers   SheriffUsers `json:"sheriff_users"`
}

type SheriffUser

type SheriffUser struct {
	Name string `json:"name"`
	Away bool   `json:"away"`
}

type SheriffUsers

type SheriffUsers []SheriffUser

func (SheriffUsers) Len

func (slice SheriffUsers) Len() int

func (SheriffUsers) Less

func (slice SheriffUsers) Less(i, j int) bool

func (SheriffUsers) Swap

func (slice SheriffUsers) Swap(i, j int)

Jump to

Keyboard shortcuts

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