Documentation ¶
Index ¶
- Variables
- func ReplyIntervalGet(place int64) (time.Duration, error)
- func ReplyIntervalSet(place int64, dur time.Duration) (error, error)
- func ReplyLastGet(place int64) (time.Time, error)
- func ReplyLastSet(place int64, when time.Time) error
- func ReplyOnGet(place int64) (bool, error)
- func ReplyOnSet(place int64, on bool) error
- func ShouldReply(place int64) (bool, error)
- func Talk(prompt string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var Advanced = advanced{}
var AdvancedInterval = advancedInterval{}
var AdvancedIntervalSet = advancedIntervalSet{}
var AdvancedIntervalShow = advancedIntervalShow{}
var AdvancedReply = advancedReply{}
var AdvancedReplyOff = advancedReplyOff{}
var AdvancedReplyOn = advancedReplyOn{}
var AdvancedReplyShow = advancedReplyShow{}
var AdvancedTalk = advancedTalk{}
var ErrIntervalTooShort = errors.New("The given interval is too short.")
var ErrInvalidInterval = errors.New("Expected an integer number as the interval.")
var Normal = normal{}
var NormalInterval = normalInterval{}
var NormalReply = normalReply{}
var NormalReplyOff = normalReplyOff{}
var NormalReplyOn = normalReplyOn{}
Functions ¶
func ReplyIntervalGet ¶
ReplyIntervalGet returns the duration object of the interval that is required for auto-replies in the specified place.
func ReplyIntervalSet ¶
ReplyIntervalSet sets the reply interval for the specified place. Returns ErrIntervalTooShort if dur is larger than the global minimum that is allowed.
func ReplyLastGet ¶
ReplyLastGet returns a time object of the when the last reply happened in the specified place.
func ReplyLastSet ¶
ReplyLastSet sets the timestamp of the last reply fot the specified place. The passed when is set to UTC before extracting the timestamp.
func ReplyOnGet ¶
ReplyOnGet returns whether auto-replying is on or off (true or false) in the specified place.
func ReplyOnSet ¶
ReplyOnSet will set the value that determines whether auto-replying is on or off (true or false) in the specified place.
func ShouldReply ¶
ShouldReply returns true if the required interval has passed since the last auto-reply happened, meaning that the bot should send a new reply again.
Types ¶
This section is empty.