Documentation ¶
Index ¶
- type ChatBot
- func (cb *ChatBot) Conversation(m *tb.Message) (Conversation, bool)
- func (cb *ChatBot) HasConversation(m *tb.Message) bool
- func (cb *ChatBot) ProcessMessage(m *tb.Message)
- func (cb *ChatBot) RegisterCommand(cmd string, h Handler)
- func (cb *ChatBot) RegisterConvoCommand(cmd string, h ConvoHandler)
- func (cb *ChatBot) RegisterFallback(h Handler)
- func (cb *ChatBot) Route(m *tb.Message)
- func (cb *ChatBot) StartConversation(c Conversation, m *tb.Message)
- func (cb *ChatBot) StopConversation(c Conversation)
- type Conversation
- type ConvoHandler
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatBot ¶
type ChatBot struct {
// contains filtered or unexported fields
}
func NewChatBot ¶
func NewChatBot() *ChatBot
func (*ChatBot) Conversation ¶
func (cb *ChatBot) Conversation(m *tb.Message) (Conversation, bool)
func (*ChatBot) ProcessMessage ¶
func (*ChatBot) RegisterCommand ¶
func (*ChatBot) RegisterConvoCommand ¶
func (cb *ChatBot) RegisterConvoCommand(cmd string, h ConvoHandler)
func (*ChatBot) RegisterFallback ¶
func (*ChatBot) StartConversation ¶
func (cb *ChatBot) StartConversation(c Conversation, m *tb.Message)
func (*ChatBot) StopConversation ¶
func (cb *ChatBot) StopConversation(c Conversation)
type Conversation ¶
type ConvoHandler ¶
type ConvoHandler func(Conversation, *tb.Message)
Click to show internal directories.
Click to hide internal directories.