Documentation
¶
Index ¶
- func AcceptEverything(*ow.Message) bool
- func AcceptImage(msg *ow.Message) bool
- func AcceptText(msg *ow.Message) bool
- type Command
- type Dispatcher
- func (e *Dispatcher) AddCommand(cmd Command)
- func (e *Dispatcher) AsMessageHandler() ow.MessageHandler
- func (e *Dispatcher) AwaitMatchingMessage(filter Filter, maxWaitingTime time.Duration) (*ow.Message, error)
- func (e *Dispatcher) HandleMessage(msg *ow.Message)
- func (e *Dispatcher) WaitForNext(msg *ow.Message, maxInputTime time.Duration) (*ow.Message, error)
- type Filter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptEverything ¶
func AcceptImage ¶
func AcceptText ¶
Types ¶
type Command ¶
type Command struct {
IsOnce bool
Name string
Usage string
Filter Filter
Handler func(*ow.Message) error
}
func (Command) CheckAvailability ¶
type Dispatcher ¶
type Dispatcher struct {
Commands []*Command
}
func (*Dispatcher) AddCommand ¶
func (e *Dispatcher) AddCommand(cmd Command)
func (*Dispatcher) AsMessageHandler ¶
func (e *Dispatcher) AsMessageHandler() ow.MessageHandler
func (*Dispatcher) AwaitMatchingMessage ¶
func (*Dispatcher) HandleMessage ¶
func (e *Dispatcher) HandleMessage(msg *ow.Message)
func (*Dispatcher) WaitForNext ¶
等待给定msg的发送者的下一条消息直到超出maxInputTime
Click to show internal directories.
Click to hide internal directories.
