Documentation ¶
Index ¶
- Constants
- type BaseSceneError
- type BaseTextError
- type Button
- type Command
- type Context
- func (c *Context) Get(key string) (value any, exists bool)
- func (c *Context) GetBool(key string) (b bool)
- func (c *Context) GetDuration(key string) (d time.Duration)
- func (c *Context) GetFloat64(key string) (f64 float64)
- func (c *Context) GetInt(key string) (i int)
- func (c *Context) GetInt64(key string) (i64 int64)
- func (c *Context) GetString(key string) (s string)
- func (c *Context) GetStringMap(key string) (sm map[string]any)
- func (c *Context) GetStringMapString(key string) (sms map[string]string)
- func (c *Context) GetStringMapStringSlice(key string) (smss map[string][]string)
- func (c *Context) GetStringSlice(key string) (ss []string)
- func (c *Context) GetTime(key string) (t time.Time)
- func (c *Context) GetUint(key string) (ui uint)
- func (c *Context) GetUint64(key string) (ui64 uint64)
- func (c *Context) MustGet(key string) any
- func (c *Context) Set(key string, value any)
- type Error
- type Info
- type MessageMatcher
- type Request
- type Scene
- type Text
- type UserInfo
Constants ¶
const ( NoCommand = Command(0) ApplyStashedScene = Command(1) FinishScene = Command(2) StashScene = Command(3) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseSceneError ¶
type BaseSceneError struct {
Scene Scene
}
func (BaseSceneError) GetErrorScene ¶
func (bse BaseSceneError) GetErrorScene() Scene
func (BaseSceneError) GetErrorText ¶
func (bse BaseSceneError) GetErrorText() string
func (BaseSceneError) IsErrorScene ¶
func (bse BaseSceneError) IsErrorScene() bool
type BaseTextError ¶
type BaseTextError struct {
Message string
}
func (BaseTextError) GetErrorScene ¶
func (bte BaseTextError) GetErrorScene() Scene
func (BaseTextError) GetErrorText ¶
func (bte BaseTextError) GetErrorText() string
func (BaseTextError) IsErrorScene ¶
func (bte BaseTextError) IsErrorScene() bool
type Context ¶
func (*Context) Get ¶
Get returns the value for the given key, ie: (value, true). If the value does not exist it returns (nil, false)
func (*Context) GetDuration ¶
GetDuration returns the value associated with the key as a duration.
func (*Context) GetFloat64 ¶
GetFloat64 returns the value associated with the key as a float64.
func (*Context) GetStringMap ¶
GetStringMap returns the value associated with the key as a map of interfaces.
func (*Context) GetStringMapString ¶
GetStringMapString returns the value associated with the key as a map of strings.
func (*Context) GetStringMapStringSlice ¶
GetStringMapStringSlice returns the value associated with the key as a map to a slice of strings.
func (*Context) GetStringSlice ¶
GetStringSlice returns the value associated with the key as a slice of strings.
func (*Context) GetUint64 ¶
GetUint64 returns the value associated with the key as an unsigned integer.
type Info ¶
type Info struct { Text Text Buttons []Button ExpectedMessages []MessageMatcher Err Error }
type MessageMatcher ¶
type Request ¶
type Request struct { SearchedMessage string FullMessage string WasButton bool Payload json.RawMessage }