Documentation ¶
Index ¶
- Variables
- type Context
- func (ctx *Context) Answer(text string, opts ...*illuminate.AnswerCallbackQueryOpts) (bool, error)
- func (ctx *Context) AnswerAlert(text string, opts ...*illuminate.AnswerCallbackQueryOpts) (bool, error)
- func (ctx *Context) AnswerAlertVoid(text string, opts ...*illuminate.AnswerCallbackQueryOpts) error
- func (ctx *Context) AnswerVoid(text string, opts ...*illuminate.AnswerCallbackQueryOpts) error
- func (ctx *Context) Chat() *illuminate.Chat
- func (ctx *Context) ChatID() int64
- func (ctx *Context) CommandArgs() []string
- func (ctx *Context) DeleteMessage(opts ...*illuminate.DeleteMessageOpts) (bool, error)
- func (ctx *Context) DeleteMessageVoid(opts ...*illuminate.DeleteMessageOpts) error
- func (ctx *Context) EditMessageText(text string, opts ...*illuminate.EditMessageTextOpts) (*illuminate.Message, bool, error)
- func (ctx *Context) EditMessageTextVoid(text string, opts ...*illuminate.EditMessageTextOpts) error
- func (ctx *Context) GetState() *string
- func (ctx *Context) Message() *illuminate.Message
- func (ctx *Context) Next() error
- func (ctx *Context) Reply(text string, opts ...*illuminate.SendMessageOpts) (*illuminate.Message, error)
- func (ctx *Context) ReplyEmojiBigReaction(emoji ...string) (bool, error)
- func (ctx *Context) ReplyEmojiBigReactionVoid(emoji ...string) error
- func (ctx *Context) ReplyEmojiReaction(emoji ...string) (bool, error)
- func (ctx *Context) ReplyEmojiReactionVoid(emoji ...string) error
- func (ctx *Context) ReplyVoid(text string, opts ...*illuminate.SendMessageOpts) error
- func (ctx *Context) ReplyWithMenu(text string, menu illuminate.IMenu, opts ...*illuminate.SendMessageOpts) (*illuminate.Message, error)
- func (ctx *Context) ReplyWithMenuVoid(text string, menu illuminate.IMenu, opts ...*illuminate.SendMessageOpts) error
- func (ctx *Context) Sender() *illuminate.User
- func (ctx *Context) SetParseMode(parseMode string)
- func (ctx *Context) SetState(state string)
- type Handler
- type Route
- type RouteFilter
- type Router
- func (r *Router) GetRoutes() []*Route
- func (r *Router) Group(handlers ...Handler) *Router
- func (r *Router) HandleUpdate(ctx context.Context, update *illuminate.Update) error
- func (r *Router) On(filter RouteFilter, handlers ...Handler) *Route
- func (r *Router) OnCallbackPrefix(prefix string, handlers ...Handler) *Route
- func (r *Router) OnCommand(command string, handlers ...Handler) *Route
- func (r *Router) OnCommandWithAt(command, username string, handlers ...Handler) *Route
- func (r *Router) OnMessage(handlers ...Handler) *Route
- func (r *Router) OnStart(handlers ...Handler) *Route
- func (r *Router) OnTextContains(text string, handlers ...Handler) *Route
- func (r *Router) OnTextPrefix(prefix string, handlers ...Handler) *Route
- func (r *Router) OnUpdate(handlers ...Handler) *Route
- func (r *Router) Use(middlewares ...Handler)
- func (r *Router) UseState(state string, handlers ...Handler) *Router
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRouteNotFound = errors.New("route not found")
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Context context.Context Update *illuminate.Update Bot *illuminate.Bot // contains filtered or unexported fields }
func (*Context) Answer ¶
func (ctx *Context) Answer(text string, opts ...*illuminate.AnswerCallbackQueryOpts) (bool, error)
Answer sends answer to callback query from update
func (*Context) AnswerAlert ¶
func (ctx *Context) AnswerAlert(text string, opts ...*illuminate.AnswerCallbackQueryOpts) (bool, error)
AnswerAlert sends answer to callback query from update with alert
func (*Context) AnswerAlertVoid ¶
func (ctx *Context) AnswerAlertVoid(text string, opts ...*illuminate.AnswerCallbackQueryOpts) error
AnswerAlertVoid sends answer to callback query with alert without returning result
func (*Context) AnswerVoid ¶
func (ctx *Context) AnswerVoid(text string, opts ...*illuminate.AnswerCallbackQueryOpts) error
AnswerVoid sends answer to callback query without returning result
func (*Context) Chat ¶
func (ctx *Context) Chat() *illuminate.Chat
func (*Context) CommandArgs ¶
func (*Context) DeleteMessage ¶
func (ctx *Context) DeleteMessage(opts ...*illuminate.DeleteMessageOpts) (bool, error)
DeleteMessage deletes message which is in update
func (*Context) DeleteMessageVoid ¶
func (ctx *Context) DeleteMessageVoid(opts ...*illuminate.DeleteMessageOpts) error
DeleteMessageVoid deletes message which is in update without returning result
func (*Context) EditMessageText ¶
func (ctx *Context) EditMessageText(text string, opts ...*illuminate.EditMessageTextOpts) (*illuminate.Message, bool, error)
func (*Context) EditMessageTextVoid ¶
func (ctx *Context) EditMessageTextVoid(text string, opts ...*illuminate.EditMessageTextOpts) error
func (*Context) Message ¶
func (ctx *Context) Message() *illuminate.Message
func (*Context) Reply ¶
func (ctx *Context) Reply(text string, opts ...*illuminate.SendMessageOpts) (*illuminate.Message, error)
Reply sends message to the chat from update
func (*Context) ReplyEmojiBigReaction ¶
func (*Context) ReplyEmojiBigReactionVoid ¶
func (*Context) ReplyEmojiReaction ¶
func (*Context) ReplyEmojiReactionVoid ¶
func (*Context) ReplyVoid ¶
func (ctx *Context) ReplyVoid(text string, opts ...*illuminate.SendMessageOpts) error
ReplyVoid sends message without returning result
func (*Context) ReplyWithMenu ¶
func (ctx *Context) ReplyWithMenu( text string, menu illuminate.IMenu, opts ...*illuminate.SendMessageOpts, ) (*illuminate.Message, error)
ReplyWithMenu sends message with menu
func (*Context) ReplyWithMenuVoid ¶
func (ctx *Context) ReplyWithMenuVoid( text string, menu illuminate.IMenu, opts ...*illuminate.SendMessageOpts, ) error
ReplyWithMenuVoid sends message with menu without returning result
func (*Context) Sender ¶
func (ctx *Context) Sender() *illuminate.User
func (*Context) SetParseMode ¶
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
func (*Route) GetFormattedState ¶
func (*Route) GetHandlersCount ¶
type RouteFilter ¶
func AnyUpdate ¶
func AnyUpdate() RouteFilter
func CallbackPrefix ¶
func CallbackPrefix(text string) RouteFilter
func Command ¶
func Command(command string) RouteFilter
func CommandWithAt ¶
func CommandWithAt(command, username string) RouteFilter
func Message ¶
func Message() RouteFilter
func TextContains ¶
func TextContains(text string) RouteFilter
func TextPrefix ¶
func TextPrefix(text string) RouteFilter
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func New ¶
func New(bot *illuminate.Bot) *Router
func (*Router) HandleUpdate ¶
func (*Router) OnCallbackPrefix ¶
func (*Router) OnCommandWithAt ¶
func (*Router) OnTextContains ¶
func (*Router) OnTextPrefix ¶
Click to show internal directories.
Click to hide internal directories.