Documentation ¶
Index ¶
- Constants
- type Bot
- type Callback
- func (c *Callback) API() *vkapi.Client
- func (c *Callback) Close()
- func (c *Callback) Conversation() *conversation.Conversation
- func (c *Callback) Edit(msg conversation.Message)
- func (c *Callback) Log() *logger.Logger
- func (c *Callback) MessageID() int
- func (c *Callback) OpenLink(link string)
- func (c *Callback) Payload(i interface{}) vkapi.JSONData
- func (c *Callback) ShowSnackbar(text string)
- func (c *Callback) UserID() vkapi.UserID
- type Command
- type Context
- func (c *Context) API() *vkapi.Client
- func (c *Context) Close()
- func (c *Context) Conversation() *conversation.Conversation
- func (c *Context) Log() *logger.Logger
- func (c *Context) Payload(i interface{}) vkapi.JSONData
- func (c *Context) Reply(msg conversation.Message)
- func (c *Context) ReplyText(text string)
- type Message
- type Module
Constants ¶
View Source
const ( OptionInDialog common.Flag = 1 << iota OptionInChat )
Command options.
View Source
const Prefixes = "/!"
Prefixes are the characters with which commands must begin.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback struct {
// contains filtered or unexported fields
}
Callback type.
func (*Callback) Close ¶
func (c *Callback) Close()
Close replies without action to a callback event and closes context.
func (*Callback) Conversation ¶
func (c *Callback) Conversation() *conversation.Conversation
Conversation returns chat object for current chat.
func (*Callback) Edit ¶
func (c *Callback) Edit(msg conversation.Message)
Edit edits a message with keyboard and closes context.
func (*Callback) ShowSnackbar ¶
ShowSnackbar replies to a callback event and closes context.
type Command ¶
type Command struct { Run func(*Context, *Message) Cmd []string Description string Help string Options common.Flag }
Command respresents conversation command.
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context type.
func (*Context) Conversation ¶
func (c *Context) Conversation() *conversation.Conversation
Conversation returns chat object for current chat.
func (*Context) Reply ¶
func (c *Context) Reply(msg conversation.Message)
Reply replies with a message and closes context.
Click to show internal directories.
Click to hide internal directories.