god

package
v0.0.0-...-daa8be9 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Advanced = advanced{}
View Source
var AdvancedInterval = advancedInterval{}
View Source
var AdvancedIntervalSet = advancedIntervalSet{}
View Source
var AdvancedIntervalShow = advancedIntervalShow{}
View Source
var AdvancedReply = advancedReply{}
View Source
var AdvancedReplyOff = advancedReplyOff{}
View Source
var AdvancedReplyOn = advancedReplyOn{}
View Source
var AdvancedReplyShow = advancedReplyShow{}
View Source
var AdvancedTalk = advancedTalk{}
View Source
var ErrIntervalTooShort = errors.New("The given interval is too short.")
View Source
var ErrInvalidInterval = errors.New("Expected an integer number as the interval.")
View Source
var Normal = normal{}
View Source
var NormalInterval = normalInterval{}
View Source
var NormalReply = normalReply{}
View Source
var NormalReplyOff = normalReplyOff{}
View Source
var NormalReplyOn = normalReplyOn{}

Functions

func ReplyIntervalGet

func ReplyIntervalGet(place int64) (time.Duration, error)

ReplyIntervalGet returns the duration object of the interval that is required for auto-replies in the specified place.

func ReplyIntervalSet

func ReplyIntervalSet(place int64, dur time.Duration) (error, error)

ReplyIntervalSet sets the reply interval for the specified place. Returns ErrIntervalTooShort if dur is larger than the global minimum that is allowed.

func ReplyLastGet

func ReplyLastGet(place int64) (time.Time, error)

ReplyLastGet returns a time object of the when the last reply happened in the specified place.

func ReplyLastSet

func ReplyLastSet(place int64, when time.Time) error

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

func ReplyOnGet(place int64) (bool, error)

ReplyOnGet returns whether auto-replying is on or off (true or false) in the specified place.

func ReplyOnSet

func ReplyOnSet(place int64, on bool) error

ReplyOnSet will set the value that determines whether auto-replying is on or off (true or false) in the specified place.

func ShouldReply

func ShouldReply(place int64) (bool, error)

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.

func Talk

func Talk(prompt string) (string, error)

Talk returns GPT3's response to a prompt.

Types

This section is empty.

Jump to

Keyboard shortcuts

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