Documentation
¶
Index ¶
- func Filter(arr []string, cond func(string) bool) []string
- func FmtDuration(d time.Duration) string
- func IsBotMentioned(event *slack.MessageEvent, rtm *slack.RTM) bool
- func IsBotMessage(msg slack.RTMEvent) bool
- func IsDirectMessage(event *slack.MessageEvent) bool
- func Keys(m map[string]int) []string
- func LastPointReset() time.Time
- func Map(vs []string, f func(string) string) []string
- func NextPointReset() time.Time
- func TimeTillPointReset() time.Duration
- type EmojiHandler
- type EventHandler
- type HelpHandler
- type LeaderHandler
- type PingHandler
- type PointsHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FmtDuration ¶
Format a time.Duration till karma reset for display to user
func IsBotMentioned ¶
func IsBotMentioned(event *slack.MessageEvent, rtm *slack.RTM) bool
func IsBotMessage ¶
func IsDirectMessage ¶
func IsDirectMessage(event *slack.MessageEvent) bool
func TimeTillPointReset ¶
Get time till the next emoji reset
Types ¶
type EmojiHandler ¶
type EmojiHandler struct {
// contains filtered or unexported fields
}
func NewEmojiHandler ¶
type EventHandler ¶
type HelpHandler ¶
type HelpHandler struct {
// contains filtered or unexported fields
}
func NewHelpHandler ¶
func NewHelpHandler(dailyCap int, emojiMap map[string]int) HelpHandler
type LeaderHandler ¶
type LeaderHandler struct {
// contains filtered or unexported fields
}
func NewLeaderHandler ¶
func NewLeaderHandler(db database.Driver) LeaderHandler
type PingHandler ¶
type PingHandler struct{}
type PointsHandler ¶
type PointsHandler struct {
// contains filtered or unexported fields
}
func NewPointsHandler ¶
func NewPointsHandler(dailyCap int, db database.Driver) PointsHandler
Click to show internal directories.
Click to hide internal directories.